On Friday, November 5, 2021 at 1:51:54 PM UTC+8, Grant Taylor wrote:
> On 11/4/21 11:21 PM,
hongy...@gmail.com wrote:
> > Thank you ...
>
> You're welcome.
The official socat release does not support socks5 proxy, so I compiled the version here [1] with the following commands:
$ sudo apt build-dep socat
$ sudo apt install yodl
$ autoreconf -vfi
$ ./configure
$ make -j44
$ sudo make install
Then I test the problem discussed here with the following command from my VPS:
$ socat -v -d -d TCP4-LISTEN:8888,fork,reuseaddr socks5:127.0.0.1:10.8.10.220:2021,socksport=6001
Additional note above the above command:
127.0.0.1:6001 is the socks5 proxy server running on vps which can access the intranet website:
10.8.10.220:2021
Then I try to open
http://127.0.0.1:8888 using Firefox running on the vps, but I meet the following error reproted by socat:
$ socat -v -d -d TCP4-LISTEN:8888,fork,reuseaddr socks5:127.0.0.1:10.8.10.220:2021,socksport=6001
2021/11/05 15:00:30 socat[1303141] N listening on AF=2
0.0.0.0:8888
2021/11/05 15:00:38 socat[1303141] N accepting connection from AF=2
127.0.0.1:60354 on AF=2
127.0.0.1:8888
2021/11/05 15:00:38 socat[1303141] N forked off child process 1313292
2021/11/05 15:00:38 socat[1303141] N listening on AF=2
0.0.0.0:8888
2021/11/05 15:00:38 socat[1313292] E parseopts(): option "socksport" not supported with this address type
2021/11/05 15:00:38 socat[1313292] N exit(1)
2021/11/05 15:00:38 socat[1303141] N childdied(): handling signal 17
2021/11/05 15:00:38 socat[1303141] N accepting connection from AF=2
127.0.0.1:60372 on AF=2
127.0.0.1:8888
2021/11/05 15:00:38 socat[1303141] N forked off child process 1313455
2021/11/05 15:00:38 socat[1303141] N listening on AF=2
0.0.0.0:8888
2021/11/05 15:00:38 socat[1313455] E parseopts(): option "socksport" not supported with this address type
2021/11/05 15:00:38 socat[1313455] N exit(1)
2021/11/05 15:00:38 socat[1303141] N childdied(): handling signal 17
2021/11/05 15:00:39 socat[1303141] N accepting connection from AF=2
127.0.0.1:60486 on AF=2
127.0.0.1:8888
2021/11/05 15:00:39 socat[1303141] N forked off child process 1314891
2021/11/05 15:00:39 socat[1303141] N listening on AF=2
0.0.0.0:8888
2021/11/05 15:00:39 socat[1314891] E parseopts(): option "socksport" not supported with this address type
2021/11/05 15:00:39 socat[1314891] N exit(1)
2021/11/05 15:00:39 socat[1303141] N childdied(): handling signal 17
2021/11/05 15:00:39 socat[1303141] N accepting connection from AF=2
127.0.0.1:60488 on AF=2
127.0.0.1:8888
2021/11/05 15:00:39 socat[1303141] N forked off child process 1314906
2021/11/05 15:00:39 socat[1303141] N listening on AF=2
0.0.0.0:8888
2021/11/05 15:00:39 socat[1314906] E parseopts(): option "socksport" not supported with this address type
2021/11/05 15:00:39 socat[1314906] N exit(1)
2021/11/05 15:00:39 socat[1303141] N childdied(): handling signal 17
2021/11/05 15:00:39 socat[1303141] N accepting connection from AF=2
127.0.0.1:60490 on AF=2
127.0.0.1:8888
2021/11/05 15:00:39 socat[1303141] N forked off child process 1314907
2021/11/05 15:00:39 socat[1303141] N listening on AF=2
0.0.0.0:8888
2021/11/05 15:00:39 socat[1314907] E parseopts(): option "socksport" not supported with this address type
2021/11/05 15:00:39 socat[1314907] N exit(1)
2021/11/05 15:00:39 socat[1303141] N childdied(): handling signal 17
2021/11/05 15:00:39 socat[1303141] N accepting connection from AF=2
127.0.0.1:60492 on AF=2
127.0.0.1:8888
2021/11/05 15:00:39 socat[1303141] N forked off child process 1314910
2021/11/05 15:00:39 socat[1303141] N listening on AF=2
0.0.0.0:8888
2021/11/05 15:00:39 socat[1314910] E parseopts(): option "socksport" not supported with this address type
2021/11/05 15:00:39 socat[1314910] N exit(1)
2021/11/05 15:00:39 socat[1303141] N childdied(): handling signal 17
2021/11/05 15:00:39 socat[1303141] N accepting connection from AF=2
127.0.0.1:60494 on AF=2
127.0.0.1:8888
2021/11/05 15:00:39 socat[1303141] N forked off child process 1314913
2021/11/05 15:00:39 socat[1303141] N listening on AF=2
0.0.0.0:8888
2021/11/05 15:00:39 socat[1314913] E parseopts(): option "socksport" not supported with this address type
2021/11/05 15:00:39 socat[1314913] N exit(1)
2021/11/05 15:00:39 socat[1303141] N childdied(): handling signal 17
2021/11/05 15:00:39 socat[1303141] N accepting connection from AF=2
127.0.0.1:60496 on AF=2
127.0.0.1:8888
2021/11/05 15:00:39 socat[1303141] N forked off child process 1314914
2021/11/05 15:00:39 socat[1303141] N listening on AF=2
0.0.0.0:8888
2021/11/05 15:00:39 socat[1314914] E parseopts(): option "socksport" not supported with this address type
2021/11/05 15:00:39 socat[1314914] N exit(1)
2021/11/05 15:00:39 socat[1303141] N childdied(): handling signal 17
2021/11/05 15:00:39 socat[1303141] N accepting connection from AF=2
127.0.0.1:60498 on AF=2
127.0.0.1:8888
2021/11/05 15:00:39 socat[1303141] N forked off child process 1314918
2021/11/05 15:00:39 socat[1303141] N listening on AF=2
0.0.0.0:8888
2021/11/05 15:00:39 socat[1314918] E parseopts(): option "socksport" not supported with this address type
2021/11/05 15:00:39 socat[1314918] N exit(1)
2021/11/05 15:00:39 socat[1303141] N accepting connection from AF=2
127.0.0.1:60500 on AF=2
127.0.0.1:8888
2021/11/05 15:00:39 socat[1303141] N forked off child process 1314919
2021/11/05 15:00:39 socat[1303141] N childdied(): handling signal 17
2021/11/05 15:00:39 socat[1303141] N listening on AF=2
0.0.0.0:8888
2021/11/05 15:00:39 socat[1314919] E parseopts(): option "socksport" not supported with this address type
2021/11/05 15:00:39 socat[1314919] N exit(1)
2021/11/05 15:00:39 socat[1303141] N childdied(): handling signal 17
2021/11/05 15:00:39 socat[1303141] N accepting connection from AF=2
127.0.0.1:60502 on AF=2
127.0.0.1:8888
2021/11/05 15:00:39 socat[1303141] N forked off child process 1314922
2021/11/05 15:00:39 socat[1303141] N listening on AF=2
0.0.0.0:8888
2021/11/05 15:00:39 socat[1314922] E parseopts(): option "socksport" not supported with this address type
2021/11/05 15:00:39 socat[1314922] N exit(1)
2021/11/05 15:00:39 socat[1303141] N childdied(): handling signal 17
2021/11/05 15:00:39 socat[1303141] N accepting connection from AF=2
127.0.0.1:60504 on AF=2
127.0.0.1:8888
2021/11/05 15:00:39 socat[1303141] N forked off child process 1314923
2021/11/05 15:00:39 socat[1303141] N listening on AF=2
0.0.0.0:8888
2021/11/05 15:00:39 socat[1314923] E parseopts(): option "socksport" not supported with this address type
2021/11/05 15:00:39 socat[1314923] N exit(1)
2021/11/05 15:00:39 socat[1303141] N childdied(): handling signal 17
2021/11/05 15:00:39 socat[1303141] N accepting connection from AF=2
127.0.0.1:60506 on AF=2
127.0.0.1:8888
2021/11/05 15:00:39 socat[1303141] N forked off child process 1314926
2021/11/05 15:00:39 socat[1303141] N listening on AF=2
0.0.0.0:8888
2021/11/05 15:00:39 socat[1314926] E parseopts(): option "socksport" not supported with this address type
2021/11/05 15:00:39 socat[1314926] N exit(1)
2021/11/05 15:00:39 socat[1303141] N childdied(): handling signal 17
[1]
https://github.com/runsisi/socat
HZ