Browse Source

Ensure chutney relays can exit to localhost IPv4 and IPv6

Keep up to date with changes in the latest tor versions, where localhost
exits are blocked by default, even in TestingTorNetworks.

relay.tmpl: permit exits to IPv4 and IPv6 (tor versions without the
torrc IPv6 options will benefit from the changes in
issue-13161-check-torrc-options).

relay-exit-v4-only.tmpl, relay-exit-v6-only.tmpl, relay-non-exit.tmpl:
self-explanatory variants.

exit-v4.i, exit-v6.i: include files containing the exit lines for IPv4
and IPv6.
teor 8 years ago
parent
commit
5e3b8ce8c3

+ 3 - 0
torrc_templates/exit-v4.i

@@ -0,0 +1,3 @@
+
+# An exit policy that allows exiting to IPv4 localhost
+ExitPolicy accept 127.0.0.0/8:*

+ 4 - 0
torrc_templates/exit-v6.i

@@ -0,0 +1,4 @@
+
+# An exit policy that allows exiting to IPv6 localhost
+ExitPolicy accept [::1]:*
+IPv6Exit 1

+ 6 - 0
torrc_templates/relay-exit-v4-only.tmpl

@@ -0,0 +1,6 @@
+${include:relay-non-exit.tmpl}
+
+# An exit relay that can exit to IPv4 localhost only
+# (newer versions of tor need this to be explicitly configured)
+
+${include:exit-v4.i}

+ 6 - 0
torrc_templates/relay-exit-v6-only.tmpl

@@ -0,0 +1,6 @@
+${include:relay-non-exit.tmpl}
+
+# An exit relay that can exit to IPv6 localhost only
+# (newer versions of tor need this to be explicitly configured)
+
+${include:exit-v4.i}

+ 9 - 0
torrc_templates/relay-non-exit.tmpl

@@ -0,0 +1,9 @@
+${include:common.i}
+SocksPort 0
+OrPort $orport
+Address $ip
+DirPort $dirport
+#NOTE: Setting TestingServerConsensusDownloadSchedule doesn't
+#      help -- dl_stats.schedule is not DL_SCHED_CONSENSUS
+#      at boostrap time.
+TestingServerDownloadSchedule 10, 2, 2, 4, 4, 8, 13, 18, 25, 40, 60

+ 10 - 9
torrc_templates/relay.tmpl

@@ -1,9 +1,10 @@
-${include:common.i}
-SocksPort 0
-OrPort $orport
-Address $ip
-DirPort $dirport
-#NOTE: Setting TestingServerConsensusDownloadSchedule doesn't
-#      help -- dl_stats.schedule is not DL_SCHED_CONSENSUS
-#      at boostrap time.
-TestingServerDownloadSchedule 10, 2, 2, 4, 4, 8, 13, 18, 25, 40, 60
+${include:relay-non-exit.tmpl}
+
+# This file is named "relay.tmpl" for compatibility with previous
+# chutney versions
+
+# An exit relay that can exit to IPv4 & IPv6 localhost
+# (newer versions of tor need this to be explicitly configured)
+
+${include:exit-v4.i}
+${include:exit-v6.i}