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

Add --disable-proxy option #6349

Merged
merged 1 commit into from
Jul 21, 2023
Merged

Conversation

ryanbrainard
Copy link
Contributor

Fixes # #6348

This change adds a disable-proxy option (set by --disable-proxy flag, CS_DISABLE_PROXY=1 or
CS_DISABLE_PROXY=true, or disable-proxy config), which disables the proxy routes to forwarded ports, including
the domain and path proxy routes over HTTP and WebSockets.

Note, it does not patch VS Code itself to block the auto port forwarding, but that can be disabled with remote.autoForwardPorts=false. Generally, these two features would be used together, but I didn't want to tightly couple them.

@ryanbrainard ryanbrainard requested a review from a team as a code owner July 21, 2023 19:16
@codecov
Copy link

codecov bot commented Jul 21, 2023

Codecov Report

Merging #6349 (c9cca31) into main (5c19962) will increase coverage by 0.01%.
The diff coverage is 80.00%.

Additional details and impacted files

Impacted file tree graph

@@            Coverage Diff             @@
##             main    #6349      +/-   ##
==========================================
+ Coverage   73.67%   73.68%   +0.01%     
==========================================
  Files          31       31              
  Lines        1869     1885      +16     
  Branches      401      406       +5     
==========================================
+ Hits         1377     1389      +12     
- Misses        415      419       +4     
  Partials       77       77              
Impacted Files Coverage Δ
src/node/routes/domainProxy.ts 49.05% <33.33%> (-1.93%) ⬇️
src/node/http.ts 71.42% <85.71%> (+0.62%) ⬆️
src/node/cli.ts 90.87% <100.00%> (+0.06%) ⬆️
src/node/routes/pathProxy.ts 83.33% <100.00%> (+1.19%) ⬆️

Continue to review full report in Codecov by Sentry.

Legend - Click here to learn more
Δ = absolute <relative> (impact), ø = not affected, ? = missing data
Powered by Codecov. Last update 070a5a3...c9cca31. Read the comment docs.

Copy link
Member

@code-asher code-asher left a comment

Choose a reason for hiding this comment

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

Thank you! Implementation and tests look flawless.

Generally, these two features would be used together, but I didn't want to tightly couple them.

Good call, there are cases where they are used separately so this is perfect.

@code-asher code-asher merged commit 74da516 into coder:main Jul 21, 2023
10 checks passed
@ryanbrainard
Copy link
Contributor Author

@code-asher Thanks for the quick merge! Any idea when this change will be released?

@code-asher
Copy link
Member

code-asher commented Jul 27, 2023

We generally have a monthly release cadence, usually as soon as we merge the latest Code release from upstream. This PR just barely missed the previous release so if we wait it would be released next month (sans a patch release upstream) but I am not opposed to doing another release in the meantime if it seems urgent.

@ryanbrainard
Copy link
Contributor Author

@code-asher It's not super urgent, but since this is related to security/authentication, it's something we'd like to be able to deploy soon. If it's not too much trouble, doing another release would be appreciated.

@code-asher
Copy link
Member

No problem, seems reasonable to me. Our usual pattern is to put out an RC and then promote the release the next day if nothing goes wrong so I will go ahead and do that now.

@ryanbrainard
Copy link
Contributor Author

@code-asher awesome, thank you!

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