aboutsummaryrefslogtreecommitdiff
path: root/networks/hs-start-3
blob: e01a7a5e0fef88337e3a7e8a6f6cd510081286cf (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
from hs_instance_start import *

network = Network(name="net/hs-start-3")

hs_nodes, hs_servers = testing.create_hidden_service(3)

network.add(hs_nodes);

network.add(Node.create(3, {
    "tag": "a",
    "authority": 1,
    "relay": 1,
    "torrc": "authority.tmpl"
}))

network.add(Node.create(30, {
    "tag": "c",
    "torrc": "client.tmpl"
}))

network.add(Node.create(10, {
    "tag": "r",
    "relay": 1,
    "torrc": "intro.tmpl"
}))

def start():
    for server in hs_servers:
        server.listen()

    results = hs_instance_start(network)

    for server in hs_servers:
        server.stopListening()

    network.stop()

    return results