docker-tor-hidden-service/assets/torrc
Anonymous contributor 9f706238fc Enables configuration of Tor's control port
The patch adds a single commit which enables configuration of Tor's control port. Once merged, your project can be used in conjuction with vanguards, an addon which increases privacy of a hidden service.
2020-01-24 00:48:29 +01:00

40 lines
978 B
Text

{% for service_group in services %}
HiddenServiceDir {{service_group.hidden_service_dir}}
{% if service_group.version == 3 %}
HiddenServiceVersion 3
{% endif %}
{% 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 %}
{% endfor %}
{% endfor %}
{% if 'RELAY' in env %}
ORPort 9001
{% endif %}
{% if 'TOR_SOCKS_PORT' in env %}
SocksPort {{env['TOR_SOCKS_PORT']}}
{% else %}
SocksPort 0
{% endif %}
DataDirectory /var/lib/tor/hidden_service
{% if 'TOR_CONTROL_PORT' in env %}
ControlPort {{env['TOR_CONTROL_PORT']}}
{% if 'TOR_CONTROL_AUTH_PASSWORD' in env %}
HashedControlPassword {{env['TOR_CONTROL_AUTH_PASSWORD']}}
{% endif %}
{% if 'TOR_CONTROL_AUTH_COOKIE' in env %}
CookieAuthentication 1
{% endif %}
{% endif %}
# useless line for Jinja bug