Skip to content

x-proxy: a simple and reliable proxy switcher for Chrome

License

helebest/x-proxy

Folders and files

NameName
Last commit message
Last commit date

Latest commit

Β 

History

69 Commits
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 

Repository files navigation

X-Proxy

X-Proxy Logo

Simple, Fast, Privacy-Focused Proxy Switcher for Chrome

License Release Stars Website

Website β€’ Features β€’ Installation β€’ Quick Start β€’ Contributing


πŸ’‘ Why X-Proxy?

Managing multiple proxy configurations shouldn't be complicated. X-Proxy makes it simple:

  • ⚑ One-Click Switching - Switch proxies in < 100ms, no page reload needed
  • πŸ”’ Privacy First - No tracking, no telemetry, all data stored locally
  • 🎨 Clean Interface - Intuitive UI that gets out of your way
  • πŸš€ Modern Stack - Built with TypeScript, Vite, and Manifest V3
  • πŸ“¦ Lightweight - < 10MB memory footprint
  • πŸ†“ Free & Open Source - MIT licensed, use it however you want

🌟 Features

Core Functionality

  • πŸ”„ HTTP/HTTPS & SOCKS5: Full support for common proxy protocols
  • πŸ“ Unlimited Profiles: Save and organize as many proxy configurations as you need
  • ⚑ Instant Switching: Activate profiles with a single click from toolbar
  • 🎯 Domain Routing: Configure specific domains to use proxy (whitelist mode)
  • πŸ”§ System Integration: Seamless Chrome proxy API integration
  • πŸ’Ύ Local Storage: All data stays on your device, no cloud sync

Developer-Friendly

  • TypeScript with strict mode for type safety
  • Manifest V3 compliant for future compatibility
  • Comprehensive tests with 48+ test cases
  • Modern tooling with Vite and Vitest
  • Clean codebase that's easy to contribute to

πŸ“₯ Installation

Option 1: Chrome Web Store (Recommended)

Visit the Chrome Web Store - X-Proxy and click "Add to Chrome"

Option 2: Build from Source

# Clone the repository
git clone https://github.com/helebest/x-proxy.git
cd x-proxy

# Install dependencies
npm install

# Build the extension
npm run build

# Load in Chrome:
# 1. Open chrome://extensions/
# 2. Enable "Developer mode"
# 3. Click "Load unpacked"
# 4. Select the `dist` folder

Option 3: Download Release

Download the latest release from GitHub Releases and load it in Chrome developer mode.

Works on all Chromium browsers: Chrome, Edge, Brave, Opera, and more!

πŸš€ Quick Start

Basic Usage

  1. Click the X-Proxy icon in your Chrome toolbar
  2. Add a profile by clicking "βž• Add Profile"
  3. Configure your proxy:
    Name: My Proxy
    Type: HTTP or SOCKS5
    Host: proxy.example.com
    Port: 8080
    
  4. Click Save and then click the profile to activate
  5. Click "System" to return to direct connection

Domain Routing (New in v1.2.0)

Configure specific domains to use proxy while others go direct:

  1. Open Options (right-click extension icon β†’ Options)
  2. Edit or create a profile
  3. Enable "Domain Routing Rules" toggle
  4. Add domains (one per line):
    *.google.com
    github.com
    *.youtube.com
    
  5. Save and activate the profile

How it works:

  • βœ… Listed domains β†’ Use proxy
  • ⏭️ All other domains β†’ Direct connection
  • πŸ”Έ Supports wildcards: *.example.com matches all subdomains

Example Configurations

SOCKS5 Proxy:

Type: SOCKS5
Host: 127.0.0.1
Port: 1080

HTTP Proxy with Domain Routing:

Type: HTTP
Host: proxy.company.com
Port: 8080
Domain Routing: Enabled
Domains:
  *.google.com
  *.github.com
  *.stackoverflow.com

🎯 Use Cases

  • Web Development: Test apps behind different proxy configurations
  • Privacy: Route traffic through privacy-focused proxies
  • Geo-Testing: Access region-specific content during development
  • Corporate Networks: Easily switch between work and personal proxies
  • Self-Hosted Proxies: Manage multiple self-hosted proxy servers (Squid, Shadowsocks, V2Ray, etc.)

πŸ—οΈ Architecture

x-proxy/
β”œβ”€β”€ background.js       # Service worker - proxy management logic
β”œβ”€β”€ popup.js           # Popup UI - quick access interface
β”œβ”€β”€ options.js         # Options page - full profile management
β”œβ”€β”€ manifest.json      # Extension manifest (Manifest V3)
β”œβ”€β”€ vite.config.*.ts  # Separate builds for each component
└── docs/              # GitHub Pages website

