Although this looks like a bug, some developers argue how it complies perfectly with the RFC.
I wrote a simple C++ program on Linux which connects to a HTTP web-page and reads its contents over Tor. I start a tor service using this command:
tor --ignore-missing-torrc -f / --SocksPort auto --DataDirectory $HOME/tren/tor_0
$HOME/tren
is just a directory I mount as tmpfs
(btw, the same happens even if I only run tor
). Tor connects successfully and I can use its socket. Now my program negotiates with the port like this:
I send {5,1,0}
SOCKS5 sends {5,0}
I send {5,1,0,3,17,www.icanhazip.com,0,80}
SOCKS5 sends {5,0,0,1,0,0,0,0,0,0}
This domain name address is written byte by byte, without null termiation. Why is my SOCKS5 responding with 0 address? If I connect to the web-site using it's IPv4 that I resolve locally, the same happens. I try requesting HTTP page and it responds properly.
I am using Arch and I have installed it's official tor
package.
EDIT: I deleted my code as it was incomplete and far from 'minimal'