-
Notifications
You must be signed in to change notification settings - Fork 12
Add http proxy support to extension host #36
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
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Looks great! No concerns just one clarifying question.
* @author coder | ||
*/ | ||
export async function monkeyPatchHttpAgent(): Promise<void> { | ||
if (process.env.http_proxy || process.env.https_proxy || process.env.HTTP_PROXY || process.env.HTTPS_PROXY) { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Do we need to add no_proxy
as an option?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Nope, no_proxy
is for specifying exceptions; the proxy agent module will check no_proxy
when making a request to see whether it should send through the proxy or not.
If http_proxy
and friends are not set then no_proxy
has no effect.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Oh! I see now. Thanks for clarifying!
Uh...apparently this already works. I removed my changes to confirm but everything works exactly the same. I cannot seem to find how they are doing this so I am not sure if I am just doing something dumb like not properly recompiling. |
Lol out of curiosity, how are you testing this? |
i am running https://github.com/coder/vscode-coder since it makes a download request to fetch the Coder CLI. Then I run |
I confirmed it works in the latest artifact built by CI...I still have not located where this happens but I guess for now we are good to move on.
|
Nice thorough testing! Well, I'll leave that issue in code-server open and move it to the next version milestone then! |
For coder/code-server#4672
I tested it with our extension (which downloads the Coder CLI) and confirmed it works. Once I finish my test extension PR I will add a test for the proxy there as well.