Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Disable transparent proxy in app store builds #2261

Merged
merged 5 commits into from
Feb 26, 2024

Conversation

diegoreymendez
Copy link
Contributor

@diegoreymendez diegoreymendez commented Feb 26, 2024

Task/Issue URL: https://app.asana.com/0/1199230911884351/1206690644131121/f

Description

Disables the transparent proxy in App Store builds.

Testing

  1. Run the App store target and make sure it launches fine.
  2. Inspect the built product, there should be two extensions in Contents/Library/DuckDuckGo VPN.app/Contents/PlugIns
  3. Archive a release builds and make sure it launches fine.
  4. Inspect the built product, there should be one extension only in Contents/Library/DuckDuckGo VPN.app/Contents/PlugIns

Internal references:

Pull Request Review Checklist
Software Engineering Expectations
Technical Design Template
Pull Request Documentation

@diegoreymendez diegoreymendez self-assigned this Feb 26, 2024
@diegoreymendez diegoreymendez requested review from ayoy and removed request for ayoy February 26, 2024 11:05
@github-actions github-actions bot added the bot: not in app board Added by automation for pull requests with tasks not added to macOS App Board Asana project label Feb 26, 2024
@diegoreymendez diegoreymendez removed the bot: not in app board Added by automation for pull requests with tasks not added to macOS App Board Asana project label Feb 26, 2024
@github-actions github-actions bot added the bot: not in app board Added by automation for pull requests with tasks not added to macOS App Board Asana project label Feb 26, 2024
@diegoreymendez diegoreymendez marked this pull request as ready for review February 26, 2024 11:08
@github-actions github-actions bot removed the bot: not in app board Added by automation for pull requests with tasks not added to macOS App Board Asana project label Feb 26, 2024
@@ -8502,6 +8500,7 @@
4B2D06672A13318400DE1F49 /* Resources */,
4B2D067D2A13341200DE1F49 /* ShellScript */,
4BA7C4E02B3F6F7500AFE511 /* Embed Network Extensions */,
7B557F2A2B8CA2A400099746 /* Embed Debug-only Network Extensions */,
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

New script phase for conditionally including the transparent proxy target.

runOnlyForDeploymentPostprocessing = 0;
shellPath = /bin/sh;
shellScript = "# Support for embedding debug-only extensions (https://stackoverflow.com/a/76948057/712306)\nfunction embedExtensions() {\n for extension in $1\n do\n rsync -r --copy-links \"${CONFIGURATION_BUILD_DIR}/${extension}.appex\" \"${CONFIGURATION_BUILD_DIR}/${PLUGINS_FOLDER_PATH}\"\n done\n}\n\ndebug_extensions=(\"VPNProxyExtension\")\n\nif [ \"${CONFIGURATION}\" != \"Release\" ]\nthen\n embedExtensions $debug_extensions\nfi\n";
};
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Includes VPNProxyExtension.appex conditionally.

@@ -3274,7 +3273,6 @@
dstPath = "";
dstSubfolderSpec = 13;
files = (
7BDA36F92B7E084A00AD5388 /* VPNProxyExtension.appex in Embed Network Extensions */,
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

We're no longer embedding this unconditionally. We don't want this for release builds yet.

@ayoy ayoy self-requested a review February 26, 2024 12:25
Copy link
Collaborator

@ayoy ayoy left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM, thanks Diego!

@diegoreymendez diegoreymendez merged commit 8b81011 into main Feb 26, 2024
17 checks passed
@diegoreymendez diegoreymendez deleted the diego/disable-tp-in-app-store branch February 26, 2024 15:58
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants