Browse Source

Add the single-onion flavour for testing single onion services

Use net/nodes/006h/single-onion.log to confirm the single onion service
is building one-hop circuits, and make sure it's not causing any bugs,
notices, or warnings. Look for rend_service_intro_has_opened and
rend_service_rendezvous_has_opened, and check the length of the circuit
in the next line.

Requires the single onion tor branch from #17178.
teor (Tim Wilson-Brown) 8 years ago
parent
commit
5a0fff1362
2 changed files with 39 additions and 0 deletions
  1. 17 0
      networks/single-onion
  2. 22 0
      torrc_templates/single-onion.tmpl

+ 17 - 0
networks/single-onion

@@ -0,0 +1,17 @@
+# 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", torrc="client.tmpl")
+SingleOnion = Node(tag="h", hs=1, torrc="single-onion.tmpl")
+
+# 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
+NODES = Authority.getN(2) + NonExitRelay.getN(3) + \
+        Client.getN(1) + SingleOnion.getN(1)
+
+ConfigureNodes(NODES)

+ 22 - 0
torrc_templates/single-onion.tmpl

@@ -0,0 +1,22 @@
+${include:hs.tmpl}
+
+# Make every hidden service instance a Single Onion Service
+HiddenServiceSingleHopMode 1
+HiddenServiceNonAnonymousMode 1
+
+# Log only the messages we need to confirm that the Single Onion server is
+# making one-hop circuits, and to see any errors or major issues
+# To confirm one-hop intro and rendezvous circuits, look for
+# rend_service_intro_has_opened and rend_service_rendezvous_has_opened, and
+# check the length of the circuit in the next line.
+Log notice [rend,bug]info file ${dir}/single-onion.log
+
+# Disable preemtive circuits, a Single Onion doesn't need them (except for
+# descriptor posting).
+# This stalls at bootstrap due to #17359.
+#__DisablePredictedCircuits 1
+# A workaround is to set:
+LongLivedPorts
+PredictedPortsRelevanceTime 0 seconds
+# This disables everything except hidden service preemptive 3-hop circuits.
+# See #17360.