-
Notifications
You must be signed in to change notification settings - Fork 5.9k
Internal proxy server doesn't work if http proxy is set #3662
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
Comments
hey! thanks a lot @mfukala for this workaround! it would have taken me hours to come up with such a solution. I can confirm that setting an environment variable like Are there any ideas how to solve this? Or is this part of the investigation in #3841? |
Thank you for the detailed notes, explanation of how to test and solution for fixing
I guess it is part of that investigation now! The plan is to add more tests for that part of the codebase. So now, we can fix that issue and add a test thanks to @mfukala's work! |
I can't promise when we will get to this, but I'll move it to "On Deck" meaning it's ready to be placed in an upcoming version milestone. |
This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no activity occurs in the next 5 days. |
@jsjoeio do you know if this has been solved? I must admit that I did but test it within the past couple of months |
@Chilipp I haven't tested it recently (or implemented a fix specifically). So you're saying you did test it and it's fixed? Otherwise, I wonder if you can simplify the repro steps and I can test |
Closing for inactivity. But also this might be OK now? I think we only monkey patch in the code-server process, not in the extension host. |
Internal code-server's proxy for accessing services doesn't work if http proxy is configured.
Test case:
Following code calls itself in an endless loop:
The reason is monkey patching of http(s).globalAgent done in
proxy_agent.js
.The code in
node_modules/proxy-agent/index.js
(#httpOrHttps) is supposed to return bare http(s).globalAgent in case the processed http request is not supposed to be proxied but it returns the monkey patched instance which is the initiator of the call.A very ugly workaround is to ensure proxy_agent#shouldEnableProxy returns false by adding "example.com" to no_proxy as the code comment suggests :-)
The text was updated successfully, but these errors were encountered: