Repository navigation
Description
Platform
macOS
ProxyBridge Version
4.1.3
OS and Version
macOS 27.2 (Apple Silicon arm64)
Documentation
- I have read the Windows documentation
- I have read the macOS documentation
- I have read the Linux documentation
Code Review
- I have gone through the code page
Describe the Feature
Problem
ProxyBridge works great at the system extension level on macOS, but configuring a proxy for a specific desktop app currently involves quite a bit of manual friction:
- Manual field-by-field proxy entry: Users usually already have a proxy string in their clipboard (e.g.,
http://127.0.0.1:7897,socks5://user:pass@host:1080, or127.0.0.1:7890), but have to manually split and type Type, Host, Port, Username, and Password into separate fields. - Finding Bundle IDs and hidden helper binaries is hard: Modern macOS apps (especially Electron apps, IDEs, and AI tools) spawn multiple helper apps and embedded binaries (e.g.,
Helper (Renderer),language_server, etc.) that may not share the main app's bundle identifier. Users currently have to run terminal commands (osascript/ps) or watch theConnectionslog one by one to figure out what strings to type intoProcess / Bundle Identifier.
Proposed Solution
Keep the existing rule/proxy architecture intact, and add two lightweight UX helpers to the existing SwiftUI sheets (plus an optional quick action in Connections):
- "Paste Proxy URL" in
Add / Edit Proxysheet:- Allow pasting a standard proxy URL (
socks5://[user:pass@]host:port,http://[user:pass@]host:port, orhost:port) via a "Paste from Clipboard" button (or smart paste field) that auto-populates Type, Host, Port, Username, and Password.
- Allow pasting a standard proxy URL (
- "Choose App..." Picker in
Add / Edit Rulesheet:- Add a
Choose App...button next to theProcess / Bundle Identifierfield. - Let the user pick an
.appbundle from/Applications(with app icons via standardNSOpenPanelor an installed apps list). - Automatically append both the main bundle ID and the app bundle path wildcard (e.g.,
com.example.App; /Applications/Example.app/*) so all embedded helpers and bundled child binaries inside.app/Contents/are covered out of the box without manual log hunting.
- Add a
- (Optional) Quick rule creation from
Connectionstab:- Allow right-clicking / selecting a logged connection entry (especially standalone CLI tools like
curloragy) to openAdd Rulewith that process name pre-filled.
- Allow right-clicking / selecting a logged connection entry (especially standalone CLI tools like
Benefits
- Turns a multi-step terminal + log-hunting setup into a 2-click workflow for everyday macOS users.
- Eliminates the most common pitfall where selecting only a main Bundle ID misses Electron helpers or bundled language servers/daemons.
- 100% backward-compatible with existing profiles, CLI format, and extension rule matching logic.
Additional Context
Concrete Implementation Suggestions (based on current MacOS/ codebase)
Since the extension side (AppProxyProvider.swift -> ProxyRule.FlowProcess, updated in #288) already supports matching both bundle IDs and full-path wildcards like /Applications/Foo.app/*, this requires zero changes to the Network Extension and can be implemented purely in the GUI layer:
-
Proxy URL Parser in
ProxySettingsView.swift(ProxyConfigEditorView):- Add a
Paste URLbutton in the form header/section that readsNSPasteboard.general.string(forType: .string). - Parse using
URLComponents(handling schemessocks5,socks5h,http,https, plus a fallback for barehost:portstrings):- Map
scheme->type(SOCKS5/HTTP) - Map
host,port,user,passworddirectly into the existing@Statefields ofProxyConfigEditorView.
- Map
- Add a
-
App Bundle Picker in
ProxyRulesView.swift(RuleEditorView):- Add a
Choose App...button next to theProcess / Bundle Identifierfield. - Open an
NSOpenPanelconfigured with:allowedContentTypes = [.applicationBundle]directoryURL = URL(fileURLWithPath: "/Applications")allowsMultipleSelection = true
- For each selected
appURL:- Read
Bundle(url: appURL)?.bundleIdentifier(if present). - Generate
"<bundleId>; \(appURL.path)/*"(e.g.,com.example.app; /Applications/Example.app/*) and append it (deduplicated,;-separated) toprocessNames, replacing the default*if untouched.
- Read
- If Rule Name is still empty, optionally pre-fill
ruleNamewith the app's display name (appURL.deletingPathExtension().lastPathComponent).
- Add a
-
Quick Action in
ContentView.swift(ConnectionsView):- Since
ConnectionsViewcurrently renders into anNSTextView(LogTextView) fromviewModel.connections, a lightweight option without rewriting the text view would be a small menu/picker or contextual action to openRuleEditorViewpre-populated with a selected process fromviewModel.connections.
- Since
Happy to provide more details or help test if needed. Thanks again for building and maintaining ProxyBridge!
Activity
Anof-cyber commentedon Nov 22, 2026
2nd one, app picker, that feature is there in Windows and Linux, same in macos is what i also want but its not possible.
Macos app is sandbox, macos won't allow app to select and see other apps :). Its a macos restriction