tor-node: IPv6 eingebaut (#280)

Co-authored-by: Michael Grote <michael.grote@posteo.de>
Reviewed-on: mg/ansible#280
Co-authored-by: mg <michael.grote@posteo.de>
Co-committed-by: mg <michael.grote@posteo.de>
This commit is contained in:
Michael Grote 2021-12-15 16:56:54 +01:00
parent 75828feccc
commit 883dc870d4
5 changed files with 19 additions and 1 deletions

View File

@ -2,7 +2,6 @@
### mgrote.apt_manage_sources
manage_sources_apt_proxy: ""
### mgrote.tor-node
tor_relay_name: tor1mgrote
tor_or_port: 9001
tor_socks_port: 0
tor_control_socket: 0

View File

@ -0,0 +1,5 @@
---
### mgrote.tor-node
tor_relay_name: tor1mgrote
tor_ipv6: false
tor_bandwidth_rate: 15 MBytes

View File

@ -13,3 +13,6 @@
# tor_bandwidth_burst:
tor_mode: relay # OR bridge
tor_bridge_port: 5555
# use IPv6
tor_ipv6: false

View File

@ -13,6 +13,12 @@ ServerTransportListenAddr obfs4 0.0.0.0:{{ tor_bridge_port }}
ExitPolicy reject *:*
CookieAuthentication 1
{% if tor_ipv6 is sameas true %}
ORPort [{{hostvars[inventory_hostname]['ansible_default_ipv6']['address']}}]:{{ tor_or_port }}
ServerTransportListenAddr obfs4 [{{hostvars[inventory_hostname]['ansible_default_ipv6']['address']}}]:{{ tor_bridge_port }}
{% endif %}
{% if tor_bandwidth_rate is defined %}
BandwidthRate {{ tor_bandwidth_rate }}
{% endif %}

View File

@ -10,6 +10,11 @@ ControlPort {{ tor_control_port }}
CookieAuthentication 1
ExitPolicy reject *:*
{% if tor_ipv6 is sameas true %}
ORPort [{{hostvars[inventory_hostname]['ansible_default_ipv6']['address']}}]:{{ tor_or_port }}
ExitPolicy reject6 *:*
{% endif %}
{% if tor_bandwidth_rate is defined %}
BandwidthRate {{ tor_bandwidth_rate }}
{% endif %}