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 9e8d2b395e
commit f74a220cfb
2 changed files with 5 additions and 0 deletions

View file

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

View file

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