Overview
TurkeyDPI includes a native macOS app with a menu bar interface. It provides one-click proxy management without touching the command line.The macOS app is a SwiftUI application that wraps the TurkeyDPI CLI engine. It offers the same functionality with a graphical interface.
Installation
Build the app
Navigate to the app directory and run the build script:This compiles the Swift app and bundles the TurkeyDPI engine.
Open the app
Launch the application:Or drag
TurkeyDPI.app to your Applications folder and launch it from there.Features
Menu Bar Interface
The app lives in your menu bar with a simple interface:-
Icon states:
- ○ (Empty circle) - No proxies running
- ● (Filled circle) - At least one proxy running
-
Menu:
- List of configured proxies with status indicators
- Quick Start/Stop buttons
- Open main window
- Quit application
Main Window
The main window provides full proxy management:- Proxy List
- Proxy Details
- Create Proxy
Sidebar shows all configured proxies:
- ● Green dot - Proxy running
- ○ Gray dot - Proxy stopped
- ◐ Orange dot - Proxy starting/stopping
- ● Red dot - Error state
- Name
- Port number (
:8844)
- Click to select
- Right-click for context menu
- Click
+to create new proxy
Creating Your First Proxy
ISP Preset Selector
When creating a proxy, choose from these presets:- Aggressive
- Türk Telekom
- Vodafone TR
- Superonline
Display: AggressiveDescription: All techniques enabledUse when:
- You don’t know your ISP
- Other presets don’t work
- Maximum compatibility needed
- Adds ~10ms latency
- Higher CPU usage
System Proxy Integration
The app can automatically configure macOS system proxy settings.How it works
When “Set as system proxy” is enabled:-
On Start: The app runs this command internally:
-
On Stop: The app disables the proxy:
-
On Quit: All proxies are disabled:
Manual configuration
If you prefer manual control, disable “Set as system proxy” and configure manually:Configure proxy
Click Advanced → Proxies tabEnable:
- ☑ SOCKS Proxy
- SOCKS Proxy Server:
127.0.0.1 - Port:
8844(or your custom port)
Real-time Logs
The app displays live logs from the TurkeyDPI engine:Log Types
Info (Blue)
Info (Blue)
Normal operational messages:
Success (Green)
Success (Green)
Successful operations:
Warning (Orange)
Warning (Orange)
Non-critical issues:
Error (Red)
Error (Red)
Critical errors:
Debug (Gray)
Debug (Gray)
Verbose debug information:
Log Features
- Auto-scroll: Logs automatically scroll to newest entries
- Search: Filter logs (future feature)
- Export: Copy logs to clipboard
- Clear: Right-click → Clear Logs
Managing Multiple Proxies
The app supports multiple proxy configurations simultaneously.Use Cases
Running Multiple Proxies
- Create multiple configurations with different ports
- Start the ones you need
- Configure applications to use different ports
Keyboard Shortcuts
| Shortcut | Action |
|---|---|
⌘N | Create new proxy |
⌘W | Close window |
⌘Q | Quit application |
⌘, | Preferences (future) |
⌘R | Refresh logs |
Context Menu Actions
Right-click a proxy in the sidebar for quick actions:- Start - Start the proxy (if stopped)
- Stop - Stop the proxy (if running)
- Clear Logs - Clear log history
- Delete - Remove the proxy configuration
Application Lifecycle
Startup
- App checks for stale processes from previous crashes
- Kills any leftover
turkeydpi-engineprocesses - Loads saved proxy configurations from
UserDefaults - Auto-starts proxies with “Start automatically” enabled
- Shows main window and menu bar icon
During Use
- Proxies run as child processes
- Logs are captured in real-time
- Status updates every second
- System proxy settings are synchronized
Shutdown
- User clicks Quit (or
⌘Q) - App stops all running proxies
- System proxies are disabled for all interfaces
- Proxy configurations are saved to
UserDefaults - All child processes are terminated
- App exits
If the app crashes, stale processes are automatically cleaned up on next launch.
Troubleshooting
App won’t start
-
Check for existing processes:
-
Verify binary location:
The app looks for the binary in these locations:
-
Rebuild the app:
Proxy fails to start
Error: “turkeydpi binary not found” The app can’t find the CLI binary. Make sure you:- Built the app with
./build.sh - Or installed the CLI:
cargo install --path cli
- Change the port number in proxy configuration
- Stop the other process:
System proxy not setting
If the proxy doesn’t enable automatically:-
Check permissions:
The app may need administrator access for
networksetupcommands. - Disable and re-enable: Uncheck “Set as system proxy”, stop the proxy, then re-enable and start.
- Set manually: Disable automatic setting and configure manually in System Preferences.
Logs not showing
If logs are empty:- Check if proxy is running: Green dot should be visible next to proxy name.
-
Enable verbose mode:
Edit the app code to add
-vflag (advanced users only). - Check console: Open Console.app and filter for “turkeydpi” to see system logs.
Technical Details
Architecture
Data Persistence
Proxy configurations are stored inUserDefaults:
savedContainers
Format: JSON array of ContainerConfig objects
Binary Execution
The app spawns the CLI as a child process:Pipe objects and displayed in real-time.
Next Steps
Basic Usage
Learn about the CLI interface
ISP Presets
Understand preset configurations in detail
Configuration
Advanced configuration options