-
Notifications
You must be signed in to change notification settings - Fork 0
/
snowflake-minimal.yaml
97 lines (97 loc) · 3.27 KB
/
snowflake-minimal.yaml
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
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
general:
stop_time: 30 min
network:
graph:
type: gml
inline: |
graph [
directed 0
node [
id 0
ip_address "0.0.0.0"
country_code "US"
host_bandwidth_down "1 Gbit"
host_bandwidth_up "1 Gbit"
]
edge [
source 0
target 0
latency "50 ms"
jitter "0 ms"
packet_loss 0.0
]
]
hosts:
snowflakeserver:
network_node_id: 0
processes:
- path: ~/.local/bin/snowflake-server
environment:
TOR_PT_MANAGED_TRANSPORT_VER: "1"
TOR_PT_SERVER_BINDADDR: snowflake-0.0.0.0:8000
TOR_PT_SERVER_TRANSPORTS: snowflake
TOR_PT_ORPORT: 127.0.0.1:8080
args: -disable-tls -unsafe-logging
start_time: 10
expected_final_state: running
- path: ~/.local/bin/tgen
args: ../../../conf/tgen.server.graphml.xml
start_time: 1
expected_final_state: running
probetest:
network_node_id: 0
processes:
- path: ~/.local/bin/snowflake-probetest
args: -disable-tls -stun "stun:stun:3478"
start_time: 1
expected_final_state: running
broker:
network_node_id: 0
processes:
- path: ~/.local/bin/snowflake-broker
args: -addr ":8080" -disable-tls -unsafe-logging -allowed-relay-pattern ^snowflakeserver$ -bridge-list-path ../../../conf/bridge-list.json
start_time: 1
expected_final_state: running
proxy:
network_node_id: 0
processes:
- path: ~/.local/bin/snowflake-proxy
args: -verbose -unsafe-logging -keep-local-addresses -broker "http://broker:8080" -relay "ws://snowflakeserver:8000" -stun "stun:stun:3478" -allowed-relay-hostname-pattern ^snowflakeserver$ -allow-non-tls-relay -nat-probe-server "http://probetest:8443/probe"
start_time: 60
expected_final_state: running
stun:
network_node_id: 0
processes:
- path: ~/.local/bin/stund
start_time: 1
expected_final_state: running
snowflakeclient:
network_node_id: 0
processes:
- path: ~/.local/bin/snowflake-client
environment:
TOR_PT_MANAGED_TRANSPORT_VER: "1"
TOR_PT_CLIENT_TRANSPORTS: snowflake
args: -ice "stun:stun:3478" -url "http://broker:8080" -keep-local-addresses -log "pt.log" -unsafe-logging
start_time: 90
expected_final_state: running
# The following snippet was developed by the proteus authors and used with their permission
# https://github.com/unblockable/proteus/blob/99751539b78782d4477411786e4df03b68213e5d/tests/linux/shadow/tgen/shadow.yaml.template#L53-L69
- path: python3
args: |
-c "def getport():
with open('snowflake-client.1000.stdout', 'r') as fin:
for line in fin:
if line.startswith('CMETHOD snowflake socks5 127.0.0.1:'):
return line.strip().split(' ')[3].split(':')[1]
return '0'
with open('../../../conf/tgen.client.graphml.xml','r') as fin:
data = fin.read().replace('SOCKS5LISTENPORT', getport())
with open('tgen.client.graphml.xml','w') as fout:
fout.write(data)"
environment: { PYTHONUNBUFFERED: "1" }
start_time: 100
expected_final_state: {exited: 0}
- path: ~/.local/bin/tgen
args: tgen.client.graphml.xml
start_time: 120