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

feat: support user-supplied literal headers #24

Merged
merged 4 commits into from
Jan 23, 2025

Conversation

ethanndickson
Copy link
Member

@ethanndickson ethanndickson commented Jan 16, 2025

First step for #17.

This PR adds a settings menu to the app, and a network tab with a form for specifying hard-coded HTTP headers to be added on all outgoing requests. The settings cannot be modified while Coder VPN is on, as they can't be applied to the DERP headers without restarting the tailnet connection.

literalheaderflow.mov

Future work includes:

  • Sending these headers to the Network Extension whenever they change, via XPC.
  • Adding support for dynamic, shell command-based headers, as also supported by the CLI.

Copy link
Member Author

ethanndickson commented Jan 16, 2025

@ethanndickson ethanndickson force-pushed the ethan/nicer-login-form branch from 7173c04 to 5133c65 Compare January 16, 2025 07:36
@ethanndickson ethanndickson force-pushed the ethan/literal-header-settings branch 2 times, most recently from 46b4141 to 2638e0c Compare January 17, 2025 09:10
@ethanndickson ethanndickson force-pushed the ethan/nicer-login-form branch from f0465a3 to 5d97953 Compare January 17, 2025 09:18
@ethanndickson ethanndickson force-pushed the ethan/literal-header-settings branch from 2638e0c to 4b77803 Compare January 17, 2025 09:19
@@ -21,8 +21,7 @@ test:
-testPlan $(SCHEME) \
-skipPackagePluginValidation \
CODE_SIGNING_REQUIRED=NO \
CODE_SIGNING_ALLOWED=NO \
| LC_ALL="en_US.UTF-8" xcpretty
Copy link
Member Author

Choose a reason for hiding this comment

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

I was debugging a CI-only test failure and xcpretty was swallowing a helpful error log - xcbeautify seems like it provides better output in general for tests.

For context, the default xcodebuild output is thousands of lines, and not at all readable.

@ethanndickson ethanndickson marked this pull request as ready for review January 17, 2025 09:49
@ethanndickson ethanndickson force-pushed the ethan/literal-header-settings branch 2 times, most recently from c8ad579 to dc8972e Compare January 17, 2025 10:13
@@ -955,7 +998,7 @@
"$(inherited)",
"@executable_path/../Frameworks",
);
MACOSX_DEPLOYMENT_TARGET = 14.6;
MACOSX_DEPLOYMENT_TARGET = 14.0;
Copy link
Member Author

@ethanndickson ethanndickson Jan 17, 2025

Choose a reason for hiding this comment

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

We need to discuss what minimum macOS version we want to target. On one hand, an app like Tailscale supports versions as old as 11 from 2020, but on the other hand, I suspect most enterprises will be keeping their company devices on 14 or 15, though it'd be nice to know for sure.

Fortunately, we could set this value to 13 right now, which is the earliest version Apple still 'supports' (they don't really have a policy FWICT, but the pattern seems to be security updates for the last three versions)

The big feature in 14 SwiftData, is a Swift interface for a sqlite-backed app database. I messed around with it for this feature, but it's definitely overkill here. It might be super useful in the future?

@ethanndickson ethanndickson force-pushed the ethan/literal-header-settings branch from dc8972e to 85e0300 Compare January 17, 2025 10:26
@ethanndickson ethanndickson self-assigned this Jan 17, 2025
@ethanndickson ethanndickson force-pushed the ethan/nicer-login-form branch from 5d97953 to c3ea373 Compare January 22, 2025 05:24
@ethanndickson ethanndickson force-pushed the ethan/literal-header-settings branch from 8ae9c9f to e551166 Compare January 22, 2025 05:25
@ethanndickson ethanndickson requested a review from coadler January 22, 2025 10:56
@ethanndickson ethanndickson force-pushed the ethan/literal-header-settings branch from e551166 to a3adfc6 Compare January 23, 2025 02:46
@ethanndickson ethanndickson changed the base branch from ethan/nicer-login-form to main January 23, 2025 02:46
@ethanndickson ethanndickson merged commit fdb8545 into main Jan 23, 2025
1 check passed
@ethanndickson ethanndickson deleted the ethan/literal-header-settings branch January 23, 2025 02:48
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