Check a no-auth socks5 proxy running on localhost's 18887 port with netcat.

Hongyi Zhao hongyi.zhao at gmail.com
Wed May 27 02:20:25 UTC 2020


Hi,

I try to check a no-auth socks5 proxy running on localhost's 18887
port with netcat.

Based on the notes here:
https://stackoverflow.com/questions/52530515/how-use-netcat-to-test-socks5-server

I obtained the following two usages:

$ printf "\x05\x01\x00\r\n" | nc 127.0.0.1 18887 | hd
00000000  05 00 05 07 00 01                                 |......|
00000006

Does the first field represent serial number?

And I also do the following test:

werner at ubuntu-01:~$ printf "\x05\x01\x00\r\n" |
/usr/bin/nc.traditional 127.0.0.1 18887 -o out.txt
werner at ubuntu-01:~$ cat out.txt
> 00000000 05 01 00 0d 0a                                  # .....
< 00000000 05 00                                           # ..
< 00000002 05 07 00 01                                     # ....

Why the first two lines in the output have the same value for the first field?

Regards
-- 
Hongyi Zhao <hongyi.zhao at gmail.com>


More information about the freebsd-net mailing list