[Author Prev][Author Next][Thread Prev][Thread Next][Author Index][Thread Index]

[tor-commits] [chutney/master] Add v3 only network templates



commit 2de6e65352b55fb673c9512df49a025edc152b61
Author: David Goulet <dgoulet@xxxxxxxxxxxxxx>
Date:   Tue Feb 16 10:17:45 2021 -0500

    Add v3 only network templates
    
    Closes #40015
    
    Signed-off-by: David Goulet <dgoulet@xxxxxxxxxxxxxx>
---
 networks/bridges+hs-v3           | 19 ++++++++++++++
 networks/mixed+hs-v3             | 19 ++++++++++++++
 networks/mixed+hs-v3-ipv6        | 56 ++++++++++++++++++++++++++++++++++++++++
 networks/single-onion-v3         | 20 ++++++++++++++
 networks/single-onion-v3-ipv6-md | 30 +++++++++++++++++++++
 5 files changed, 144 insertions(+)

diff --git a/networks/bridges+hs-v3 b/networks/bridges+hs-v3
new file mode 100644
index 0000000..e73507b
--- /dev/null
+++ b/networks/bridges+hs-v3
@@ -0,0 +1,19 @@
+# By default, Authorities are not configured as exits
+Authority = Node(tag="a", authority=1, relay=1, torrc="authority.tmpl")
+ExitRelay = Node(tag="r", relay=1, exit=1, torrc="relay.tmpl")
+Client = Node(tag="c", client=1, torrc="client.tmpl")
+
+BridgeAuthority = Node(tag="ba", authority=1, bridgeauthority=1,
+                       relay=1, torrc="bridgeauthority.tmpl")
+Bridge = Node(tag="br", bridge=1, relay=1, torrc="bridge.tmpl", launch_phase=2)
+HSv3 = Node(tag="h", hs=1, torrc="hs-v3.tmpl", launch_phase=2)
+BridgeClient = Node(tag="bc", client=1, bridgeclient=1, torrc="bridgeclient.tmpl", launch_phase=3)
+
+# We need 5 authorities/relays/exits to ensure we can build HS connections
+NODES = Authority.getN(3) + BridgeAuthority.getN(1) + \
+    ExitRelay.getN(1) + \
+    Bridge.getN(1) + \
+    Client.getN(1) + BridgeClient.getN(1) + \
+    HSv3.getN(1)
+
+ConfigureNodes(NODES)
diff --git a/networks/mixed+hs-v3 b/networks/mixed+hs-v3
new file mode 100644
index 0000000..e3e96fe
--- /dev/null
+++ b/networks/mixed+hs-v3
@@ -0,0 +1,19 @@
+OLD_TOR="tor-stable"
+# By default, Authorities are not configured as exits
+Authority = Node(tag="a", authority=1, relay=1, torrc="authority.tmpl")
+OldAuthority = Node(tag="aOLD", authority=1, relay=1, torrc="authority.tmpl",
+       tor=OLD_TOR)
+Relay = Node(tag="r", relay=1, exit=1, torrc="relay.tmpl")
+OldRelay = Node(tag="rOLD", relay=1, exit=1, torrc="relay.tmpl",
+                    tor=OLD_TOR)
+Client = Node(tag="c", client=1, torrc="client.tmpl", launch_phase=2)
+OldClient = Node(tag="cOLD", client=1, torrc="client.tmpl", tor=OLD_TOR, launch_phase=2)
+HSv3 = Node(tag="h", hs=1, torrc="hs-v3.tmpl", launch_phase=2)
+OldHSv3 = Node(tag="hOLD", hs=1, torrc="hs-v3.tmpl", tor=OLD_TOR, launch_phase=2)
+
+NODES = Authority.getN(2) + OldAuthority.getN(2) + \
+        Relay.getN(1) + OldRelay.getN(1) + \
+        Client.getN(1) + OldClient.getN(1) + \
+        HSv3.getN(1) + OldHSv3.getN(1)
+
+ConfigureNodes(NODES)
diff --git a/networks/mixed+hs-v3-ipv6 b/networks/mixed+hs-v3-ipv6
new file mode 100644
index 0000000..bd06cf8
--- /dev/null
+++ b/networks/mixed+hs-v3-ipv6
@@ -0,0 +1,56 @@
+# This network uses microdescriptors, even though it doesn't end in -md
+# All current tor versions support microdescriptors for IPv6
+
+Require("IPV6")
+
+import os
+
+OLD_TOR="tor-stable"
+
+# By default, Authorities are not configured as exits
+Authority6 = Node(tag="a", authority=1, relay=1,
+                  ipv6_addr=os.environ.get('CHUTNEY_LISTEN_ADDRESS_V6',
+                                           '[::1]'),
+                  torrc="authority-orport-v6.tmpl")
+OldAuthority6 = Node(tag="aOLD", authority=1, relay=1,
+                     ipv6_addr=os.environ.get('CHUTNEY_LISTEN_ADDRESS_V6',
+                                              '[::1]'),
+                     torrc="authority-orport-v6.tmpl",
+                     tor=OLD_TOR)
+
+NonExitRelay = Node(tag="r", relay=1,
+                    torrc="relay-non-exit.tmpl")
+OldNonExitRelay = Node(tag="rOLD", relay=1,
+                       torrc="relay-non-exit.tmpl",
+                       tor=OLD_TOR)
+NonExitRelay6 = Node(tag="r", relay=1,
+                     ipv6_addr=os.environ.get('CHUTNEY_LISTEN_ADDRESS_V6',
+                                              '[::1]'),
+                     torrc="relay-orport-v6-non-exit.tmpl")
+OldNonExitRelay6 = Node(tag="rOLD", relay=1,
+                        ipv6_addr=os.environ.get('CHUTNEY_LISTEN_ADDRESS_V6',
+                                                 '[::1]'),
+                        torrc="relay-orport-v6-non-exit.tmpl",
+                        tor=OLD_TOR)
+
+Client6 = Node(tag="c", client=1,
+               torrc="client-only-v6-md.tmpl", launch_phase=2)
+OldClient6 = Node(tag="cOLD", client=1,
+                  torrc="client-only-v6-md.tmpl",
+                  tor=OLD_TOR, launch_phase=2)
+
+HSv3IPv6 = Node(tag="h", hs=1,
+              torrc="hs-v3-only-v6-md.tmpl", launch_phase=2)
+OldHSv3IPv6 = Node(tag="hOLD", hs=1,
+                 torrc="hs-v3-only-v6-md.tmpl",
+                 tor=OLD_TOR, launch_phase=2)
+
+# (XXX We have temporarily added an extra authority to work around issue
+# 34447.)
+NODES = Authority6.getN(2)    + OldAuthority6.getN(1) + \
+        NonExitRelay.getN(1)  + OldNonExitRelay.getN(1) + \
+        NonExitRelay6.getN(1) + OldNonExitRelay6.getN(1) + \
+        Client6.getN(1)       + OldClient6.getN(1) + \
+        HSv3IPv6.getN(1)      + OldHSv3IPv6.getN(1)
+
+ConfigureNodes(NODES)
diff --git a/networks/single-onion-v3 b/networks/single-onion-v3
new file mode 100644
index 0000000..85f8e92
--- /dev/null
+++ b/networks/single-onion-v3
@@ -0,0 +1,20 @@
+# By default, Authorities are not configured as exits
+Authority = Node(tag="a", authority=1, relay=1, torrc="authority.tmpl")
+NonExitRelay = Node(tag="r", relay=1, torrc="relay-non-exit.tmpl")
+Client = Node(tag="c", client=1, torrc="client.tmpl", launch_phase=2)
+SingleOnionv3 = Node(tag="h", hs=1, torrc="single-onion-v3.tmpl", launch_phase=2)
+
+# Since only 25% of relays get the guard flag,
+# TestingDirAuthVoteGuard * may need to be used in small networks
+
+# A hidden service needs 5 authorities/relays to ensure it can build HS
+# connections:
+# a minimum path length of 3, plus the client-nominated rendezvous point,
+# plus a seperate introduction point
+#
+# (XXX We have temporarily added an extra authority to work around issue
+# 34447.)
+NODES = Authority.getN(3) + NonExitRelay.getN(3) + \
+        Client.getN(1) + SingleOnionv3.getN(1)
+
+ConfigureNodes(NODES)
diff --git a/networks/single-onion-v3-ipv6-md b/networks/single-onion-v3-ipv6-md
new file mode 100644
index 0000000..ce1ce96
--- /dev/null
+++ b/networks/single-onion-v3-ipv6-md
@@ -0,0 +1,30 @@
+Require("IPV6")
+import os
+# By default, Authorities are not configured as exits
+Authority6 = Node(tag="a", authority=1, relay=1,
+                  ipv6_addr=os.environ.get('CHUTNEY_LISTEN_ADDRESS_V6',
+                                           '[::1]'),
+                  torrc="authority-orport-v6.tmpl")
+NonExitRelay6 = Node(tag="r", relay=1,
+                     ipv6_addr=os.environ.get('CHUTNEY_LISTEN_ADDRESS_V6',
+                                              '[::1]'),
+                     torrc="relay-orport-v6-non-exit.tmpl")
+Client = Node(tag="c", client=1, torrc="client.tmpl", launch_phase=2)
+Client6 = Node(tag="c", client=1, torrc="client-only-v6-md.tmpl", launch_phase=2)
+SingleOnionv3IPv6 = Node(tag="h", hs=1, torrc="single-onion-v3-only-v6-md.tmpl", launch_phase=2)
+
+# Since only 25% of relays get the guard flag,
+# TestingDirAuthVoteGuard * may need to be used in small networks
+
+# A hidden service needs 5 authorities/relays to ensure it can build HS
+# connections:
+# a minimum path length of 3, plus the client-nominated rendezvous point,
+# plus a seperate introduction point
+#
+# (XXX We have temporarily added an extra authority to work around issue
+# 34447.)
+NODES = Authority6.getN(3) + NonExitRelay6.getN(3) + \
+        Client.getN(1) + Client6.getN(1) + \
+        SingleOnionv3IPv6.getN(1)
+
+ConfigureNodes(NODES)

_______________________________________________
tor-commits mailing list
tor-commits@xxxxxxxxxxxxxxxxxxxx
https://lists.torproject.org/cgi-bin/mailman/listinfo/tor-commits