2020-06-01 00:57:35 +02:00
|
|
|
{% for service_group in onion.services %}
|
2019-04-03 16:11:09 +02:00
|
|
|
HiddenServiceDir {{service_group.hidden_service_dir}}
|
2020-06-01 00:57:35 +02:00
|
|
|
{% if service_group.version == 3 %}
|
2019-04-03 16:11:09 +02:00
|
|
|
HiddenServiceVersion 3
|
2020-06-01 00:57:35 +02:00
|
|
|
{% endif %}
|
|
|
|
{% for service in service_group.services %}
|
|
|
|
{% for port in service.ports %}
|
|
|
|
{% if port.is_socket %}
|
2017-07-20 17:16:38 +02:00
|
|
|
HiddenServicePort {{port.port_from}} {{port.dest}}
|
2020-06-01 00:57:35 +02:00
|
|
|
{% endif %}
|
|
|
|
{% if not port.is_socket %}
|
2017-07-20 17:16:38 +02:00
|
|
|
HiddenServicePort {{port.port_from}} {{service.host}}:{{port.dest}}
|
2020-06-01 00:57:35 +02:00
|
|
|
{% endif %}
|
|
|
|
{% endfor %}
|
|
|
|
{% endfor %}
|
2016-03-07 03:43:12 +01:00
|
|
|
{% endfor %}
|
2020-06-01 00:57:35 +02:00
|
|
|
DataDirectory {{ onion.data_directory }}
|
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-06-01 00:57:35 +02:00
|
|
|
{% if envtobool('TOR_EXIT_RELAY', False) %}
|
|
|
|
ExitRelay 1
|
|
|
|
{% else %}
|
|
|
|
ExitRelay 0
|
|
|
|
{% endif %}
|
|
|
|
|
|
|
|
{% if onion.enable_control_port %}
|
|
|
|
{% if onion.control_socket %}
|
2020-06-14 23:29:49 +02:00
|
|
|
ControlPort {{onion.control_socket}}
|
2020-06-01 00:57:35 +02:00
|
|
|
{% endif %}
|
|
|
|
{% if not onion.control_socket %}
|
|
|
|
{% if onion.control_ip_binding.version() == 4 %}
|
|
|
|
ControlPort {{onion.control_ip_binding}}:{{ onion.control_port }}
|
|
|
|
{% endif %}
|
|
|
|
{% if onion.control_ip_binding.version() == 6 %}
|
|
|
|
ControlPort [{{onion.control_ip_binding}}]:{{ onion.control_port }}
|
|
|
|
{% endif %}
|
|
|
|
{% endif %}
|
|
|
|
{% if onion.control_hashed_password %}
|
|
|
|
HashedControlPassword {{ onion.control_hashed_password }}
|
|
|
|
{% endif %}
|
|
|
|
{% endif %}
|
|
|
|
|
|
|
|
|
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
|