diff --git a/netsim/sims/integration/adverse.json b/netsim/sims/integration/adverse.json new file mode 100644 index 0000000..c22e9f0 --- /dev/null +++ b/netsim/sims/integration/adverse.json @@ -0,0 +1,281 @@ +{ + "name": "adverse_iroh", + "cases": [ + { + "name": "direct_throttled", + "description": "Direct transfer with 4Mbit/s throttle", + "visualize": true, + "nodes": [ + { + "name": "i_srv", + "count": 1, + "cmd": "./bins/iroh-transfer provide --size=10M", + "type": "public", + "wait": 10, + "connect": { + "strategy": "none" + }, + "param_parser": "iroh_endpoint_with_addrs" + }, + { + "name": "i_get", + "count": 1, + "cmd": "time ./bins/iroh-transfer fetch --remote-direct-address=\"%s\" %s", + "type": "public", + "connect": { + "strategy": "params_with_parsed_addrs", + "node": "i_srv" + }, + "process": "short", + "parser": "iroh_cust_10M", + "integration": "magic_iroh_client", + "link": { + "bw": 4, + "latency": 200, + "loss": 0 + } + } + ] + }, + { + "name": "direct_lossy", + "description": "Direct transfer with 1% packet loss", + "visualize": true, + "nodes": [ + { + "name": "i_srv", + "count": 1, + "cmd": "./bins/iroh-transfer provide --size=10M", + "type": "public", + "wait": 10, + "connect": { + "strategy": "none" + }, + "param_parser": "iroh_endpoint_with_addrs" + }, + { + "name": "i_get", + "count": 1, + "cmd": "time ./bins/iroh-transfer fetch --remote-direct-address=\"%s\" %s", + "type": "public", + "connect": { + "strategy": "params_with_parsed_addrs", + "node": "i_srv" + }, + "process": "short", + "parser": "iroh_cust_10M", + "integration": "magic_iroh_client", + "link": { + "loss": 1, + "bw": 8, + "latency": 200 + } + } + ] + }, + { + "name": "relay_dns_throttled", + "description": "Relay+DNS transfer with 4Mbit/s throttle", + "visualize": true, + "nodes": [ + { + "name": "1_r", + "count": 1, + "cmd": "./bins/iroh-relay --dev --config-path ./data/relay.cfg", + "type": "public", + "wait": 2, + "connect": { + "strategy": "none" + } + }, + { + "name": "2_d", + "count": 1, + "cmd": "./bins/iroh-dns-server --config ./data/dns.test.cfg", + "type": "public", + "wait": 2, + "connect": { + "strategy": "none" + } + }, + { + "name": "i_srv", + "count": 1, + "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\"", + "type": "public", + "wait": 10, + "connect": { + "strategy": "none" + }, + "param_parser": "iroh_endpoint_with_addrs" + }, + { + "name": "i_get", + "count": 1, + "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", + "type": "public", + "connect": { + "strategy": "params_with_parsed_addrs", + "node": "i_srv" + }, + "process": "short", + "parser": "iroh_cust_10M", + "integration": "magic_iroh_client", + "link": { + "bw": 4, + "latency": 200, + "loss": 0 + } + } + ] + }, + { + "name": "relay_dns_lossy", + "description": "Relay+DNS transfer with 1% packet loss", + "visualize": true, + "nodes": [ + { + "name": "1_r", + "count": 1, + "cmd": "./bins/iroh-relay --dev --config-path ./data/relay.cfg", + "type": "public", + "wait": 2, + "connect": { + "strategy": "none" + } + }, + { + "name": "2_d", + "count": 1, + "cmd": "./bins/iroh-dns-server --config ./data/dns.test.cfg", + "type": "public", + "wait": 2, + "connect": { + "strategy": "none" + } + }, + { + "name": "i_srv", + "count": 1, + "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\"", + "type": "public", + "wait": 10, + "connect": { + "strategy": "none" + }, + "param_parser": "iroh_endpoint_with_addrs" + }, + { + "name": "i_get", + "count": 1, + "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", + "type": "public", + "connect": { + "strategy": "params_with_parsed_addrs", + "node": "i_srv" + }, + "process": "short", + "parser": "iroh_cust_10M", + "integration": "magic_iroh_client", + "link": { + "loss": 1, + "bw": 8, + "latency": 200 + } + } + ] + }, + { + "name": "nat_both_throttled", + "description": "Both nodes behind NAT with 4Mbit/s throttle", + "visualize": true, + "nodes": [ + { + "name": "1_r", + "count": 1, + "cmd": "./bins/iroh-relay --dev --config-path ./data/relay.cfg", + "type": "public", + "wait": 2, + "connect": { + "strategy": "none" + } + }, + { + "name": "i_srv", + "count": 1, + "cmd": "./bins/iroh-transfer provide --env dev --size=10M --relay-url=\"http://10.0.0.1:3340\"", + "type": "nat", + "wait": 10, + "connect": { + "strategy": "none" + }, + "param_parser": "iroh_endpoint_with_addrs" + }, + { + "name": "i_get", + "count": 1, + "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", + "type": "nat", + "connect": { + "strategy": "params_with_parsed_addrs", + "node": "i_srv" + }, + "process": "short", + "parser": "iroh_cust_10M", + "integration": "magic_iroh_client", + "link": { + "bw": 4, + "latency": 200, + "loss": 0 + } + } + ] + }, + { + "name": "nat_both_lossy", + "description": "Both nodes behind NAT with 1% packet loss", + "visualize": true, + "nodes": [ + { + "name": "1_r", + "count": 1, + "cmd": "./bins/iroh-relay --dev --config-path ./data/relay.cfg", + "type": "public", + "wait": 2, + "connect": { + "strategy": "none" + } + }, + { + "name": "i_srv", + "count": 1, + "cmd": "./bins/iroh-transfer provide --env dev --size=10M --relay-url=\"http://10.0.0.1:3340\"", + "type": "nat", + "wait": 10, + "connect": { + "strategy": "none" + }, + "param_parser": "iroh_endpoint_with_addrs" + }, + { + "name": "i_get", + "count": 1, + "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", + "type": "nat", + "connect": { + "strategy": "params_with_parsed_addrs", + "node": "i_srv" + }, + "process": "short", + "parser": "iroh_cust_10M", + "integration": "magic_iroh_client", + "link": { + "loss": 1, + "bw": 8, + "latency": 200 + } + } + ] + } + ] +}