Skip to content

Add proxy support via environment variables #1175

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

Closed
apyrgio opened this issue May 29, 2020 · 5 comments
Closed

Add proxy support via environment variables #1175

apyrgio opened this issue May 29, 2020 · 5 comments
Labels
kind/feature Categorizes issue or PR as related to a new feature. lifecycle/rotten Denotes an issue or PR that has aged beyond stale and will be auto-closed.

Comments

@apyrgio
Copy link

apyrgio commented May 29, 2020

What is the feature and why do you need it:

Most programs detect that they must use a proxy by checking the http_proxy / https_proxy environment variables. See for example this section of requests on proxying: https://github.com/request/request#controlling-proxy-behaviour-using-environment-variables

This is not the case here though, as the user must explicitly override the .proxy argument of the Configuration class, in order to enable proxying.

self.proxy = None

Describe the solution you'd like to see:

The Configuration class should auto-detect the appropriate environment variables and pass them to urllib3, given that urllib3 has chosen not to do it (urllib3/urllib3#1785). If this proposal makes sense, I could open a PR.

@apyrgio apyrgio added the kind/feature Categorizes issue or PR as related to a new feature. label May 29, 2020
@roycaihw
Copy link
Member

roycaihw commented Jun 9, 2020

The Configuration class is generated by openapi-generator: https://github.com/OpenAPITools/openapi-generator/blob/master/modules/openapi-generator/src/main/resources/python/configuration.mustache. Could you file an issue in openapi-generator to propose adding the behavior?

@apyrgio
Copy link
Author

apyrgio commented Jun 25, 2020

Nice, thanks for pointing me to the template for this class.
So, I've opened an issue to OpenAPI (OpenAPITools/openapi-generator#6786). You can close this issue if you want to, or keep it open to track the progress of the OpenAPI issue.

@fejta-bot
Copy link

Issues go stale after 90d of inactivity.
Mark the issue as fresh with /remove-lifecycle stale.
Stale issues rot after an additional 30d of inactivity and eventually close.

If this issue is safe to close now please do so with /close.

Send feedback to sig-testing, kubernetes/test-infra and/or fejta.
/lifecycle stale

@k8s-ci-robot k8s-ci-robot added the lifecycle/stale Denotes an issue or PR has remained open with no activity and has become stale. label Sep 23, 2020
@fejta-bot
Copy link

Stale issues rot after 30d of inactivity.
Mark the issue as fresh with /remove-lifecycle rotten.
Rotten issues close after an additional 30d of inactivity.

If this issue is safe to close now please do so with /close.

Send feedback to sig-testing, kubernetes/test-infra and/or fejta.
/lifecycle rotten

@k8s-ci-robot k8s-ci-robot added lifecycle/rotten Denotes an issue or PR that has aged beyond stale and will be auto-closed. and removed lifecycle/stale Denotes an issue or PR has remained open with no activity and has become stale. labels Oct 23, 2020
@apyrgio
Copy link
Author

apyrgio commented Nov 2, 2020

Closing this issue since this is something that should be resolved on the OpenAPI side (I haven't done so yet though).

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
kind/feature Categorizes issue or PR as related to a new feature. lifecycle/rotten Denotes an issue or PR that has aged beyond stale and will be auto-closed.
Projects
None yet
Development

No branches or pull requests

4 participants