Key Components

  • Background Service Worker: Manages Chrome proxy API and profile state
  • Popup Interface: Quick switching and status display
  • Options Page: Full-featured profile management
  • Local Storage: Chrome storage API for data persistence

See the codebase for detailed implementation. Key files: background.js, popup.js, options.js.

πŸ› οΈ Development

Available Commands

# Development
npm run build              # Build all components
npm run watch              # Watch mode for development
npm run type-check         # TypeScript type checking
npm run lint               # Code quality checks

# Testing
npm test                   # Run all tests
npm run test:unit          # Unit tests only
npm run test:coverage      # Coverage report

# Utilities
npm run clean              # Clean build artifacts
npm run generate-icons     # Generate icon assets

Tech Stack

  • Language: TypeScript (strict mode)
  • Build Tool: Vite
  • Testing: Vitest + Testing Library
  • APIs: Chrome Extension APIs (Manifest V3)
  • Storage: Chrome Storage API (local)

πŸ§ͺ Testing

X-Proxy has comprehensive test coverage:

npm test              # Run all tests
npm run test:watch    # Watch mode
npm run test:coverage # Coverage report

Test Coverage:

  • Unit tests for core logic
  • Integration tests for Chrome APIs
  • E2E tests for user workflows
  • Bug regression tests

🀝 Contributing

Contributions are welcome! Here's how you can help:

Good First Issues

  • πŸ› Bug fixes
  • πŸ“ Documentation improvements
  • 🌐 Translations
  • ✨ UI/UX enhancements

Wanted Features

  • Import/export profiles
  • Firefox port (WebExtensions)
  • Dark mode theme
  • Profile sharing via URL
  • Connection testing

How to Contribute

  1. Fork the repository
  2. Create a feature branch (git checkout -b feature/amazing-feature)
  3. Commit your changes (git commit -m 'feat: add amazing feature')
  4. Push to the branch (git push origin feature/amazing-feature)
  5. Open a Pull Request

See CONTRIBUTING.md for detailed guidelines.

πŸ“Š Performance Metrics

X-Proxy is designed to be lightweight and fast:

Metric Value
Startup Time < 50ms
Proxy Switching < 100ms
Memory Usage < 10MB
CPU Usage Minimal when idle
Extension Size ~2MB installed

πŸ”’ Privacy & Security

Your privacy is important:

  • βœ… No Telemetry - Zero data collection or tracking
  • βœ… Local Storage Only - All data stays on your device
  • βœ… No External Requests - Extension doesn't phone home
  • βœ… Open Source - Audit the entire codebase
  • βœ… Minimal Permissions - Only proxy and storage required

Read our Privacy Policy for details.

πŸ“„ License

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

TL;DR: You can use, modify, and distribute this software freely, even for commercial purposes.

🌐 Links

πŸ’– Support

If you find X-Proxy useful, consider:

  • ⭐ Starring the repository
  • πŸ› Reporting bugs or suggesting features
  • 🀝 Contributing code or documentation
  • πŸ’ Donating via PayPal

πŸ“ˆ Roadmap

v1.0.0 βœ… (Current - Extension Release)

  • Core proxy switching functionality
  • HTTP/HTTPS & SOCKS5 support
  • Profile management (create, edit, delete)
  • Clean, intuitive UI
  • TypeScript + Manifest V3
  • Comprehensive test suite
  • Chrome Web Store publication βœ…

v1.1.0 βœ… (GitHub Pages & SEO)

  • SEO optimization for GitHub Pages
  • Unified button styling
  • FAQ section with schema markup
  • Enhanced README and documentation

v1.2.0 βœ… (Current - Domain Routing)

  • PAC script support
  • Domain-based routing rules (whitelist mode)
  • Wildcard domain matching
  • Profile-level routing configuration
  • Automatic PAC script generation

v1.3.0 (Planned)

  • Import/export profiles (JSON format)
  • Profile sharing via URL
  • Connection testing
  • Dark mode theme

v2.0.0 (Future)

  • Firefox support (WebExtensions)
  • Advanced proxy features
  • Statistics and analytics (local only)
  • Custom themes

See CHANGELOG.md for detailed version history.

πŸ™ Acknowledgments

Built with:

Inspired by projects like SwitchyOmega and FoxyProxy, but with a focus on simplicity and privacy.

πŸ“ž Contact

  • GitHub Issues: For bug reports and feature requests
  • GitHub Discussions: For questions and community chat
  • Email: [email protected]

Made with ❀️ by helebest β€’ πŸ’ Donate

Simple, reliable proxy switching for Chrome