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

[tor-commits] [chutney/master] Add a minimal bwfile network with V3BandwidthsFile /tmp/bwfile



commit 0d2f884aa1643a09eae95bf57157664b36f0ebbb
Author: teor <teor2345@xxxxxxxxx>
Date:   Mon Jul 16 15:22:00 2018 +1000

    Add a minimal bwfile network with V3BandwidthsFile /tmp/bwfile
    
    Closes 26801.
---
 README                                | 7 +++++++
 networks/bwfile                       | 9 +++++++++
 torrc_templates/authority-bwfile.tmpl | 2 ++
 3 files changed, 18 insertions(+)

diff --git a/README b/README
index 8d4bb72..7df2ef5 100644
--- a/README
+++ b/README
@@ -118,6 +118,13 @@ HS Connection Tests:
   # Default behavior is one client connects to each HS
   ./chutney stop networks/hs-025
 
+Bandwidth File Tests:
+  ./tools/test-network.sh --flavour bwfile
+  # Warning: Can't open bandwidth file at configured location: /tmp/bwfile
+  # Create a bwfile with no bandwidths, that is valid for a few days
+  date +%s > /tmp/bwfile
+  ./tools/test-network.sh --flavour bwfile
+
 Waiting for the network:
 
   The tools/test-network.sh script waits CHUTNEY_START_TIME seconds
diff --git a/networks/bwfile b/networks/bwfile
new file mode 100644
index 0000000..43fdf19
--- /dev/null
+++ b/networks/bwfile
@@ -0,0 +1,9 @@
+# By default, Authorities are not configured as exits
+Authority = Node(tag="a", authority=1, relay=1, torrc="authority-bwfile.tmpl")
+ExitRelay = Node(tag="r", relay=1, exit=1, torrc="relay.tmpl")
+Client = Node(tag="c", client=1, torrc="client.tmpl")
+
+# 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/torrc_templates/authority-bwfile.tmpl b/torrc_templates/authority-bwfile.tmpl
new file mode 100644
index 0000000..1411773
--- /dev/null
+++ b/torrc_templates/authority-bwfile.tmpl
@@ -0,0 +1,2 @@
+${include:authority.tmpl}
+V3BandwidthsFile /tmp/bwfile



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