Merge pull request #48625 from exarkun/48622.tor-disable-socksport
nixos/tor: better support non-anonymous services
commitca127588c13d5e87c826d2f2e342db4af18daa24
authorJoachim F <joachifm@users.noreply.github.com>
dateSun 21 Oct 2018, 18:27 (8 years ago)
parent9c391544a71e29
nixos/modules/services/security/tor.nix+5
@@ -57,6 +57,11 @@ let
5757 AutomapHostsSuffixes ${concatStringsSep "," cfg.client.dns.automapHostsSuffixes}
5858 ''}
5959 ''
60+ # Explicitly disable the SOCKS server if the client is disabled. In
61+ # particular, this makes non-anonymous hidden services possible.
62+ + optionalString (! cfg.client.enable) ''
63+ SOCKSPort 0
64+ ''
6065 # Relay config
6166 + optionalString cfg.relay.enable ''
6267 ORPort ${toString cfg.relay.port}