wzshiming / bridge

Bridge is a multi-level proxy that supports clients and servers with multiple protocols. SSHProxy, HTTPProxy, Socks4, Socks5, Shadowsocks.
MIT License
158 stars 15 forks source link

Assigning multiple proxies for a rule #5

Closed DefiDebauchery closed 1 year ago

DefiDebauchery commented 1 year ago

Thanks for the useful program, this is very cool!

Is it possible to configure multiple proxies for a route? Maybe something like bridge -b :8080 -p - -p socks5://server1:1080,socks5://server2:1080,socks5://server3:1080 where it would be either random or round-robin.

There are actually several use-cases I could see here, from geo-based endpoint monitoring to load-balancing when using multi-slot downloaders like axel.

wzshiming commented 1 year ago

This already has a round-robin, use | instead of , bridge -b :8080 -p - -p 'socks5://server1:1080|socks5://server2:1080|socks5://server3:1080'

Be sure to wrap it in single quotes, otherwise it will be recognized as a pipe by the shell.

DefiDebauchery commented 1 year ago

Greatly appreciated, thank you for the response!