Skip to content

Issue 498/support auto proxy connector http+https+socks5+socks5h#659

Merged
soundofspace merged 13 commits into
mainfrom
issue-498/support-auto-proxy-connector-http+https+socks5+socks5h
Aug 9, 2025
Merged

Issue 498/support auto proxy connector http+https+socks5+socks5h#659
soundofspace merged 13 commits into
mainfrom
issue-498/support-auto-proxy-connector-http+https+socks5+socks5h

Conversation

@soundofspace

@soundofspace soundofspace commented Aug 6, 2025

Copy link
Copy Markdown
Collaborator
  • Adds socks5(h) support to EasyWebClient
    • Add proxy connector that supports both http and socks5 proxies and delegates to a specific connector depending on proxy protocol
    • Kept this connector specific (read: not generic) to our HttpProxyConnector/Socks5ProxyConnector since this is used for EasyWebClientBuilder specifically and saw no real value in making this generic. For special use cases we already support bringing a custom proxy connector
    • Another option was also. Currently you can configure existing ProxyConnectors in optional mode which forwards traffic to inner one if proxy is not configured. I could have modified this to also forward traffic to inner svc if Proxy protocol was wrong instead of returning error like we do now, but this felt ugly and error prone in the long run
    • Right now I focussed on http(s) + socks5(h) only, not a generic amount of proxy connectors. Once we add one more I have some "scalable" ideas for this but didn't want to overcomplicate the current setup for something we might not support for quite some time
  • Move EasyWebClient to rama crate as now its not specific to http anymore
  • Move autobahn example to rama examples so it can use EasyWebClient

@soundofspace soundofspace force-pushed the issue-498/support-auto-proxy-connector-http+https+socks5+socks5h branch from 041802f to 6679262 Compare August 7, 2025 07:17
@soundofspace soundofspace requested a review from GlenDC August 7, 2025 08:27
@soundofspace soundofspace self-assigned this Aug 7, 2025
@soundofspace soundofspace marked this pull request as ready for review August 7, 2025 08:27
@soundofspace soundofspace linked an issue Aug 7, 2025 that may be closed by this pull request

@GlenDC GlenDC left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

Looks good. Only have some minor / nitpick comments. I would still like these to be resolved, but the work is excellent. Thanks a lot! Wonderful addition.

Only thing I see missing here that I would have still expected to be in scope for this PR is that you did not remove yet the manual clients in socks5 tests where now you can just use the regular runner client that is part of the example utils. Right?

Comment thread tests/integration/cli/cli_tests/http_echo.rs Outdated
Comment thread src/http/client/proxy_connector.rs Outdated
Comment thread src/http/client/proxy_connector.rs
Comment thread src/http/client/proxy_connector.rs Outdated
Comment thread src/http/client/mod.rs
Comment thread src/http/client/mod.rs
Comment thread src/http/client/builder.rs Outdated
Comment thread src/http/client/builder.rs
Comment thread src/http/client/builder.rs Outdated
@soundofspace soundofspace requested a review from GlenDC August 7, 2025 20:40

@GlenDC GlenDC left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

LGTM, couple of last remarks but these are details that you can probably resolve without any controversy and merge it yourself afterwards if you have the confidence.

Comment thread src/http/client/builder.rs
Comment thread src/http/client/proxy_connector.rs
Comment thread tests/integration/examples/example_tests/proxy_connectivity_check.rs Outdated
@soundofspace soundofspace merged commit 180def2 into main Aug 9, 2025
35 checks passed
@soundofspace soundofspace deleted the issue-498/support-auto-proxy-connector-http+https+socks5+socks5h branch August 9, 2025 07:38
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.

support auto proxy connector http+https+socks5+socks5h

2 participants