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
Http proxy fix #1562
Http proxy fix #1562
Conversation
@ashmeenkaur please make sure that this goes into master by Jan 8, 2024 to go into the January 2024 release. |
* fix http client to use proxy from environment * add unit tests * lint fix
* fix http client to use proxy from environment * add unit tests * lint fix
I'm trying to proxy requests through http://127.0.0.1:8082, however it still appears as though gcsfuse isn't respecting my http_proxy environment variables. I'm using miymproxy as my proxy server, and starting both processes as follows:
I have not fully configured the proxy server yet, so requests should return 502, however requests go through perfectly fine. I've tested this with the LSR and the release linked to this PR, both produce the same result. I've also tested uploading a file via I'm using Debian, and installing I set all 4 of these environment variables during the build:
Please let me know if I'm missing something. Many thanks. |
Re: #1562 (comment) Hi @ethan-crabb, Seems like Can you try setting the environment variables inline like the following?
On the console logs, you will see the following when environment variable is set properly:
Let me know if it works! If not, we can open a GitHub issue to investigate further. PS: I tried this on latest GCSFuse version (2.0.0). Thanks, |
Description
GCSFuse was not respecting
https_proxy
andhttp_proxy
environment variables. This was pointed out in bug #1541Setting http.ProxyFromEnvironment in the underlying http client fixes the issue. (Ref: Stackoverflow)
Link to the issue in case of a bug fix.
#1541
Testing details
Manual - I confirmed through manual checks that requests are successfully flowing through the proxy server, regardless of whetherGCSFuse is running in foreground or background mode.
Proxy server access logs:
Also verified that requests were not routed via proxy server before this change.
Unit tests - Added
Integration tests - Passed successfully
Perf tests - No regression