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

adding proxy auth to pypub #24

Open
wants to merge 1 commit into
base: master
Choose a base branch
from

Conversation

imakelists
Copy link

Adding proxy authentcation to pypub

@imgurbot12
Copy link
Owner

imgurbot12 commented Dec 22, 2024

Hey @imakelists, thanks for your interest in the project.

Unfortunately switching from urllib.request to requests is not a simple switch, and using urllib.request was very intentional since it supports additional schemes like file:// which may sometimes be required whilst requests does not support this out of the box.

Additionally, urllib already supports http-proxies according to the existing documentation: https://docs.python.org/3.8/howto/urllib2.html#proxies

In fact, you can pass proxy settings via env-variable using HTTP_PROXY with the included authentication and it should be automatically parsed and included in the associated requests without any modification to the existing code.

If you'd still like to do it programatically I'd ask you to use urllib's ProxyHandler if possible please. Lmk if you have any questions or concerns. Thanks :)

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

Successfully merging this pull request may close these issues.

2 participants