wzshiming / bridge

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

Assigning multiple proxies for a rule #5

Closed DefiDebauchery closed 2 years ago

DefiDebauchery commented 2 years 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 2 years 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 2 years ago

Greatly appreciated, thank you for the response!