-----BEGIN PGP SIGNED MESSAGE----- Hash: SHA512
Dear Tor Developers,
According to the Tor manual: https://www.torproject.org/docs/tor-manual-dev.html.en
DisableNetwork 0|1 When this option is set, we don’t listen for or accept any connections other than controller connections, and we close (and don’t reattempt) any outbound connections. Controllers sometimes use this option to avoid using the network until Tor is fully configured. (Default: 0)
However, it seems when DisableNetwork is set to 1, /var/run/tor/control does not exist anymore making us cannot get a controller from socket file. (stem.control.Controller.from_socket_file() is affected in this case: https://stem.torproject.org/api/control.html#stem.control.Controller.fro m_socket_file)
To reproduce this, I tested both Tor 0.3.1.9 and 0.3.2.9 on Debian Stretch:
When DisableNetwork 0, run: systemctl --no-pager restart tor@default
user@host:~$ ls -l /var/run/tor/ total 1328 srw-rw---- 1 debian-tor debian-tor 0 Jan 19 21:14 control -rw-r----- 1 debian-tor debian-tor 32 Jan 19 21:14 control.authcookie -rw-r----- 1 debian-tor debian-tor 1350116 Jan 19 21:14 log srw-rw-rw- 1 debian-tor debian-tor 0 Jan 19 21:14 socks -rw-r--r-- 1 debian-tor debian-tor 6 Jan 19 21:14 tor.pid
When DisableNetwork 1, run: systemctl --no-pager restart tor@default
user@host:~$ ls -l /var/run/tor/ total 1244 -rw-r----- 1 debian-tor debian-tor 32 Jan 19 21:00 control.authcookie -rw-r----- 1 debian-tor debian-tor 1269005 Jan 19 21:00 log
I searched on Tor-trac but did not find any similar report. Therefore, would you please tell me wether Tor intentionally behaves like this or this is a bug? (If this is a bug, I can definitely help to report it to Tor-trac.)
Thank you so much!
Best Regards, iry