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

Support proxy headers for CONNECT requests #1561

Closed
omribahumi opened this issue Jan 27, 2017 · 5 comments
Closed

Support proxy headers for CONNECT requests #1561

omribahumi opened this issue Jan 27, 2017 · 5 comments
Labels

Comments

@omribahumi
Copy link

Curl has been supporting this for a while (says here), and it is also possible with requests by overriding the proxy_headers() method of HTTPAdapter.

How hard would it be to implement this in aiohttp?

@omribahumi
Copy link
Author

Looks like this is the part of the code I need to modify:
https://github.com/KeepSafe/aiohttp/blob/add3bd9e32b0712dfaa4466194e165145a46e6d4/aiohttp/connector.py#L646

I can even implement this in my own connector.

@fafhrd91
Copy link
Member

seems you found solution

@dshoe1989
Copy link

Is there an official solution to this or is the suggested solution to just to create your own connector that extends TCPConnector and add support for it there?

@asvetlov
Copy link
Member

As workaround you could extend TCPConnector right now.
But if you would make a Pull Request with adding proxy_headers parameter to session.request() API -- you are welcome.
Honestly I feel the request is rare so I have no motivation for implementing it myself.

@lock
Copy link

lock bot commented Oct 28, 2019

This thread has been automatically locked since there has not been
any recent activity after it was closed. Please open a new issue for
related bugs.

If you feel like there's important points made in this discussion,
please include those exceprts into that new issue.

@lock lock bot added the outdated label Oct 28, 2019
@lock lock bot locked as resolved and limited conversation to collaborators Oct 28, 2019
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
Projects
None yet
Development

No branches or pull requests

4 participants