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

httpx not playing along well with proxy with authentication #847

Closed
AntonioL opened this issue Mar 4, 2020 · 5 comments
Closed

httpx not playing along well with proxy with authentication #847

AntonioL opened this issue Mar 4, 2020 · 5 comments
Labels
duplicate This issue or pull request already exists proxies Issues related to HTTP and SOCKS proxies

Comments

@AntonioL
Copy link

AntonioL commented Mar 4, 2020

I am trying to use a NordVPN HTTP Proxy. One needs to supply user and password.

From reading the documentation of httpx it seems to me that the below should work but I am getting error code 407 which means that authentication definitely did not happen.

I can provide more information to troubleshoot if needed. I am not sure what is going on in there and what info would you need for that.

    proxy = httpx.Proxy(
        url=f"http://[username]%40[mail-domain]:[password]@{proxy}:80"
    )

    with httpx.Client(proxies=proxy, trust_env=False) as client:
        resp = client.get("https://www.gazzetta.it")
        print(resp.text)
@AntonioL
Copy link
Author

AntonioL commented Mar 4, 2020

Actually it seems similar to this issue:
#780

WIll try updating the httpx library.

@florimondmanca florimondmanca added the proxies Issues related to HTTP and SOCKS proxies label Mar 4, 2020
@florimondmanca
Copy link
Member

Closing as a duplicate of #779 for now, feel free to reopen if you come across any issues with the latest version of HTTPX. :)

@florimondmanca florimondmanca added the duplicate This issue or pull request already exists label Mar 4, 2020
@AntonioL
Copy link
Author

AntonioL commented Mar 4, 2020

I am using 0.11.1 version of the library.

I suspect that the fix in there did not make into a new package version, right?

@florimondmanca
Copy link
Member

florimondmanca commented Mar 4, 2020

Ah indeed, latest release is from Jan 17 (quite a while back now!), and #780 was merged on Jan 19.

Can you verify this is fixed on master? A new release should be coming soon (see #829), although it's a shame we didn't get to publish a point release for #780 back then.

@AntonioL
Copy link
Author

AntonioL commented Mar 4, 2020

Cool! Time to sharpen up my pip voodoo.

Thanks for the advice

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
duplicate This issue or pull request already exists proxies Issues related to HTTP and SOCKS proxies
Projects
None yet
Development

No branches or pull requests

2 participants