2017-07-20 17:16:38 +02:00
|
|
|
{% for service_group in services %}
|
2019-04-03 16:11:09 +02:00
|
|
|
HiddenServiceDir {{service_group.hidden_service_dir}}
|
|
|
|
{% if service_group.version == 3 %}
|
|
|
|
HiddenServiceVersion 3
|
|
|
|
{% endif %}
|
2017-07-20 17:16:38 +02:00
|
|
|
{% for service in service_group.services %}
|
|
|
|
{% for port in service.ports %}
|
|
|
|
{% if port.is_socket %}
|
|
|
|
HiddenServicePort {{port.port_from}} {{port.dest}}
|
|
|
|
{% endif %}
|
|
|
|
{% if not port.is_socket %}
|
|
|
|
HiddenServicePort {{port.port_from}} {{service.host}}:{{port.dest}}
|
|
|
|
{% endif %}
|
|
|
|
{% endfor %}
|
2016-03-07 03:43:12 +01:00
|
|
|
{% endfor %}
|
|
|
|
{% endfor %}
|
|
|
|
|
2016-03-16 22:16:03 +01:00
|
|
|
{% if 'RELAY' in env %}
|
2016-03-07 03:43:12 +01:00
|
|
|
ORPort 9001
|
|
|
|
{% endif %}
|
|
|
|
|
2019-07-15 02:06:28 +02:00
|
|
|
{% if 'TOR_SOCKS_PORT' in env %}
|
|
|
|
SocksPort {{env['TOR_SOCKS_PORT']}}
|
|
|
|
{% else %}
|
2016-03-07 03:43:12 +01:00
|
|
|
SocksPort 0
|
2019-07-15 02:06:28 +02:00
|
|
|
{% endif %}
|
2017-07-20 17:16:38 +02:00
|
|
|
|
2020-02-16 12:26:30 +01:00
|
|
|
{% if 'TOR_EXTRA_OPTIONS' in env %}
|
|
|
|
{{env['TOR_EXTRA_OPTIONS']}}
|
|
|
|
{% endif %}
|
|
|
|
|
2017-07-20 17:16:38 +02:00
|
|
|
# useless line for Jinja bug
|