Merge pull request #48625 from exarkun/48622.tor-disable-socksport

nixos/tor: better support non-anonymous services
This commit is contained in:
Joachim F
2018-10-21 18:27:02 +00:00
committed by GitHub

View File

@@ -57,6 +57,11 @@ let
AutomapHostsSuffixes ${concatStringsSep "," cfg.client.dns.automapHostsSuffixes}
''}
''
# Explicitly disable the SOCKS server if the client is disabled. In
# particular, this makes non-anonymous hidden services possible.
+ optionalString (! cfg.client.enable) ''
SOCKSPort 0
''
# Relay config
+ optionalString cfg.relay.enable ''
ORPort ${toString cfg.relay.port}