Commit 2de6e653 authored by David Goulet's avatar David Goulet 🤘
Browse files

Add v3 only network templates

Closes #40015

Signed-off-by: David Goulet's avatarDavid Goulet <dgoulet@torproject.org>
parent d9978e03
# 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)
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)
# 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)
# 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)
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)
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment