Skip to content

Conversation

@dpkp
Copy link
Owner

@dpkp dpkp commented Mar 14, 2025

Implement support for SOCKS5 proxies. Implement a new proxy wrapper that handles SOCKS5 connection, authentication and requesting connections to the actual Kafka broker endpoints.

The proxy can be configured via a new keyword argument socks5_proxy to consumers, producers or admin client. The value is URL with optional username and password. E.g.
socks5://user:secret@proxy.example.com:10800

The implementation is done in state machine that makes progress on repeated calls to connect_ex. The rationale with this bit strange design is to minimize amount of changes on the actual BrokerConnection object.

(rebase of #2169)

@dpkp dpkp force-pushed the hnousiainen/socks5_support branch 2 times, most recently from 83fc583 to 93c6871 Compare March 14, 2025 18:14
Implement support for SOCKS5 proxies. Implement a new proxy wrapper
that handles SOCKS5 connection, authentication and requesting
connections to the actual Kafka broker endpoints.

The proxy can be configured via a new keyword argument `socks5_proxy`
to consumers, producers or admin client. The value is URL with optional
username and password. E.g.
`socks5://user:secret@proxy.example.com:10800`

The implementation is done in state machine that makes progress on
repeated calls to connect_ex. The rationale with this bit strange
design is to minimize amount of changes on the actual BrokerConnection
object.
@dpkp dpkp force-pushed the hnousiainen/socks5_support branch from 93c6871 to 2e95c0b Compare March 14, 2025 20:04
@dpkp dpkp merged commit f7c234d into master Mar 14, 2025
16 checks passed
@dpkp dpkp deleted the hnousiainen/socks5_support branch March 14, 2025 20:27
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