Dear HAProxy community,
I’m currently configuring HAProxy for a SOCKS5 proxy setup, particularly to handle connections to websites like https://claude.ai. I have the following configuration:
listen socks5
bind 0.0.0.0:16667
balance source
hash-type consistent
stick-table type ip size 1m expire 60m
stick on src
My questions are:
-
Is it necessary or beneficial to use both
balance source
andstick on src
in this configuration? -
What are the implications of using these directives together? Do they complement each other, or is one redundant?
-
Given that I’m using
hash-type consistent
, how does this interact with thebalance source
andstick on src
directives? -
For a SOCKS5 proxy setup, especially when dealing with websites that might require session persistence, what would be the recommended configuration?
-
Are there any potential drawbacks or performance implications of using this combination of directives?
I would greatly appreciate any insights or best practices you could share regarding this configuration.
See Necessity of using both 'balance source' and 'stick on src' in HAProxy configuration. · Issue #2703 · haproxy/haproxy · GitHub for the related discussion.
Thank you for your time and expertise.
Best regards,
Zhao