commit 5e3b8ce8c3b42ff9e0ae1b6ba99e46e769cf3366 Author: teor teor2345@gmail.com Date: Thu Oct 2 00:21:03 2014 +1000
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. --- torrc_templates/exit-v4.i | 3 +++ torrc_templates/exit-v6.i | 4 ++++ torrc_templates/relay-exit-v4-only.tmpl | 6 ++++++ torrc_templates/relay-exit-v6-only.tmpl | 6 ++++++ torrc_templates/relay-non-exit.tmpl | 9 +++++++++ torrc_templates/relay.tmpl | 19 ++++++++++--------- 6 files changed, 38 insertions(+), 9 deletions(-)
diff --git a/torrc_templates/exit-v4.i b/torrc_templates/exit-v4.i new file mode 100644 index 0000000..eca35e0 --- /dev/null +++ b/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:* diff --git a/torrc_templates/exit-v6.i b/torrc_templates/exit-v6.i new file mode 100644 index 0000000..74232a5 --- /dev/null +++ b/torrc_templates/exit-v6.i @@ -0,0 +1,4 @@ + +# An exit policy that allows exiting to IPv6 localhost +ExitPolicy accept [::1]:* +IPv6Exit 1 diff --git a/torrc_templates/relay-exit-v4-only.tmpl b/torrc_templates/relay-exit-v4-only.tmpl new file mode 100644 index 0000000..ada1ca5 --- /dev/null +++ b/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} diff --git a/torrc_templates/relay-exit-v6-only.tmpl b/torrc_templates/relay-exit-v6-only.tmpl new file mode 100644 index 0000000..77a6c04 --- /dev/null +++ b/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} diff --git a/torrc_templates/relay-non-exit.tmpl b/torrc_templates/relay-non-exit.tmpl new file mode 100644 index 0000000..2f4b7f1 --- /dev/null +++ b/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 diff --git a/torrc_templates/relay.tmpl b/torrc_templates/relay.tmpl index 2f4b7f1..42ac329 100644 --- a/torrc_templates/relay.tmpl +++ b/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}
tor-commits@lists.torproject.org