commit dd201bf68ff0e728484e027bc30968712b66043b
Author: teor <teor2345(a)gmail.com>
Date: Mon Jul 6 16:22:09 2015 +1000
Modify existing networks to flag each exit with exit=1
Also perform minor clean-up in some files.
This is required for the performance testing changes.
---
networks/basic | 8 +++++---
networks/basic-025 | 5 +++--
networks/basic-100 | 7 +++++--
networks/basic-min | 12 +++++++-----
networks/bridges | 8 +++++---
networks/bridges+ipv6 | 10 ++++++----
networks/bridges+ipv6+hs | 12 +++++++-----
networks/hs | 11 +++++++----
networks/middle | 12 ++++++++----
networks/middle-025 | 9 ++++++---
networks/middle-100 | 11 ++++++++---
networks/mixed | 17 ++++++++++-------
12 files changed, 77 insertions(+), 45 deletions(-)
diff --git a/networks/basic b/networks/basic
index e0213c4..f3f94de 100644
--- a/networks/basic
+++ b/networks/basic
@@ -1,8 +1,10 @@
+# By default, Authorities are not configured as exits
Authority = Node(tag="a", authority=1, relay=1, torrc="authority.tmpl")
-Relay = Node(tag="r", relay=1, torrc="relay.tmpl")
+ExitRelay = Node(tag="r", relay=1, exit=1, torrc="relay.tmpl")
Client = Node(tag="c", torrc="client.tmpl")
-# We need 8 authorities/relays/exits to ensure at least 2 get the guard flag in 0.2.6
-NODES = Authority.getN(3) + Relay.getN(5) + Client.getN(2)
+# We need 8 authorities/relays/exits to ensure at least 2 get the guard flag
+# in 0.2.6
+NODES = Authority.getN(3) + ExitRelay.getN(5) + Client.getN(2)
ConfigureNodes(NODES)
diff --git a/networks/basic-025 b/networks/basic-025
index 103224b..d57bcb8 100644
--- a/networks/basic-025
+++ b/networks/basic-025
@@ -1,7 +1,8 @@
+# By default, Authorities are not configured as exits
Authority = Node(tag="a", authority=1, relay=1, torrc="authority.tmpl")
-Relay = Node(tag="r", relay=1, torrc="relay.tmpl")
+ExitRelay = Node(tag="r", relay=1, exit=1, torrc="relay.tmpl")
Client = Node(tag="c", torrc="client.tmpl")
-NODES = Authority.getN(4) + Relay.getN(16) + Client.getN(5)
+NODES = Authority.getN(4) + ExitRelay.getN(16) + Client.getN(5)
ConfigureNodes(NODES)
diff --git a/networks/basic-100 b/networks/basic-100
index 561c4c4..1b181eb 100644
--- a/networks/basic-100
+++ b/networks/basic-100
@@ -1,7 +1,10 @@
+# WARNING: This network can bring down a low-specced machine
+
+# By default, Authorities are not configured as exits
Authority = Node(tag="a", authority=1, relay=1, torrc="authority.tmpl")
-Relay = Node(tag="r", relay=1, torrc="relay.tmpl")
+ExitRelay = Node(tag="r", relay=1, exit=1, torrc="relay.tmpl")
Client = Node(tag="c", torrc="client.tmpl")
-NODES = Authority.getN(5) + Relay.getN(35) + Client.getN(60)
+NODES = Authority.getN(5) + ExitRelay.getN(35) + Client.getN(60)
ConfigureNodes(NODES)
diff --git a/networks/basic-min b/networks/basic-min
index 0ee148f..48cf1cf 100644
--- a/networks/basic-min
+++ b/networks/basic-min
@@ -1,10 +1,12 @@
+# By default, Authorities are not configured as exits
Authority = Node(tag="a", authority=1, relay=1, torrc="authority.tmpl")
-Relay = Node(tag="r", relay=1, torrc="relay.tmpl")
+ExitRelay = Node(tag="r", relay=1, exit=1, torrc="relay.tmpl")
Client = Node(tag="c", torrc="client.tmpl")
-# We need 8 authorities/relays/exits to ensure at least 2 get the guard flag in 0.2.6
-# Since basic-min only has 4, at least 1 of these should still get the flag,
-# Otherwise, TestingDirAuthVoteGuard * may need to be used
-NODES = Authority.getN(3) + Relay.getN(1) + Client.getN(1)
+# Since only 25% of relays get the guard flag,
+# TestingDirAuthVoteGuard * may need to be used in small networks
+
+# The minimum number of authorities/relays/exits is 3, the minimum path length
+NODES = Authority.getN(2) + ExitRelay.getN(1) + Client.getN(1)
ConfigureNodes(NODES)
diff --git a/networks/bridges b/networks/bridges
index e6e68d0..8b28eef 100644
--- a/networks/bridges
+++ b/networks/bridges
@@ -1,5 +1,6 @@
+# By default, Authorities are not configured as exits
Authority = Node(tag="a", authority=1, relay=1, torrc="authority.tmpl")
-Relay = Node(tag="r", relay=1, torrc="relay.tmpl")
+ExitRelay = Node(tag="r", relay=1, exit=1, torrc="relay.tmpl")
Client = Node(tag="c", torrc="client.tmpl")
BridgeAuthority = Node(tag="ba", authority=1, bridgeauthority=1,
@@ -7,8 +8,9 @@ BridgeAuthority = Node(tag="ba", authority=1, bridgeauthority=1,
Bridge = Node(tag="br", bridge=1, relay=1, torrc="bridge.tmpl")
BridgeClient = Node(tag="bc", torrc="bridgeclient.tmpl")
-# We need 8 authorities/relays/exits to ensure at least 2 get the guard flag in 0.2.6
-NODES = Authority.getN(3) + BridgeAuthority.getN(1) + Relay.getN(4) + \
+# We need 8 authorities/relays/exits to ensure at least 2 get the guard flag
+# in 0.2.6
+NODES = Authority.getN(3) + BridgeAuthority.getN(1) + ExitRelay.getN(4) + \
Bridge.getN(1) + Client.getN(1) + BridgeClient.getN(1)
ConfigureNodes(NODES)
diff --git a/networks/bridges+ipv6 b/networks/bridges+ipv6
index 53a1a99..796a7be 100644
--- a/networks/bridges+ipv6
+++ b/networks/bridges+ipv6
@@ -1,5 +1,6 @@
+# By default, Authorities are not configured as exits
Authority = Node(tag="a", authority=1, relay=1, torrc="authority.tmpl")
-Relay = Node(tag="r", relay=1, torrc="relay.tmpl")
+ExitRelay = Node(tag="r", relay=1, exit=1, torrc="relay.tmpl")
Client = Node(tag="c", torrc="client.tmpl")
BridgeAuthority = Node(tag="ba", authority=1, bridgeauthority=1,
@@ -8,12 +9,13 @@ Bridge = Node(tag="br", bridge=1, relay=1, torrc="bridge.tmpl")
BridgeIPv6 = Node(tag="br", bridge=1, relay=1, ipv6_addr="[::1]", torrc="bridge-v6.tmpl")
BridgeClient = Node(tag="bc", torrc="bridgeclient.tmpl")
-# We need 8 authorities/relays/exits to ensure at least 2 get the guard flag in 0.2.6
+# We need 8 authorities/relays/exits to ensure at least 2 get the guard flag
+# in 0.2.6
# We put the IPv6 bridge first to ensure that clients try IPv6 before IPv4
# Unfortunately, this does not prevent clients falling back to IPv4
-# TODO: create test for IPv6 only
+# bridges+ipv6-min only has IPv6 bridges
NODES = Authority.getN(3) + BridgeAuthority.getN(1) + \
- Relay.getN(4) + \
+ ExitRelay.getN(4) + \
BridgeIPv6.getN(1) + Bridge.getN(1) + \
Client.getN(1) + BridgeClient.getN(1)
diff --git a/networks/bridges+ipv6+hs b/networks/bridges+ipv6+hs
index 5723417..39caee4 100644
--- a/networks/bridges+ipv6+hs
+++ b/networks/bridges+ipv6+hs
@@ -1,5 +1,6 @@
+# By default, Authorities are not configured as exits
Authority = Node(tag="a", authority=1, relay=1, torrc="authority.tmpl")
-Relay = Node(tag="r", relay=1, torrc="relay.tmpl")
+ExitRelay = Node(tag="r", relay=1, exit=1, torrc="relay.tmpl")
Client = Node(tag="c", torrc="client.tmpl")
BridgeAuthority = Node(tag="ba", authority=1, bridgeauthority=1,
@@ -9,13 +10,14 @@ BridgeIPv6 = Node(tag="br", bridge=1, relay=1, ipv6_addr="[::1]", torrc="bridge-
BridgeClient = Node(tag="bc", torrc="bridgeclient.tmpl")
HS = Node(tag="h", hs=1, torrc="hs.tmpl")
-# We need 8 authorities/relays/exits to ensure at least 2 get the guard flag in 0.2.6
-# We need 6 (or 7?) authorities/relays/exits to ensure we can build HS connections
+# We need 8 authorities/relays/exits to ensure at least 2 get the guard flag
+# in 0.2.6
+# We need 5 authorities/relays/exits to ensure we can build HS connections
# We put the IPv6 bridge first to ensure that clients try IPv6 before IPv4
# Unfortunately, this does not prevent clients falling back to IPv4
-# TODO: create test for IPv6 only
+# bridges+ipv6-min only has IPv6 bridges
NODES = Authority.getN(3) + BridgeAuthority.getN(1) + \
- Relay.getN(4) + \
+ ExitRelay.getN(4) + \
BridgeIPv6.getN(1) + Bridge.getN(1) + \
Client.getN(1) + BridgeClient.getN(1) + \
HS.getN(1)
diff --git a/networks/hs b/networks/hs
index a92fa60..3776ed9 100644
--- a/networks/hs
+++ b/networks/hs
@@ -1,10 +1,13 @@
+# By default, Authorities are not configured as exits
Authority = Node(tag="a", authority=1, relay=1, torrc="authority.tmpl")
-Relay = Node(tag="r", relay=1, torrc="relay.tmpl")
+ExitRelay = Node(tag="r", relay=1, exit=1, torrc="relay.tmpl")
Client = Node(tag="c", torrc="client.tmpl")
HS = Node(tag="h", hs=1, torrc="hs.tmpl")
-# We need 8 authorities/relays/exits to ensure at least 2 get the guard flag in 0.2.6
-# We need 6 (or 7?) authorities/relays/exits to ensure we can build HS connections
-NODES = Authority.getN(3) + Relay.getN(4) + Client.getN(1) + HS.getN(1)
+# We need 8 authorities/relays/exits to ensure at least 2 get the guard flag
+# in 0.2.6
+# We need 5 authorities/relays/exits to ensure we can build HS connections
+NODES = Authority.getN(3) + ExitRelay.getN(5) + \
+ Client.getN(1) + HS.getN(1)
ConfigureNodes(NODES)
diff --git a/networks/middle b/networks/middle
index 431a10a..9fbdf98 100644
--- a/networks/middle
+++ b/networks/middle
@@ -1,9 +1,13 @@
+# By default, Authorities are not configured as exits
Authority = Node(tag="a", authority=1, relay=1, torrc="authority.tmpl")
-Middle = Node(tag="m", relay=1, torrc="relay-non-exit.tmpl")
-Relay = Node(tag="r", relay=1, torrc="relay.tmpl")
+NonExitRelay = Node(tag="m", relay=1, torrc="relay-non-exit.tmpl")
+ExitRelay = Node(tag="r", relay=1, exit=1, torrc="relay.tmpl")
Client = Node(tag="c", torrc="client.tmpl")
-# We need 8 authorities/relays/exits to ensure at least 2 get the guard flag in 0.2.6
-NODES = Authority.getN(3) + Middle.getN(2) + Relay.getN(3) + Client.getN(2)
+# We need 8 authorities/relays/exits to ensure at least 2 get the guard flag
+# in 0.2.6
+NODES = Authority.getN(3) + \
+ NonExitRelay.getN(2) + ExitRelay.getN(3) + \
+ Client.getN(2)
ConfigureNodes(NODES)
diff --git a/networks/middle-025 b/networks/middle-025
index 7687b8c..a3d11e3 100644
--- a/networks/middle-025
+++ b/networks/middle-025
@@ -1,8 +1,11 @@
+# By default, Authorities are not configured as exits
Authority = Node(tag="a", authority=1, relay=1, torrc="authority.tmpl")
-Middle = Node(tag="m", relay=1, torrc="relay-non-exit.tmpl")
-Relay = Node(tag="r", relay=1, torrc="relay.tmpl")
+NonExitRelay = Node(tag="m", relay=1, torrc="relay-non-exit.tmpl")
+ExitRelay = Node(tag="r", relay=1, exit=1, torrc="relay.tmpl")
Client = Node(tag="c", torrc="client.tmpl")
-NODES = Authority.getN(4) + Middle.getN(10) + Relay.getN(6) + Client.getN(5)
+NODES = Authority.getN(4) + \
+ NonExitRelay.getN(10) + ExitRelay.getN(6) + \
+ Client.getN(5)
ConfigureNodes(NODES)
diff --git a/networks/middle-100 b/networks/middle-100
index d67702c..72f5689 100644
--- a/networks/middle-100
+++ b/networks/middle-100
@@ -1,8 +1,13 @@
+# WARNING: This network can bring down a low-specced machine
+
+# By default, Authorities are not configured as exits
Authority = Node(tag="a", authority=1, relay=1, torrc="authority.tmpl")
-Middle = Node(tag="m", relay=1, torrc="relay-non-exit.tmpl")
-Relay = Node(tag="r", relay=1, torrc="relay.tmpl")
+NonExitRelay = Node(tag="m", relay=1, torrc="relay-non-exit.tmpl")
+ExitRelay = Node(tag="r", relay=1, exit=1, torrc="relay.tmpl")
Client = Node(tag="c", torrc="client.tmpl")
-NODES = Authority.getN(5) + Middle.getN(25) + Relay.getN(10) + Client.getN(60)
+NODES = Authority.getN(5) + \
+ NonExitRelay.getN(25) + ExitRelay.getN(10) + \
+ Client.getN(60)
ConfigureNodes(NODES)
diff --git a/networks/mixed b/networks/mixed
index ae516a8..38e0d4e 100644
--- a/networks/mixed
+++ b/networks/mixed
@@ -1,15 +1,18 @@
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, torrc="relay.tmpl")
-OldRelay = Node(tag="rOLD", relay=1, torrc="relay.tmpl", tor=OLD_TOR)
+ 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", torrc="client.tmpl")
OldClient = Node(tag="cOLD", torrc="client.tmpl", tor=OLD_TOR)
-# We need 8 authorities/relays/exits to ensure at least 2 get the guard flag in 0.2.6
-NODES = (Authority.getN(2) + OldAuthority.getN(2) + OldRelay.getN(2) +
- Relay.getN(2) + Client.getN(2) + OldClient.getN(2))
+# We need 8 authorities/relays/exits to ensure at least 2 get the guard flag
+# in 0.2.6
+NODES = Authority.getN(2) + OldAuthority.getN(2) + \
+ Relay.getN(2) + OldRelay.getN(2) + \
+ Client.getN(2) + OldClient.getN(2)
ConfigureNodes(NODES)