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

Implement socks5 proxy support using socksio #188

Closed

Conversation

cdeler
Copy link
Member

@cdeler cdeler commented Sep 17, 2020

The final draft PR for encode/httpx#203 (I closed previous). It's based on #51, I added @yeraydiazdiaz to co-authored-by

What I did:

  1. added pproxy as a dev. dependency to have a local socks proxy server
  2. added AsyncSOCKSConnection and SyncSOCKSConnection. For now it handles only socks5-without-auth connections

@cdeler cdeler marked this pull request as draft September 17, 2020 18:04
@cdeler cdeler changed the title Implement socks proxy using socksio WIP Implement socks proxy using socksio Sep 17, 2020
Copy link
Member

@florimondmanca florimondmanca left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Nice start! Curious if CI passes with this setup 👀

httpcore/_async/connection.py Outdated Show resolved Hide resolved
@cdeler cdeler force-pushed the implement-socks-proxy-using-socksio branch 3 times, most recently from ca5a733 to ca73293 Compare September 18, 2020 15:16
@cdeler
Copy link
Member Author

cdeler commented Sep 18, 2020

Well, I mostly implemented socks5 proxy support. Now I want to think up what to do with socks4

May be it's better to do it in another PR..?

@cdeler cdeler marked this pull request as ready for review September 18, 2020 15:24
@cdeler cdeler changed the title WIP Implement socks proxy using socksio Implement socks5 proxy support using socksio Sep 18, 2020
@cdeler cdeler requested a review from a team September 18, 2020 15:34
@cdeler cdeler marked this pull request as draft September 21, 2020 11:45
@cdeler
Copy link
Member Author

cdeler commented Sep 21, 2020

Converted back to draft until socks4 proxy support has been added (then we can split the PR into chunks)

@cdeler cdeler force-pushed the implement-socks-proxy-using-socksio branch from f6da5c4 to 4618f88 Compare October 2, 2020 18:52
@cdeler
Copy link
Member Author

cdeler commented Oct 2, 2020

I reworked this draft PR according to the @tomchristie 's comment: link

So that right now (A)syncSocksProxy is the wrapper over the (A)syncConnectionPool

The next step I want to do is to merge #199 (it's a PR about migrating http proxy suite from mitmproxy to pproxy)

PS for now this draft is only about socks5 proxy

@tomchristie
Copy link
Member

Now supported in 0.14.5 - https://www.encode.io/httpcore/proxies/#socks-proxy-support

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.

3 participants