-
-
Notifications
You must be signed in to change notification settings - Fork 1.1k
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
Try to make reqwest use system proxies. #547
Conversation
Oh, no...The tests for |
@seanmonstar Sorry for the disturb :( I should check my testing code more carefully. And finally it's ready to review. I hope it can help to solve the issue. |
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.
Just some small things I would change.
Also you might wanna run rusts formater fmt
and check clippy.
Otherwise thanks for implementing features 😃
Thanks for your suggestion, especially But I don't think I need to run rusts formatter Also notice that |
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.
Excellent progress, thank you! I've left some thoughts inline.
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 good! And I think the defaults are correct, for now. Suddenly using the system proxies in a patch upgrade could be surprising. I think we can change the default to looking for system proxies in the next breaking change.
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.
Woo! Thanks for keeping with this to the end, this'll be great!
Ah, would you be able to rebase master onto this branch? I can't merge because there are conflicts... |
…try to use lock to avoid env operation problem.
…s run un-parallel.
…w, and add no_proxy method
I have rebase it, would you please try again ? I'm happy to have a chance to contribute it :D |
Try to resolve issue #403
The core function for this feature is
get_proxies()
, which is a copy frompython
getproxies implementation.Some consideration about the design:
After looking the
getproxies
implementation in python, I don't whink we need to use something like [env_proxy] crate, because it doesn't supportwindows system
. So I implement it once again.. And this version ofgetproxies
should work onwindows
andlinux
.Something about testing
In
windows
system, because the proxy setting is configured fromregistry
. I just do manually testing for this scenario. (I have implemented it in another place first)I'm afraid the testing code may break
windows registry setting
. It can be a very big problem. So I just leave it away :(