-
Notifications
You must be signed in to change notification settings - Fork 11
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
macOS: Transparent proxy for excluding VPN traffic. (#2128)
Task/Issue URL: https://app.asana.com/0/0/1206462407536023/f Tech Design URLs: - [Tech Design: How to exclude Data Broker traffic?](https://app.asana.com/0/481882893211075/1206363506060150/f) - [Tech Design: Mechanism to allow PIR to start excluding its traffic from the VPN tunnel](https://app.asana.com/0/481882893211075/1206446978081253/f) - [Tech Design: How will the proxy recover from failure?](https://app.asana.com/0/481882893211075/1206446978546262) iOS PR: duckduckgo/iOS#2429 BSK PR: duckduckgo/BrowserServicesKit#652 ## Description Adds a transparent proxy that allows excluding app and domain traffic from the VPN. ## Known issues / limitations ### Issue 1: Exclusion delay on existing flows When switching off an exclusion, connection flows seem to switch immediately to routing through the tunnel interface again. However when turning the exclusion back ON, connection flows seem to take a bit before routing back through the proxy. This should not be a big problem as eventually connections start being excluded correctly again. It's unclear at this point if this is a macOS bug, or a bug on our proxy - but I don't think this should be a blocker by any means.
- Loading branch information
1 parent
422814e
commit d5c1756
Showing
76 changed files
with
3,497 additions
and
341 deletions.
There are no files selected for viewing
This file contains 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
This file contains 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
This file contains 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
This file contains 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
52 changes: 52 additions & 0 deletions
52
Configuration/Extensions/NetworkProtection/VPNProxyExtension.xcconfig
This file contains 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,52 @@ | ||
// Copyright © 2023 DuckDuckGo. All rights reserved. | ||
// | ||
// Licensed under the Apache License, Version 2.0 (the "License"); | ||
// you may not use this file except in compliance with the License. | ||
// You may obtain a copy of the License at | ||
// | ||
// http://www.apache.org/licenses/LICENSE-2.0 | ||
// | ||
// Unless required by applicable law or agreed to in writing, software | ||
// distributed under the License is distributed on an "AS IS" BASIS, | ||
// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. | ||
// See the License for the specific language governing permissions and | ||
// limitations under the License. | ||
// | ||
|
||
#include "../ExtensionBase.xcconfig" | ||
#include "../../AppStore.xcconfig" | ||
|
||
CODE_SIGN_ENTITLEMENTS[config=CI][sdk=macosx*] = | ||
CODE_SIGN_ENTITLEMENTS[config=Debug][sdk=macosx*] = VPNProxyExtension/VPNProxyExtension.entitlements | ||
CODE_SIGN_ENTITLEMENTS[config=Release][sdk=macosx*] = VPNProxyExtension/VPNProxyExtension.entitlements | ||
CODE_SIGN_ENTITLEMENTS[config=Review][sdk=macosx*] = VPNProxyExtension/VPNProxyExtension.entitlements | ||
CODE_SIGN_STYLE[config=Debug][sdk=*] = Automatic | ||
|
||
CODE_SIGN_IDENTITY[sdk=macosx*] = 3rd Party Mac Developer Application | ||
CODE_SIGN_IDENTITY[config=Debug][sdk=macosx*] = Apple Development | ||
CODE_SIGN_IDENTITY[config=CI][sdk=macosx*] = | ||
|
||
GENERATE_INFOPLIST_FILE = YES | ||
INFOPLIST_FILE = VPNProxyExtension/Info.plist | ||
INFOPLIST_KEY_NSHumanReadableCopyright = Copyright © 2023 DuckDuckGo. All rights reserved. | ||
|
||
FEATURE_FLAGS[arch=*][sdk=*] = NETWORK_EXTENSION NETWORK_PROTECTION | ||
FEATURE_FLAGS[config=CI][arch=*][sdk=*] = NETWORK_EXTENSION NETWORK_PROTECTION | ||
FEATURE_FLAGS[config=Debug][arch=*][sdk=*] = NETWORK_EXTENSION NETWORK_PROTECTION | ||
FEATURE_FLAGS[config=Review][arch=*][sdk=*] = NETWORK_EXTENSION NETWORK_PROTECTION | ||
|
||
PRODUCT_BUNDLE_IDENTIFIER[sdk=*] = | ||
PRODUCT_BUNDLE_IDENTIFIER[config=CI][sdk=*] = $(PROXY_EXTENSION_BUNDLE_ID) | ||
PRODUCT_BUNDLE_IDENTIFIER[config=Debug][sdk=*] = $(PROXY_EXTENSION_BUNDLE_ID) | ||
PRODUCT_BUNDLE_IDENTIFIER[config=Release][sdk=*] = $(PROXY_EXTENSION_BUNDLE_ID) | ||
PRODUCT_BUNDLE_IDENTIFIER[config=Review][sdk=*] = $(PROXY_EXTENSION_BUNDLE_ID) | ||
|
||
PROVISIONING_PROFILE_SPECIFIER[config=CI][sdk=macosx*] = | ||
PROVISIONING_PROFILE_SPECIFIER[config=Release][sdk=macosx*] = match AppStore $(AGENT_BUNDLE_ID).proxy macos | ||
PROVISIONING_PROFILE_SPECIFIER[config=Review][sdk=macosx*] = match AppStore $(AGENT_BUNDLE_ID).proxy macos | ||
|
||
SDKROOT = macosx | ||
SKIP_INSTALL = YES | ||
SWIFT_EMIT_LOC_STRINGS = YES | ||
|
||
LD_RUNPATH_SEARCH_PATHS = @executable_path/../Frameworks @executable_path/../../../../Frameworks |
Oops, something went wrong.