[graphical gui] Whonix Setup Wizard / Anon Connection Wizard - Technical Discussion

iry:

I did some testing and I think I have some findings now.

To get a clearer picture, may I suggest to grep all of Whonix source code.

grep --exclude=README.md --exclude=GPLv2 --exclude=GPLv3 --exclude=COPYING --exclude=changelog.upstream-old1 --exclude-dir=mnt --exclude-dir=qubes-src/linux-template-builder/mnt --exclude=changelog.upstream --exclude-dir=.git --exclude-dir=chroot-debian --exclude-dir=chroot-jessie -r -i DisableNetwork

(The exclusion part grep --exclude=README.md --exclude=GPLv2 --exclude=GPLv3 --exclude=COPYING --exclude=changelog.upstream-old1 --exclude-dir=mnt --exclude-dir=qubes-src/linux-template-builder/mnt --exclude=changelog.upstream --exclude-dir=.git --exclude-dir=chroot-debian --exclude-dir=chroot-jessie is better as a
wrapper.)

Basically grep -r -i DisableNetwork while ignoring all the irrelevant files.

First, the default value of DisableNetwork is 0.

As per: How can we help? | Tor Project | Support

It’s true but not in case of Whonix.

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)

This means there is no different between DisableNetwork 0 and
#DisableNetwork 0.

Whonix default DisableNetwork 0 in
/usr/share/tor/tor-service-defaults-torrc makes the difference.

anon-gw-anonymizer-config/usr/share/tor/tor-service-defaults-torrc.anondist at e16ff107a49d75c776334164cb81ca22cc450c01 · Whonix/anon-gw-anonymizer-config · GitHub

Second, no matter the value of DisableNetwork is 0/1, when we want to
disable Tor, we can always disable it successfully without any complain.

Third, the only problem is, when DisableNetwork 1 is the final value
which will be used by Tor, we will fail to start Tor (it totally makes
sense) and cause a crash on anon-connection-wizard.

DisableNetwork 1 doesn’t crash Tor. By the description that you posted…

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)

It doesn’t crash either. And if it did (which it doesn’t), then it would
be a bug.

Perhaps double use of DisableNetwork 1 in
/usr/share/tor/tor-service-defaults-torrc as well as in a torrc.d file
causes a crash?

1 Like