feat: add macOS system extension for transparent proxy support#67
Draft
josezy wants to merge 2 commits intoGreyhavenHQ:mainfrom
Draft
feat: add macOS system extension for transparent proxy support#67josezy wants to merge 2 commits intoGreyhavenHQ:mainfrom
josezy wants to merge 2 commits intoGreyhavenHQ:mainfrom
Conversation
Add Xcode project for GreywallProxy system extension using NetworkExtension framework. The extension implements NETransparentProxyProvider to intercept network traffic at the kernel level on macOS, enabling transparent proxying without requiring manual proxy configuration in sandboxed apps.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Add Xcode project for GreywallProxy system extension using NetworkExtension framework. The extension implements NETransparentProxyProvider to intercept network traffic at the kernel level on macOS, enabling transparent proxying without requiring manual proxy configuration in sandboxed apps.
Greywall Transparent Proxy – System Extension (PoC)
Minimal macOS system extension using
NETransparentProxyProviderto intercept TCP/UDP flows at the socket layer. This is a proof-of-concept for validating transparent traffic capture before full integration with greywall/greyproxy.Step 1 (current): passive logging – intercepts all outbound flows, logs PID + app signing ID + remote hostname, and passes everything through. No traffic is modified.
Prerequisites
brew install xcodegenProject Structure
Setup
1. Set your Team ID
Find your Team ID:
security find-identity -p codesigning -v # Look for the OU field in the certificate subject, or check Xcode > Settings > AccountsEdit
project.ymland replace theDEVELOPMENT_TEAMvalue with your Team ID:2. Generate the Xcode project
Important: xcodegen clears the entitlements files on every regeneration. After running xcodegen, either:
3. Build
From Xcode (Product > Run), or from the command line:
Testing
1. Launch the app to activate the extension
Two approval dialogs will appear:
2. Watch the logs
log stream --predicate 'subsystem == "io.greywall.proxy"' --level info3. Generate traffic
In another terminal:
Expected log output:
This confirms: traffic interception works, PID metadata is available,
remoteHostnameprovides domain visibility, and passthrough does not break the connection.4. Uninstall
Entitlements
If xcodegen clears the entitlements, restore them manually:
GreywallProxy/GreywallProxy.entitlements:
GreywallProxyExtension/GreywallProxyExtension.entitlements:
References