Add an option TOR_SOCKS_PORT to expose tor socks port for outgoing connections

This commit is contained in:
Juraj Bednar 2019-07-15 02:06:28 +02:00 committed by Christophe Mehay
parent 0bfb557c06
commit e27afd0709
2 changed files with 5 additions and 0 deletions

View file

@ -8,6 +8,7 @@ secret_env:
- '*_PORTS'
- '*_SERVICE_NAME'
- '*_TOR_SERVICE_*'
- 'TOR_SOCKS_PORT'
pre_conf_commands:
- onions --setup-hosts

View file

@ -19,6 +19,10 @@ HiddenServicePort {{port.port_from}} {{service.host}}:{{port.dest}}
ORPort 9001
{% endif %}
{% if 'TOR_SOCKS_PORT' in env %}
SocksPort {{env['TOR_SOCKS_PORT']}}
{% else %}
SocksPort 0
{% endif %}
# useless line for Jinja bug