hs-intro 1.4 KB

123456789101112131415161718192021222324252627282930313233343536373839
  1. # By default, Authorities are not configured as exits
  2. Authority = Node(tag="a", authority=1, relay=1, torrc="authority.tmpl")
  3. NonExitRelay = Node(tag="r", relay=1, torrc="relay-non-exit.tmpl")
  4. Client = Node(tag="c", torrc="client.tmpl")
  5. HS0 = Node(tag="h", hs=1, torrc="hs0.tmpl")
  6. HS1 = Node(tag="h", hs=1, torrc="hs1.tmpl")
  7. HS2 = Node(tag="h", hs=1, torrc="hs2.tmpl")
  8. HS3 = Node(tag="h", hs=1, torrc="hs3.tmpl")
  9. HS4 = Node(tag="h", hs=1, torrc="hs4.tmpl")
  10. HS5 = Node(tag="h", hs=1, torrc="hs5.tmpl")
  11. HS6 = Node(tag="h", hs=1, torrc="hs6.tmpl")
  12. HS7 = Node(tag="h", hs=1, torrc="hs7.tmpl")
  13. HS8 = Node(tag="h", hs=1, torrc="hs8.tmpl")
  14. HS9 = Node(tag="h", hs=1, torrc="hs9.tmpl")
  15. HS10 = Node(tag="h", hs=1, torrc="hs10.tmpl")
  16. # Since only 25% of relays get the guard flag,
  17. # TestingDirAuthVoteGuard * may need to be used in small networks
  18. # A hidden service needs 5 authorities/relays to ensure it can build HS
  19. # connections:
  20. # a minimum path length of 3, plus the client-nominated rendezvous point,
  21. # plus a seperate introduction point
  22. # A hidden service with 10 intro points actually tries 12, then repurposes 2
  23. NODES = Authority.getN(2) + NonExitRelay.getN(10) + \
  24. Client.getN(1) + \
  25. HS0.getN(2) + \
  26. HS1.getN(2) + \
  27. HS2.getN(2) + \
  28. HS3.getN(2) + \
  29. HS4.getN(2) + \
  30. HS5.getN(2) + \
  31. HS6.getN(2) + \
  32. HS7.getN(2) + \
  33. HS8.getN(2) + \
  34. HS9.getN(2) + \
  35. HS10.getN(2)
  36. ConfigureNodes(NODES)