-
-
Notifications
You must be signed in to change notification settings - Fork 239
fix: Use http_proxy config value directly in handler #893
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
dd65743 to
9ded305
Compare
src/config.rs
Outdated
| fn get_proxy_url(&self) -> Option<&str> { | ||
| self.ini.get_from(Some("http"), "proxy_url") | ||
| pub fn get_proxy_url(&self) -> Option<String> { | ||
| if env::var_os("proxy_url").is_some() { |
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.
That should be http_proxy IIRC, can you check?
| if env::var_os("proxy_url").is_some() { | |
| if env::var_os("http_proxy").is_some() { |
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.
Good catch, thanks. Also removed the env binding override, as it's not used anymore.
|
Were you able to test this with an actual proxy? |
|
Didn't have enough time yet. Just verified that appropriate data is picked up and passed to the request handler. |
|
@nodomain would you maybe find some time to use this build on your testing env? |
|
Works like a charm - it is picking up the proxy from the system. |
|
Awesome, thanks @nodomain |
Fixes #472
ref https://docs.rs/curl/0.4.34/curl/easy/struct.Easy2.html#method.proxy