Skip to content

parhamfa/where-is-my-dst

Repository files navigation

Where is my Dst? πŸŒπŸ”

A Safari extension that reveals the geographic origin of web requests, helping you understand where your data is going.

Extension Icon

✨ Features

  • 🌍 Real-time Country Detection: See the country flag of the current website in your Safari toolbar
  • πŸ“‘ Request Tracking: View all network requests made by a webpage, grouped by country
  • 🚫 Smart Blocking: Block requests from specific domains with one click
  • 🏠 Website Preferences: Set site-specific blocking rules that persist across sessions
  • 🎨 Beautiful UI: Clean, animated interface with smooth transitions and intuitive controls
  • πŸ”’ Privacy-Focused: All processing happens locally; no data sent to third parties

πŸš€ How It Works

  1. Install the Extension: Load the Safari extension through Xcode
  2. Browse the Web: The extension automatically detects the country of origin for each website
  3. View Requests: Click the extension icon to see all requests grouped by country
  4. Block Unwanted Requests: Use the "Block" button to prevent requests from specific domains
  5. Manage Preferences: View and manage your blocking rules in the Website Preferences section

πŸ›  Technical Details

APIs Used

  • IP Geolocation: ipwho.is for country detection
  • DNS Resolution: dns.google for hostname to IP resolution
  • Browser APIs: webRequest, tabs, storage, declarativeNetRequest

Key Technologies

  • JavaScript (ES6+): Modern async/await patterns
  • CSS3: Advanced animations and responsive design
  • SVG: Scalable vector graphics for icons
  • Canvas API: Dynamic icon generation

πŸ”§ Installation

Prerequisites

  • macOS with Xcode installed
  • Safari 14+ with developer extensions enabled

Setup

  1. Clone the Repository:

    git clone https://github.com/parhamfa/where-is-my-dst.git
    cd where-is-my-dst
  2. Open in Xcode:

    open "Where is my Dst?.xcodeproj"
  3. Build and Run:

    • Select your target device/simulator
    • Press Cmd+R to build and run
    • Follow the on-screen instructions to enable the extension
  4. Enable in Safari:

    • Open Safari β†’ Preferences β†’ Extensions
    • Enable "Where is my Dst?"
    • Grant necessary permissions

Chrome (Unpacked Extension)

  1. Open the Chrome bundle directory: Chrome (Extension)/Resources
  2. Vendor library: vendor/browser-polyfill.min.js is included so the extension can keep using the browser.* APIs that the Safari version expects.
  3. Load the extension:
    • Navigate to chrome://extensions
    • Turn on Developer mode
    • Click Load unpacked and pick the Chrome (Extension)/Resources folder
  4. Grant permissions when prompted so the extension can observe network activity.
  5. Test the build:
    • Visit a few sites and confirm the toolbar badge switches from the default icon to the two-letter country code
    • Open the popup to verify request lists populate and country/group counters update
    • Press Block on this site for a request and ensure it reappears under Website preferences while the network request is blocked after reloading the tab

🎯 Use Cases

  • VPN Leak Detection: In countries with heavy internet moderation (Iran, China), foreign API requests can leak your real IP if traffic is being forwarded through different routes. This extension helps identify which requests might compromise your privacy.
  • Privacy Auditing: Understand where your browsing data is being sent and identify unexpected third-party requests.
  • Security Research: Analyze request patterns and detect potential data exfiltration or suspicious international connections.
  • Content Blocking: Block unwanted international requests that might be tracking or collecting data.

πŸ”’ Privacy & Security

  • Local Processing: All geolocation lookups happen in the background script
  • No Tracking: The extension doesn't collect or transmit personal data
  • Minimal Permissions: Only requests necessary permissions for functionality
  • Open Source: Full source code available for audit

🎨 UI/UX Highlights

  • Glassmorphism Design: Modern, translucent interface elements
  • Smooth Animations: 60fps transitions and hover effects
  • Responsive Layout: Adapts to different content sizes
  • Accessibility: Proper ARIA labels and keyboard navigation
  • Dark Mode Support: Automatic adaptation to system preferences

🀝 Contributing

Contributions are welcome! Please feel free to submit a Pull Request. For major changes, please open an issue first to discuss what you would like to change.

Development Setup

  1. Fork the repository
  2. Create a feature branch: git checkout -b feature-name
  3. Make your changes and test thoroughly
  4. Submit a pull request with a clear description

πŸ“„ License

This project is licensed under the MIT License - see the LICENSE file for details.

πŸ™ Acknowledgments

  • IP Geolocation: Thanks to ipwho.is for providing free IP geolocation services
  • DNS Resolution: Thanks to Google's DNS-over-HTTPS service
  • Icons: Custom-designed icons for a cohesive visual experience
  • Community: Thanks to the Safari extension development community for guidance and best practices

πŸ“ž Support

If you encounter any issues or have questions:

  • Open an issue on GitHub
  • Check the Safari Console for error messages
  • Ensure you have the latest version of Safari and macOS

Made with ❀️ for privacy-conscious web browsing

About

πŸŒπŸ” Safari extension that reveals the geographic origin of web requests, helping you understand where your data is going

Topics

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

 
 
 

Contributors