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
commit ca127588c1
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

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}