A modern macOS menu bar application for dynamic HTTP/TCP proxy server port switching. Perfect for developers who need to quickly switch between different local development servers.
Modern SwiftUI interface with intuitive port switching controls
- π HTTP/TCP Proxy Server - Listen on a fixed port (default: 8080) and forward requests to configurable target ports
- π Dynamic Port Switching - Instantly switch between multiple target ports without restarting
- π Menu Bar Integration - Native macOS status bar application with intuitive controls
- βοΈ Modern Preferences UI - Apple HIG-compliant settings window with real-time validation
- πΎ Persistent Configuration - Automatically saves and restores your settings
- π― Visual Status Indicators - Clear on/off states and active port highlighting
- β¨οΈ Keyboard Shortcuts - Quick access with customizable hotkeys
- Go to the Releases page
- Download the latest
SwitchProxyPort.dmgfile - Open the DMG and drag SwitchProxyPort to your Applications folder
- Launch from Applications or Spotlight
# Clone the repository
git clone https://github.com/sskmy1024y/switch-proxy-port.git
cd switch-proxy-port
# Build the application
cd SwitchProxyPort
./build-app.sh
# Launch the app
open SwitchProxyPort.app# Clone and run in development mode
git clone https://github.com/sskmy1024y/switch-proxy-port.git
cd switch-proxy-port/SwitchProxyPort
./run.sh- Launch - The app appears in your menu bar with a proxy icon
- Enable Proxy - Click the menu bar icon and select "π’ Turn On"
- Switch Targets - Choose from available target ports in the "Target Ports" submenu
- Configure - Access "βοΈ Preferences..." for advanced settings
- Listen Port:
8080 - Target Ports:
3000,3001,3002 - Initial State: Disabled
Configure your browser's proxy settings:
- HTTP Proxy:
127.0.0.1:8080 - HTTPS Proxy:
127.0.0.1:8080
- Listen Port: Change the proxy server's listening port
- Target Ports: Add/remove forwarding destinations
- Auto Start: Enable automatic startup on login (coming soon)
SwitchProxyPort/
βββ π± AppDelegate.swift # Application lifecycle management
βββ π StatusBarController.swift # Menu bar interface
βββ π§ ProxyServer.swift # Core proxy functionality
βββ βοΈ ConfigManager.swift # Settings persistence
βββ π¨ ModernPreferencesWindowController.swift # Settings UI
βββ π ProxyConfig.swift # Configuration data model
- ProxyServer: Handles HTTP/TCP forwarding using Network framework
- StatusBarController: Manages menu bar UI with modern icons and shortcuts
- ConfigManager: JSON-based configuration with automatic persistence
- ModernPreferencesWindowController: Apple HIG-compliant settings interface
- π’/βͺ Visual Status: Green/white icons indicate proxy state
- π‘ Status Display: Shows listening and forwarding port information
- π― Target Selection: Submenu with active port highlighting
- β¨οΈ Keyboard Shortcuts: Quick access (Cmd+T, Cmd+Q, Cmd+,)
- π¨ Modern Design: Full-size content view with transparent title bar
- π Input Validation: Real-time port number validation
- π§ Easy Management: Add/remove target ports with visual feedback
- π Status Messages: Success/error feedback with auto-dismiss
- macOS 12.0 or later
- Swift 5.7 or later
- Xcode 14.0 or later
# Clone the repository
git clone <repository-url>
cd switch-proxy-port
# Build debug version
cd SwitchProxyPort
swift build
# Run in development mode
./.build/debug/SwitchProxyPort- SwitchProxyPort/: Swift Package Manager project
- assets/: Application icons and resources
- DESIGN_SPEC.md: Detailed technical specifications
build-app.sh- Create release app bundlecreate-dmg.sh- Generate DMG installerrun.sh- Development mode launchertest-proxy.sh- Proxy functionality testing
The application supports multiple distribution methods:
- App Bundle:
SwitchProxyPort.appfor direct installation - DMG Package: Professional installer with drag-to-Applications
- Development Build: Direct execution from build directory
See DISTRIBUTION.md for detailed packaging instructions.
- Fork the repository
- Create a feature branch (
git checkout -b feature/amazing-feature) - Commit your changes (
git commit -m 'Add amazing feature') - Push to the branch (
git push origin feature/amazing-feature) - Open a Pull Request
- Operating System: macOS 12.0 (Monterey) or later
- Architecture: Intel x64 or Apple Silicon (Universal Binary)
- Memory: 50 MB RAM (typical usage)
- Network: Local proxy functionality only
- Local Operation: All proxy traffic remains on your local machine
- No Data Collection: No analytics or telemetry
- Minimal Permissions: Only requires network binding privileges
- Open Source: Full source code available for audit
This project is licensed under the MIT License - see the LICENSE file for details.
- Built with Apple's Network framework for robust proxy functionality
- UI design follows Apple Human Interface Guidelines
- Icons designed using Apple's SF Symbols principles
Made with β€οΈ for macOS developers