brook icon indicating copy to clipboard operation
brook copied to clipboard

socks5 doesn't use bindIP or socks5 IP for outgoing connections

Open peps1 opened this issue 2 years ago • 1 comments

Please read the document first

  • https://txthinking.github.io/brook/ ✅

Please describe step by step any commands and operations you have performed, environment and version:

In this scenario, server has 2 IP addresses

Primary: 1.2.3.4 Secondary: 1.2.3.100

I want to run the socks5 server only on the 1.2.3.100 IP and use that IP for all outgoing connections

Brook version

# brook --version
Brook version 20210701

Brook command

brook --debug socks5 --bindip 1.2.3.100 --socks5 1.2.3.100:9999 --username user --password pass

Network info

The interface as taken from ip a

2: eno1: <BROADCAST,MULTICAST,UP,LOWER_UP> mtu 1500 qdisc htb state UP group default qlen 1000
    link/ether 8a:3a:9a:1a:ba:2a brd ff:ff:ff:ff:ff:ff
    inet 1.2.3.4/24 brd 1.2.3.255 scope global eno1
       valid_lft forever preferred_lft forever
    inet 1.2.3.100/32 scope global eno1:0
       valid_lft forever preferred_lft forever

Curl command to reproduce

curl -x socks5h://user:[email protected]:9999 https://ifconfig.co

Current output

1.2.3.4

Expected output

1.2.3.100

peps1 avatar Aug 18 '21 20:08 peps1

I also encountered the same problem seeking a solution.

jackkam85 avatar Oct 27 '21 13:10 jackkam85

v20230404

txthinking avatar Apr 08 '23 07:04 txthinking