Spec for net/listeners/* doesn't cover socket files
Hi Nick. I'm expanding stem to take advantage of the 'GETINFO net/listener/*' options. Presently the spec simply says...
"net/listeners/or"
"net/listeners/dir"
"net/listeners/socks"
"net/listeners/trans"
"net/listeners/natd"
"net/listeners/dns"
"net/listeners/control"
A space-separated list of the addresses at which Tor is listening for
connections of each specified type. [New in Tor 0.2.2.26-beta.]
Output is usually a quoted, space separated listing of 'address:port', such as...
% telnet localhost 9051
Trying 127.0.0.1...
Connected to localhost.
Escape character is '^]'.
AUTHENTICATE
250 OK
GETINFO net/listeners/control
250-net/listeners/control="127.0.0.1:9051"
250 OK
This led me to believe that the output would always be IPv4 address and port tuples. However, turned out that for control sockets it's different...
% socat UNIX-CONNECT:/tmp/tor/socket STDIN
AUTHENTICATE
250 OK
GETINFO net/listeners/control
250-net/listeners/control="unix:/tmp/tor/socket"
250 OK
It would be nice if the spec better detailed what callers can expect to receive. Another question I have is if tor will always use '127.0.0.1' for localhost - I thought I recalled seeing '0.0.0.0' at one point but I might be misremembering.
Cheers! -Damian