electrs: Make TLSProxy truly optional

If TLSProxy is disabled, bypass nginx by forwarding Tor HS traffic
directly to electrs.
This commit is contained in:
nixbitcoin 2020-05-03 10:23:50 +02:00
parent e3a6ca3bb1
commit 4c139a6d77
No known key found for this signature in database
GPG Key ID: DD11F9AD5308B3BA

View File

@ -99,7 +99,7 @@ in {
}; };
services.tor.hiddenServices.electrs = mkHiddenService { services.tor.hiddenServices.electrs = mkHiddenService {
port = cfg.electrs.onionport; port = cfg.electrs.onionport;
toPort = cfg.electrs.TLSProxy.port; toPort = if cfg.electrs.TLSProxy.enable then cfg.electrs.TLSProxy.port else cfg.electrs.port;
}; };
services.spark-wallet.onion-service = true; services.spark-wallet.onion-service = true;