Skip to content
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

[Feature] implement trust_env #345

Open
rknyip opened this issue Jul 9, 2024 · 2 comments
Open

[Feature] implement trust_env #345

rknyip opened this issue Jul 9, 2024 · 2 comments
Assignees
Labels
enhancement New feature or request
Milestone

Comments

@rknyip
Copy link

rknyip commented Jul 9, 2024

Is your feature request related to a problem? Please describe.
It seems that requests.Session(trust_env=False) is not implemented, from my test and your code. I suppose it is possible cuz --noproxy can be provided to curl command.

Describe the solution you'd like
Grateful for implementing it.

Describe alternatives you've considered
unset and recover os.environ which causes inconvenience.

Additional context
Nope.

@rknyip rknyip added the enhancement New feature or request label Jul 9, 2024
@perkfly
Copy link
Collaborator

perkfly commented Jul 10, 2024

It's more than setting CURLOPT_NOPROXY, since this option does not only override http_proxy, but also override the proxy you specified inside the program.

(lib)curl always checks environment variables, to fix this, we have to dig into and patch the C code again. It will take a while.

@perkfly
Copy link
Collaborator

perkfly commented Jul 10, 2024

If you don't want any proxies, you can simply set curl_options={CurlOpt.NOPROXY: "*"}.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

No branches or pull requests

2 participants