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

credentials for http proxy when using default_urllb3_manager() #1227

Closed
jelmer opened this issue Oct 26, 2023 · 2 comments
Closed

credentials for http proxy when using default_urllb3_manager() #1227

jelmer opened this issue Oct 26, 2023 · 2 comments
Labels

Comments

@jelmer
Copy link
Owner

jelmer commented Oct 26, 2023

I need to clone a git+https:// repo behind an HTTP proxy. Unfortunately, Poetry will rely on the default urllib3.PoolManager generated by default_urllib3_manager() (code). And that default generator misses a critical part: it won't populate the credentials in the proxy_header parameter.

This is a critical part because HTTPS over HTTP proxy requires tunneling (see urllib3 implementation connection_requires_http_tunnel() here)

... and when using tunneling, the proxy credentials should be in Proxy-Authorization: Basic XXXX header. Otherwise it is nowhere else.

Suggestion: when proxy_url contains a username+password => populate the proxy_header with Proxy-Authorization: Basic XXXX

Originally posted by @raphaeljoie in #822 (comment)

@jelmer jelmer changed the title Because Poetry relies on Dulwich, I kind of have the same issue. credentials for http proxy when using default_urllb3_manager() Oct 26, 2023
@jelmer
Copy link
Owner Author

jelmer commented Oct 26, 2023

We're passing proxy_url (including any credentials) to ProxyManager. If the authentication header needs to be constructed manually, happy to merge a PR that splits the URL and passes proxy_headers.

@jelmer jelmer added the bug label Oct 26, 2023
@mallport
Copy link

We have the same issue here. Would be great if this was addressed.

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

No branches or pull requests

2 participants