-
Notifications
You must be signed in to change notification settings - Fork 105
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
WIP: SOCKS proxy support #51
Conversation
origin: Origin, | ||
proxy_origin: Origin, | ||
socks_version: str, | ||
user_id: bytes = b"httpcore", |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This is required by SOCKS4.
SOCKS5 will require username/password and likely defining acceptable authentication methods. Which makes me think we might want separate AsyncSOCKS4Connection
and AsyncSOCKS5Connection
.
I realize there's a fair bit of cleanup noise as well, sorry about that. Hopefully the important bits are clear. |
Yep, this branch predates the recent changes regarding proxies. Will update it soon. |
I think I'll hold off on this until we've decided if proxy modes are something we want at all. |
SOCKS5 is now supported in 0.14.5 - https://www.encode.io/httpcore/proxies/#socks-proxy-support (Not sure what we'd want to do about socks4, socks4a) |
Adds SOCKS4 proxy support via socksio 🎉
You can test this either locally using Dante via Docker as we do in socksio or simply running an
ssh -vND <PORT> <OTHER_MACHINE>
, then running the following script, assuming the proxy is running inlocalhost:1080
:Before I carry on with SOCKS4A and SOCKS5 (or possibly I should open a different PR?) I'd like some feedback.