Skip to content

Commit 4fa6519

Browse files
authored
feat(sims): test adverse conditions (#85)
* feat(sims): test adverse conditions * fix
1 parent 02aea01 commit 4fa6519

File tree

1 file changed

+281
-0
lines changed

1 file changed

+281
-0
lines changed
Lines changed: 281 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,281 @@
1+
{
2+
"name": "adverse_iroh",
3+
"cases": [
4+
{
5+
"name": "direct_throttled",
6+
"description": "Direct transfer with 4Mbit/s throttle",
7+
"visualize": true,
8+
"nodes": [
9+
{
10+
"name": "i_srv",
11+
"count": 1,
12+
"cmd": "./bins/iroh-transfer provide --size=10M",
13+
"type": "public",
14+
"wait": 10,
15+
"connect": {
16+
"strategy": "none"
17+
},
18+
"param_parser": "iroh_endpoint_with_addrs"
19+
},
20+
{
21+
"name": "i_get",
22+
"count": 1,
23+
"cmd": "time ./bins/iroh-transfer fetch --remote-direct-address=\"%s\" %s",
24+
"type": "public",
25+
"connect": {
26+
"strategy": "params_with_parsed_addrs",
27+
"node": "i_srv"
28+
},
29+
"process": "short",
30+
"parser": "iroh_cust_10M",
31+
"integration": "magic_iroh_client",
32+
"link": {
33+
"bw": 4,
34+
"latency": 200,
35+
"loss": 0
36+
}
37+
}
38+
]
39+
},
40+
{
41+
"name": "direct_lossy",
42+
"description": "Direct transfer with 1% packet loss",
43+
"visualize": true,
44+
"nodes": [
45+
{
46+
"name": "i_srv",
47+
"count": 1,
48+
"cmd": "./bins/iroh-transfer provide --size=10M",
49+
"type": "public",
50+
"wait": 10,
51+
"connect": {
52+
"strategy": "none"
53+
},
54+
"param_parser": "iroh_endpoint_with_addrs"
55+
},
56+
{
57+
"name": "i_get",
58+
"count": 1,
59+
"cmd": "time ./bins/iroh-transfer fetch --remote-direct-address=\"%s\" %s",
60+
"type": "public",
61+
"connect": {
62+
"strategy": "params_with_parsed_addrs",
63+
"node": "i_srv"
64+
},
65+
"process": "short",
66+
"parser": "iroh_cust_10M",
67+
"integration": "magic_iroh_client",
68+
"link": {
69+
"loss": 1,
70+
"bw": 8,
71+
"latency": 200
72+
}
73+
}
74+
]
75+
},
76+
{
77+
"name": "relay_dns_throttled",
78+
"description": "Relay+DNS transfer with 4Mbit/s throttle",
79+
"visualize": true,
80+
"nodes": [
81+
{
82+
"name": "1_r",
83+
"count": 1,
84+
"cmd": "./bins/iroh-relay --dev --config-path ./data/relay.cfg",
85+
"type": "public",
86+
"wait": 2,
87+
"connect": {
88+
"strategy": "none"
89+
}
90+
},
91+
{
92+
"name": "2_d",
93+
"count": 1,
94+
"cmd": "./bins/iroh-dns-server --config ./data/dns.test.cfg",
95+
"type": "public",
96+
"wait": 2,
97+
"connect": {
98+
"strategy": "none"
99+
}
100+
},
101+
{
102+
"name": "i_srv",
103+
"count": 1,
104+
"cmd": "./bins/iroh-transfer provide --env dev --size=10M --relay-url=\"http://10.0.0.1:3340\" --pkarr-relay-url=\"http://10.0.0.2:8080/pkarr\" --dns-origin-domain=\"10.0.0.2:5300\"",
105+
"type": "public",
106+
"wait": 10,
107+
"connect": {
108+
"strategy": "none"
109+
},
110+
"param_parser": "iroh_endpoint_with_addrs"
111+
},
112+
{
113+
"name": "i_get",
114+
"count": 1,
115+
"cmd": "time ./bins/iroh-transfer fetch --env dev --relay-url=\"http://10.0.0.1:3340\" --remote-relay-url=\"http://10.0.0.1:3340\" --pkarr-relay-url=\"http://10.0.0.2:8080/pkarr\" --dns-origin-domain=\"10.0.0.2:5300\" --remote-direct-address=\"%s\" %s",
116+
"type": "public",
117+
"connect": {
118+
"strategy": "params_with_parsed_addrs",
119+
"node": "i_srv"
120+
},
121+
"process": "short",
122+
"parser": "iroh_cust_10M",
123+
"integration": "magic_iroh_client",
124+
"link": {
125+
"bw": 4,
126+
"latency": 200,
127+
"loss": 0
128+
}
129+
}
130+
]
131+
},
132+
{
133+
"name": "relay_dns_lossy",
134+
"description": "Relay+DNS transfer with 1% packet loss",
135+
"visualize": true,
136+
"nodes": [
137+
{
138+
"name": "1_r",
139+
"count": 1,
140+
"cmd": "./bins/iroh-relay --dev --config-path ./data/relay.cfg",
141+
"type": "public",
142+
"wait": 2,
143+
"connect": {
144+
"strategy": "none"
145+
}
146+
},
147+
{
148+
"name": "2_d",
149+
"count": 1,
150+
"cmd": "./bins/iroh-dns-server --config ./data/dns.test.cfg",
151+
"type": "public",
152+
"wait": 2,
153+
"connect": {
154+
"strategy": "none"
155+
}
156+
},
157+
{
158+
"name": "i_srv",
159+
"count": 1,
160+
"cmd": "./bins/iroh-transfer provide --env dev --size=10M --relay-url=\"http://10.0.0.1:3340\" --pkarr-relay-url=\"http://10.0.0.2:8080/pkarr\" --dns-origin-domain=\"10.0.0.2:5300\"",
161+
"type": "public",
162+
"wait": 10,
163+
"connect": {
164+
"strategy": "none"
165+
},
166+
"param_parser": "iroh_endpoint_with_addrs"
167+
},
168+
{
169+
"name": "i_get",
170+
"count": 1,
171+
"cmd": "time ./bins/iroh-transfer fetch --env dev --relay-url=\"http://10.0.0.1:3340\" --remote-relay-url=\"http://10.0.0.1:3340\" --pkarr-relay-url=\"http://10.0.0.2:8080/pkarr\" --dns-origin-domain=\"10.0.0.2:5300\" --remote-direct-address=\"%s\" %s",
172+
"type": "public",
173+
"connect": {
174+
"strategy": "params_with_parsed_addrs",
175+
"node": "i_srv"
176+
},
177+
"process": "short",
178+
"parser": "iroh_cust_10M",
179+
"integration": "magic_iroh_client",
180+
"link": {
181+
"loss": 1,
182+
"bw": 8,
183+
"latency": 200
184+
}
185+
}
186+
]
187+
},
188+
{
189+
"name": "nat_both_throttled",
190+
"description": "Both nodes behind NAT with 4Mbit/s throttle",
191+
"visualize": true,
192+
"nodes": [
193+
{
194+
"name": "1_r",
195+
"count": 1,
196+
"cmd": "./bins/iroh-relay --dev --config-path ./data/relay.cfg",
197+
"type": "public",
198+
"wait": 2,
199+
"connect": {
200+
"strategy": "none"
201+
}
202+
},
203+
{
204+
"name": "i_srv",
205+
"count": 1,
206+
"cmd": "./bins/iroh-transfer provide --env dev --size=10M --relay-url=\"http://10.0.0.1:3340\"",
207+
"type": "nat",
208+
"wait": 10,
209+
"connect": {
210+
"strategy": "none"
211+
},
212+
"param_parser": "iroh_endpoint_with_addrs"
213+
},
214+
{
215+
"name": "i_get",
216+
"count": 1,
217+
"cmd": "time ./bins/iroh-transfer fetch --env dev --relay-url=\"http://10.0.0.1:3340\" --remote-relay-url=\"http://10.0.0.1:3340\" --remote-direct-address=\"%s\" %s",
218+
"type": "nat",
219+
"connect": {
220+
"strategy": "params_with_parsed_addrs",
221+
"node": "i_srv"
222+
},
223+
"process": "short",
224+
"parser": "iroh_cust_10M",
225+
"integration": "magic_iroh_client",
226+
"link": {
227+
"bw": 4,
228+
"latency": 200,
229+
"loss": 0
230+
}
231+
}
232+
]
233+
},
234+
{
235+
"name": "nat_both_lossy",
236+
"description": "Both nodes behind NAT with 1% packet loss",
237+
"visualize": true,
238+
"nodes": [
239+
{
240+
"name": "1_r",
241+
"count": 1,
242+
"cmd": "./bins/iroh-relay --dev --config-path ./data/relay.cfg",
243+
"type": "public",
244+
"wait": 2,
245+
"connect": {
246+
"strategy": "none"
247+
}
248+
},
249+
{
250+
"name": "i_srv",
251+
"count": 1,
252+
"cmd": "./bins/iroh-transfer provide --env dev --size=10M --relay-url=\"http://10.0.0.1:3340\"",
253+
"type": "nat",
254+
"wait": 10,
255+
"connect": {
256+
"strategy": "none"
257+
},
258+
"param_parser": "iroh_endpoint_with_addrs"
259+
},
260+
{
261+
"name": "i_get",
262+
"count": 1,
263+
"cmd": "time ./bins/iroh-transfer fetch --env dev --relay-url=\"http://10.0.0.1:3340\" --remote-relay-url=\"http://10.0.0.1:3340\" --remote-direct-address=\"%s\" %s",
264+
"type": "nat",
265+
"connect": {
266+
"strategy": "params_with_parsed_addrs",
267+
"node": "i_srv"
268+
},
269+
"process": "short",
270+
"parser": "iroh_cust_10M",
271+
"integration": "magic_iroh_client",
272+
"link": {
273+
"loss": 1,
274+
"bw": 8,
275+
"latency": 200
276+
}
277+
}
278+
]
279+
}
280+
]
281+
}

0 commit comments

Comments
 (0)