Merge branch 'master' of https://gitlab.inria.fr/qdufour/donar
This commit is contained in:
commit
dbc49aef68
6 changed files with 222 additions and 204 deletions
366
scripts/Makefile
366
scripts/Makefile
|
@ -4,7 +4,7 @@ simple_test:
|
||||||
./run-3 \
|
./run-3 \
|
||||||
1,simple_test . \
|
1,simple_test . \
|
||||||
thunder-client 600 100 100 8 150 . \
|
thunder-client 600 100 100 8 150 . \
|
||||||
thunder-server 8 150 . \
|
thunder-server 8 150 100. \
|
||||||
tor3 -f /etc/torrc_simple . \
|
tor3 -f /etc/torrc_simple . \
|
||||||
tor3 -f /etc/torrc_simple
|
tor3 -f /etc/torrc_simple
|
||||||
|
|
||||||
|
@ -15,10 +15,10 @@ tor_bw_small:
|
||||||
orig-client 120 500 100, \
|
orig-client 120 500 100, \
|
||||||
orig-client 600 100 100, \
|
orig-client 600 100 100, \
|
||||||
orig-client 1200 50 100 . \
|
orig-client 1200 50 100 . \
|
||||||
orig-server, \
|
orig-server 100, \
|
||||||
orig-server, \
|
orig-server 100, \
|
||||||
orig-server, \
|
orig-server 100, \
|
||||||
orig-server . \
|
orig-server 100. \
|
||||||
tor3 -f /etc/torrc_simple, \
|
tor3 -f /etc/torrc_simple, \
|
||||||
tor3 -f /etc/torrc_simple, \
|
tor3 -f /etc/torrc_simple, \
|
||||||
tor3 -f /etc/torrc_simple, \
|
tor3 -f /etc/torrc_simple, \
|
||||||
|
@ -40,11 +40,11 @@ tor_bw_full:
|
||||||
orig-client 6000 100 100, \
|
orig-client 6000 100 100, \
|
||||||
orig-client 12000 50 100, \
|
orig-client 12000 50 100, \
|
||||||
orig-client 30000 20 100 . \
|
orig-client 30000 20 100 . \
|
||||||
orig-server, \
|
orig-server 100, \
|
||||||
orig-server, \
|
orig-server 100, \
|
||||||
orig-server, \
|
orig-server 100, \
|
||||||
orig-server, \
|
orig-server 100, \
|
||||||
orig-server . \
|
orig-server 100. \
|
||||||
tor3 -f /etc/torrc_simple, \
|
tor3 -f /etc/torrc_simple, \
|
||||||
tor3 -f /etc/torrc_simple, \
|
tor3 -f /etc/torrc_simple, \
|
||||||
tor3 -f /etc/torrc_simple, \
|
tor3 -f /etc/torrc_simple, \
|
||||||
|
@ -67,10 +67,10 @@ tor_guards_small:
|
||||||
dup2-client 600 100 100 8, \
|
dup2-client 600 100 100 8, \
|
||||||
dup2-client 600 100 100 8, \
|
dup2-client 600 100 100 8, \
|
||||||
dup2-client 600 100 100 8 . \
|
dup2-client 600 100 100 8 . \
|
||||||
dup2-server 8, \
|
dup2-server 8 100, \
|
||||||
dup2-server 8, \
|
dup2-server 8 100, \
|
||||||
dup2-server 8, \
|
dup2-server 8 100, \
|
||||||
dup2-server 8 . \
|
dup2-server 8 100. \
|
||||||
tor3 -f /etc/torrc_guard_1, \
|
tor3 -f /etc/torrc_guard_1, \
|
||||||
tor3 -f /etc/torrc_guard_3, \
|
tor3 -f /etc/torrc_guard_3, \
|
||||||
tor3 -f /etc/torrc_guard_5, \
|
tor3 -f /etc/torrc_guard_5, \
|
||||||
|
@ -92,15 +92,15 @@ tor_guards_full:
|
||||||
dup2-client 6000 100 100 8, \
|
dup2-client 6000 100 100 8, \
|
||||||
dup2-client 6000 100 100 8, \
|
dup2-client 6000 100 100 8, \
|
||||||
dup2-client 6000 100 100 8 . \
|
dup2-client 6000 100 100 8 . \
|
||||||
dup2-server 8, \
|
dup2-server 8 100, \
|
||||||
dup2-server 8, \
|
dup2-server 8 100, \
|
||||||
dup2-server 8, \
|
dup2-server 8 100, \
|
||||||
dup2-server 8, \
|
dup2-server 8 100, \
|
||||||
dup2-server 8, \
|
dup2-server 8 100, \
|
||||||
dup2-server 8, \
|
dup2-server 8 100, \
|
||||||
dup2-server 8, \
|
dup2-server 8 100, \
|
||||||
dup2-server 8, \
|
dup2-server 8 100, \
|
||||||
dup2-server 8 . \
|
dup2-server 8 100. \
|
||||||
tor3 -f /etc/torrc_guard_1, \
|
tor3 -f /etc/torrc_guard_1, \
|
||||||
tor3 -f /etc/torrc_guard_2, \
|
tor3 -f /etc/torrc_guard_2, \
|
||||||
tor3 -f /etc/torrc_guard_3, \
|
tor3 -f /etc/torrc_guard_3, \
|
||||||
|
@ -130,9 +130,9 @@ tor_relays_full:
|
||||||
orig-client 6000 100 100, \
|
orig-client 6000 100 100, \
|
||||||
orig-client 6000 100 100, \
|
orig-client 6000 100 100, \
|
||||||
orig-client 6000 100 100 . \
|
orig-client 6000 100 100 . \
|
||||||
orig-server, \
|
orig-server 100, \
|
||||||
orig-server, \
|
orig-server 100, \
|
||||||
orig-server-single . \
|
orig-server-single 100. \
|
||||||
tor3 -f /etc/torrc_simple, \
|
tor3 -f /etc/torrc_simple, \
|
||||||
tor2 -f /etc/torrc_simple, \
|
tor2 -f /etc/torrc_simple, \
|
||||||
tor2 -f /etc/torrc_simple . \
|
tor2 -f /etc/torrc_simple . \
|
||||||
|
@ -146,9 +146,9 @@ tor_relays_small:
|
||||||
orig-client 600 100 100, \
|
orig-client 600 100 100, \
|
||||||
orig-client 600 100 100, \
|
orig-client 600 100 100, \
|
||||||
orig-client 600 100 100 . \
|
orig-client 600 100 100 . \
|
||||||
orig-server, \
|
orig-server 100, \
|
||||||
orig-server, \
|
orig-server 100, \
|
||||||
orig-server-single . \
|
orig-server-single 100. \
|
||||||
tor3 -f /etc/torrc_simple, \
|
tor3 -f /etc/torrc_simple, \
|
||||||
tor2 -f /etc/torrc_simple, \
|
tor2 -f /etc/torrc_simple, \
|
||||||
tor2 -f /etc/torrc_simple . \
|
tor2 -f /etc/torrc_simple . \
|
||||||
|
@ -170,13 +170,13 @@ thunder_configure_small:
|
||||||
thunder-client 600 100 100 $(link_num) 250, \
|
thunder-client 600 100 100 $(link_num) 250, \
|
||||||
thunder-client 600 100 100 $(link_num) 300, \
|
thunder-client 600 100 100 $(link_num) 300, \
|
||||||
thunder-client 600 100 100 $(link_num) 350. \
|
thunder-client 600 100 100 $(link_num) 350. \
|
||||||
thunder-server $(link_num) 50, \
|
thunder-server $(link_num) 50 100, \
|
||||||
thunder-server $(link_num) 100, \
|
thunder-server $(link_num) 100 100, \
|
||||||
thunder-server $(link_num) 150, \
|
thunder-server $(link_num) 150 100, \
|
||||||
thunder-server $(link_num) 200, \
|
thunder-server $(link_num) 200 100, \
|
||||||
thunder-server $(link_num) 250, \
|
thunder-server $(link_num) 250 100, \
|
||||||
thunder-server $(link_num) 300, \
|
thunder-server $(link_num) 300 100, \
|
||||||
thunder-server $(link_num) 350. \
|
thunder-server $(link_num) 350 100. \
|
||||||
tor2 -f /etc/torrc_guard_2, \
|
tor2 -f /etc/torrc_guard_2, \
|
||||||
tor2 -f /etc/torrc_guard_2, \
|
tor2 -f /etc/torrc_guard_2, \
|
||||||
tor2 -f /etc/torrc_guard_2, \
|
tor2 -f /etc/torrc_guard_2, \
|
||||||
|
@ -202,13 +202,13 @@ thunder_configure_full:
|
||||||
thunder-client 6000 100 100 $(link_num) 250, \
|
thunder-client 6000 100 100 $(link_num) 250, \
|
||||||
thunder-client 6000 100 100 $(link_num) 300, \
|
thunder-client 6000 100 100 $(link_num) 300, \
|
||||||
thunder-client 6000 100 100 $(link_num) 350. \
|
thunder-client 6000 100 100 $(link_num) 350. \
|
||||||
thunder-server $(link_num) 50, \
|
thunder-server $(link_num) 50 100, \
|
||||||
thunder-server $(link_num) 100, \
|
thunder-server $(link_num) 100 100, \
|
||||||
thunder-server $(link_num) 150, \
|
thunder-server $(link_num) 150 100, \
|
||||||
thunder-server $(link_num) 200, \
|
thunder-server $(link_num) 200 100, \
|
||||||
thunder-server $(link_num) 250, \
|
thunder-server $(link_num) 250 100, \
|
||||||
thunder-server $(link_num) 300, \
|
thunder-server $(link_num) 300 100, \
|
||||||
thunder-server $(link_num) 350. \
|
thunder-server $(link_num) 350 100. \
|
||||||
tor2 -f /etc/torrc_guard_2, \
|
tor2 -f /etc/torrc_guard_2, \
|
||||||
tor2 -f /etc/torrc_guard_2, \
|
tor2 -f /etc/torrc_guard_2, \
|
||||||
tor2 -f /etc/torrc_guard_2, \
|
tor2 -f /etc/torrc_guard_2, \
|
||||||
|
@ -237,12 +237,12 @@ thunder_configure_2_part:
|
||||||
thunder-client 9900 30 100 8 ${jmax}, \
|
thunder-client 9900 30 100 8 ${jmax}, \
|
||||||
thunder-client 9900 30 100 12 ${jmax}, \
|
thunder-client 9900 30 100 12 ${jmax}, \
|
||||||
thunder-client 9900 30 100 16 ${jmax}. \
|
thunder-client 9900 30 100 16 ${jmax}. \
|
||||||
thunder-server 2 ${jmax}, \
|
thunder-server 2 ${jmax} 100, \
|
||||||
thunder-server 4 ${jmax}, \
|
thunder-server 4 ${jmax} 100, \
|
||||||
thunder-server 6 ${jmax}, \
|
thunder-server 6 ${jmax} 100, \
|
||||||
thunder-server 8 ${jmax}, \
|
thunder-server 8 ${jmax} 100, \
|
||||||
thunder-server 12 ${jmax}, \
|
thunder-server 12 ${jmax} 100, \
|
||||||
thunder-server 16 ${jmax}. \
|
thunder-server 16 ${jmax} 100. \
|
||||||
tor2 -f /etc/torrc_simple, \
|
tor2 -f /etc/torrc_simple, \
|
||||||
tor2 -f /etc/torrc_simple, \
|
tor2 -f /etc/torrc_simple, \
|
||||||
tor2 -f /etc/torrc_simple, \
|
tor2 -f /etc/torrc_simple, \
|
||||||
|
@ -301,48 +301,48 @@ thunder_configure_2_full:
|
||||||
thunder-client 9900 30 100 8 450, \
|
thunder-client 9900 30 100 8 450, \
|
||||||
thunder-client 9900 30 100 8 550, \
|
thunder-client 9900 30 100 8 550, \
|
||||||
thunder-client 9900 30 100 8 650. \
|
thunder-client 9900 30 100 8 650. \
|
||||||
thunder-server 2 50, \
|
thunder-server 2 50 100, \
|
||||||
thunder-server 2 150, \
|
thunder-server 2 150 100, \
|
||||||
thunder-server 2 250, \
|
thunder-server 2 250 100, \
|
||||||
thunder-server 2 350, \
|
thunder-server 2 350 100, \
|
||||||
thunder-server 2 450, \
|
thunder-server 2 450 100, \
|
||||||
thunder-server 2 550, \
|
thunder-server 2 550 100, \
|
||||||
thunder-server 2 650, \
|
thunder-server 2 650 100, \
|
||||||
thunder-server 4 50, \
|
thunder-server 4 50 100, \
|
||||||
thunder-server 4 150, \
|
thunder-server 4 150 100, \
|
||||||
thunder-server 4 250, \
|
thunder-server 4 250 100, \
|
||||||
thunder-server 4 350, \
|
thunder-server 4 350 100, \
|
||||||
thunder-server 4 450, \
|
thunder-server 4 450 100, \
|
||||||
thunder-server 4 550, \
|
thunder-server 4 550 100, \
|
||||||
thunder-server 4 650, \
|
thunder-server 4 650 100, \
|
||||||
thunder-server 6 50, \
|
thunder-server 6 50 100, \
|
||||||
thunder-server 6 150, \
|
thunder-server 6 150 100, \
|
||||||
thunder-server 6 250, \
|
thunder-server 6 250 100, \
|
||||||
thunder-server 6 350, \
|
thunder-server 6 350 100, \
|
||||||
thunder-server 6 450, \
|
thunder-server 6 450 100, \
|
||||||
thunder-server 6 550, \
|
thunder-server 6 550 100, \
|
||||||
thunder-server 6 650, \
|
thunder-server 6 650 100, \
|
||||||
thunder-server 12 50, \
|
thunder-server 12 50 100, \
|
||||||
thunder-server 12 150, \
|
thunder-server 12 150 100, \
|
||||||
thunder-server 12 250, \
|
thunder-server 12 250 100, \
|
||||||
thunder-server 12 350, \
|
thunder-server 12 350 100, \
|
||||||
thunder-server 12 450, \
|
thunder-server 12 450 100, \
|
||||||
thunder-server 12 550, \
|
thunder-server 12 550 100, \
|
||||||
thunder-server 12 650, \
|
thunder-server 12 650 100, \
|
||||||
thunder-server 16 50, \
|
thunder-server 16 50 100, \
|
||||||
thunder-server 16 150, \
|
thunder-server 16 150 100, \
|
||||||
thunder-server 16 250, \
|
thunder-server 16 250 100, \
|
||||||
thunder-server 16 350, \
|
thunder-server 16 350 100, \
|
||||||
thunder-server 16 450, \
|
thunder-server 16 450 100, \
|
||||||
thunder-server 16 550, \
|
thunder-server 16 550 100, \
|
||||||
thunder-server 16 650, \
|
thunder-server 16 650 100, \
|
||||||
thunder-server 8 50, \
|
thunder-server 8 50 100, \
|
||||||
thunder-server 8 150, \
|
thunder-server 8 150 100, \
|
||||||
thunder-server 8 250, \
|
thunder-server 8 250 100, \
|
||||||
thunder-server 8 350, \
|
thunder-server 8 350 100, \
|
||||||
thunder-server 8 450, \
|
thunder-server 8 450 100, \
|
||||||
thunder-server 8 550, \
|
thunder-server 8 550 100, \
|
||||||
thunder-server 8 650. \
|
thunder-server 8 650 100. \
|
||||||
tor2 -f /etc/torrc_simple, \
|
tor2 -f /etc/torrc_simple, \
|
||||||
tor2 -f /etc/torrc_simple, \
|
tor2 -f /etc/torrc_simple, \
|
||||||
tor2 -f /etc/torrc_simple, \
|
tor2 -f /etc/torrc_simple, \
|
||||||
|
@ -455,86 +455,86 @@ thunder_configure_2_full_parse_red:
|
||||||
tor_just_many_latencies:
|
tor_just_many_latencies:
|
||||||
./run-3 \
|
./run-3 \
|
||||||
2,tor_just_many_latencies . \
|
2,tor_just_many_latencies . \
|
||||||
orig-client 9900 30 100, \
|
orig-client ${count} ${interval} 100, \
|
||||||
orig-client 9900 30 100, \
|
orig-client ${count} ${interval} 100, \
|
||||||
orig-client 9900 30 100, \
|
orig-client ${count} ${interval} 100, \
|
||||||
orig-client 9900 30 100, \
|
orig-client ${count} ${interval} 100, \
|
||||||
orig-client 9900 30 100, \
|
orig-client ${count} ${interval} 100, \
|
||||||
orig-client 9900 30 100, \
|
orig-client ${count} ${interval} 100, \
|
||||||
orig-client 9900 30 100, \
|
orig-client ${count} ${interval} 100, \
|
||||||
orig-client 9900 30 100, \
|
orig-client ${count} ${interval} 100, \
|
||||||
orig-client 9900 30 100, \
|
orig-client ${count} ${interval} 100, \
|
||||||
orig-client 9900 30 100, \
|
orig-client ${count} ${interval} 100, \
|
||||||
orig-client 9900 30 100, \
|
orig-client ${count} ${interval} 100, \
|
||||||
orig-client 9900 30 100, \
|
orig-client ${count} ${interval} 100, \
|
||||||
orig-client 9900 30 100, \
|
orig-client ${count} ${interval} 100, \
|
||||||
orig-client 9900 30 100, \
|
orig-client ${count} ${interval} 100, \
|
||||||
orig-client 9900 30 100, \
|
orig-client ${count} ${interval} 100, \
|
||||||
orig-client 9900 30 100, \
|
orig-client ${count} ${interval} 100, \
|
||||||
orig-client 9900 30 100, \
|
orig-client ${count} ${interval} 100, \
|
||||||
orig-client 9900 30 100, \
|
orig-client ${count} ${interval} 100, \
|
||||||
orig-client 9900 30 100, \
|
orig-client ${count} ${interval} 100, \
|
||||||
orig-client 9900 30 100, \
|
orig-client ${count} ${interval} 100, \
|
||||||
orig-client 9900 30 100, \
|
orig-client ${count} ${interval} 100, \
|
||||||
orig-client 9900 30 100, \
|
orig-client ${count} ${interval} 100, \
|
||||||
orig-client 9900 30 100, \
|
orig-client ${count} ${interval} 100, \
|
||||||
orig-client 9900 30 100, \
|
orig-client ${count} ${interval} 100, \
|
||||||
orig-client 9900 30 100, \
|
orig-client ${count} ${interval} 100, \
|
||||||
orig-client 9900 30 100, \
|
orig-client ${count} ${interval} 100, \
|
||||||
orig-client 9900 30 100, \
|
orig-client ${count} ${interval} 100, \
|
||||||
orig-client 9900 30 100, \
|
orig-client ${count} ${interval} 100, \
|
||||||
orig-client 9900 30 100, \
|
orig-client ${count} ${interval} 100, \
|
||||||
orig-client 9900 30 100, \
|
orig-client ${count} ${interval} 100, \
|
||||||
orig-client 9900 30 100, \
|
orig-client ${count} ${interval} 100, \
|
||||||
orig-client 9900 30 100, \
|
orig-client ${count} ${interval} 100, \
|
||||||
orig-client 9900 30 100, \
|
orig-client ${count} ${interval} 100, \
|
||||||
orig-client 9900 30 100, \
|
orig-client ${count} ${interval} 100, \
|
||||||
orig-client 9900 30 100, \
|
orig-client ${count} ${interval} 100, \
|
||||||
orig-client 9900 30 100, \
|
orig-client ${count} ${interval} 100, \
|
||||||
orig-client 9900 30 100, \
|
orig-client ${count} ${interval} 100, \
|
||||||
orig-client 9900 30 100, \
|
orig-client ${count} ${interval} 100, \
|
||||||
orig-client 9900 30 100, \
|
orig-client ${count} ${interval} 100, \
|
||||||
orig-client 9900 30 100 . \
|
orig-client ${count} ${interval} 100 . \
|
||||||
orig-server, \
|
orig-server 100, \
|
||||||
orig-server, \
|
orig-server 100, \
|
||||||
orig-server, \
|
orig-server 100, \
|
||||||
orig-server, \
|
orig-server 100, \
|
||||||
orig-server, \
|
orig-server 100, \
|
||||||
orig-server, \
|
orig-server 100, \
|
||||||
orig-server, \
|
orig-server 100, \
|
||||||
orig-server, \
|
orig-server 100, \
|
||||||
orig-server, \
|
orig-server 100, \
|
||||||
orig-server, \
|
orig-server 100, \
|
||||||
orig-server, \
|
orig-server 100, \
|
||||||
orig-server, \
|
orig-server 100, \
|
||||||
orig-server, \
|
orig-server 100, \
|
||||||
orig-server, \
|
orig-server 100, \
|
||||||
orig-server, \
|
orig-server 100, \
|
||||||
orig-server, \
|
orig-server 100, \
|
||||||
orig-server, \
|
orig-server 100, \
|
||||||
orig-server, \
|
orig-server 100, \
|
||||||
orig-server, \
|
orig-server 100, \
|
||||||
orig-server, \
|
orig-server 100, \
|
||||||
orig-server, \
|
orig-server 100, \
|
||||||
orig-server, \
|
orig-server 100, \
|
||||||
orig-server, \
|
orig-server 100, \
|
||||||
orig-server, \
|
orig-server 100, \
|
||||||
orig-server, \
|
orig-server 100, \
|
||||||
orig-server, \
|
orig-server 100, \
|
||||||
orig-server, \
|
orig-server 100, \
|
||||||
orig-server, \
|
orig-server 100, \
|
||||||
orig-server, \
|
orig-server 100, \
|
||||||
orig-server, \
|
orig-server 100, \
|
||||||
orig-server, \
|
orig-server 100, \
|
||||||
orig-server, \
|
orig-server 100, \
|
||||||
orig-server, \
|
orig-server 100, \
|
||||||
orig-server, \
|
orig-server 100, \
|
||||||
orig-server, \
|
orig-server 100, \
|
||||||
orig-server, \
|
orig-server 100, \
|
||||||
orig-server, \
|
orig-server 100, \
|
||||||
orig-server, \
|
orig-server 100, \
|
||||||
orig-server, \
|
orig-server 100, \
|
||||||
orig-server . \
|
orig-server 100. \
|
||||||
tor3 -f /etc/torrc_simple, \
|
tor3 -f /etc/torrc_simple, \
|
||||||
tor3 -f /etc/torrc_simple, \
|
tor3 -f /etc/torrc_simple, \
|
||||||
tor3 -f /etc/torrc_simple, \
|
tor3 -f /etc/torrc_simple, \
|
||||||
|
@ -659,18 +659,18 @@ thunder_guards:
|
||||||
thunder-client 9900 30 100 12 250, \
|
thunder-client 9900 30 100 12 250, \
|
||||||
thunder-client 9900 30 100 12 250, \
|
thunder-client 9900 30 100 12 250, \
|
||||||
thunder-client 9900 30 100 12 250. \
|
thunder-client 9900 30 100 12 250. \
|
||||||
thunder-server 12 250, \
|
thunder-server 12 250 100, \
|
||||||
thunder-server 12 250, \
|
thunder-server 12 250 100, \
|
||||||
thunder-server 12 250, \
|
thunder-server 12 250 100, \
|
||||||
thunder-server 12 250, \
|
thunder-server 12 250 100, \
|
||||||
thunder-server 12 250, \
|
thunder-server 12 250 100, \
|
||||||
thunder-server 12 250, \
|
thunder-server 12 250 100, \
|
||||||
thunder-server 12 250, \
|
thunder-server 12 250 100, \
|
||||||
thunder-server 12 250, \
|
thunder-server 12 250 100, \
|
||||||
thunder-server 12 250, \
|
thunder-server 12 250 100, \
|
||||||
thunder-server 12 250, \
|
thunder-server 12 250 100, \
|
||||||
thunder-server 12 250, \
|
thunder-server 12 250 100, \
|
||||||
thunder-server 12 250. \
|
thunder-server 12 250 100. \
|
||||||
tor2 -f /etc/torrc_guard_2, \
|
tor2 -f /etc/torrc_guard_2, \
|
||||||
tor2 -f /etc/torrc_guard_4, \
|
tor2 -f /etc/torrc_guard_4, \
|
||||||
tor2 -f /etc/torrc_guard_6, \
|
tor2 -f /etc/torrc_guard_6, \
|
||||||
|
|
|
@ -1,6 +1,6 @@
|
||||||
#!/bin/bash
|
#!/bin/bash
|
||||||
mkdir -p $2/{log,shared}
|
mkdir -p $3/{log,shared}
|
||||||
cd $2/shared
|
cd $3/shared
|
||||||
|
|
||||||
donar \
|
donar \
|
||||||
-a dup2 \
|
-a dup2 \
|
||||||
|
@ -10,4 +10,4 @@ donar \
|
||||||
-e 9000 \
|
-e 9000 \
|
||||||
> ../log/server-donar-stdout.log 2> ../log/server-donar-stderr.log &
|
> ../log/server-donar-stdout.log 2> ../log/server-donar-stderr.log &
|
||||||
|
|
||||||
udpecho -p 9000 > ../log/server-udpecho-stdout.log 2> ../log/server-udpecho-stderr.log
|
udpecho -p 9000 -m -s $2 > ../log/server-udpecho-stdout.log 2> ../log/server-udpecho-stderr.log
|
||||||
|
|
|
@ -1,4 +1,4 @@
|
||||||
#!/bin/bash
|
#!/bin/bash
|
||||||
mkdir -p $1/{log,shared}
|
mkdir -p $2/{log,shared}
|
||||||
cd $1/shared
|
cd $2/shared
|
||||||
torecho > ../log/server-udpecho-stdout.log 2> ../log/server-udpecho-stderr.log
|
torecho -m -s $1 > ../log/server-udpecho-stdout.log 2> ../log/server-udpecho-stderr.log
|
||||||
|
|
|
@ -1,4 +1,4 @@
|
||||||
#!/bin/bash
|
#!/bin/bash
|
||||||
mkdir -p $1/{log,shared}
|
mkdir -p $2/{log,shared}
|
||||||
cd $1/shared
|
cd $2/shared
|
||||||
torecho -n > ../log/server-udpecho-stdout.log 2> ../log/server-udpecho-stderr.log
|
torecho -n -m -s $1 > ../log/server-udpecho-stdout.log 2> ../log/server-udpecho-stderr.log
|
||||||
|
|
|
@ -1,6 +1,6 @@
|
||||||
#!/bin/bash
|
#!/bin/bash
|
||||||
mkdir -p $3/{log,shared}
|
mkdir -p $4/{log,shared}
|
||||||
cd $3/shared
|
cd $4/shared
|
||||||
|
|
||||||
donar \
|
donar \
|
||||||
-a thunder \
|
-a thunder \
|
||||||
|
@ -11,4 +11,4 @@ donar \
|
||||||
-e 9000 \
|
-e 9000 \
|
||||||
> ../log/server-donar-stdout.log 2> ../log/server-donar-stderr.log &
|
> ../log/server-donar-stdout.log 2> ../log/server-donar-stderr.log &
|
||||||
|
|
||||||
udpecho -p 9000 > ../log/server-udpecho-stdout.log 2> ../log/server-udpecho-stderr.log
|
udpecho -p 9000 -m -s $3 > ../log/server-udpecho-stdout.log 2> ../log/server-udpecho-stderr.log
|
||||||
|
|
|
@ -6,6 +6,12 @@
|
||||||
#include "evt_core.h"
|
#include "evt_core.h"
|
||||||
#include "net_tools.h"
|
#include "net_tools.h"
|
||||||
#include "url.h"
|
#include "url.h"
|
||||||
|
#include "measure.h"
|
||||||
|
|
||||||
|
struct torecho_ctx {
|
||||||
|
uint8_t is_measlat;
|
||||||
|
struct measure_conf mc;
|
||||||
|
};
|
||||||
|
|
||||||
void te_create_onion_services(struct tor_os_str* tos, struct tor_ctl* tctl, uint16_t* ports, int ports_count, enum TOR_ONION_FLAGS tof) {
|
void te_create_onion_services(struct tor_os_str* tos, struct tor_ctl* tctl, uint16_t* ports, int ports_count, enum TOR_ONION_FLAGS tof) {
|
||||||
tor_os_create (tos, "onion_services.pub", "onion_services.txt", ports_count);
|
tor_os_create (tos, "onion_services.pub", "onion_services.txt", ports_count);
|
||||||
|
@ -55,21 +61,23 @@ co_error:
|
||||||
}
|
}
|
||||||
|
|
||||||
int te_on_tcp(struct evt_core_ctx* ctx, struct evt_core_fdinfo* fdinfo) {
|
int te_on_tcp(struct evt_core_ctx* ctx, struct evt_core_fdinfo* fdinfo) {
|
||||||
char buffer[1500];
|
|
||||||
ssize_t nread, nwritten;
|
ssize_t nread, nwritten;
|
||||||
struct sockaddr_in addr;
|
struct sockaddr_in addr;
|
||||||
socklen_t addrlen = sizeof(addr);
|
socklen_t addrlen = sizeof(addr);
|
||||||
|
struct torecho_ctx *tctx = fdinfo->cat->app_ctx;
|
||||||
|
|
||||||
nread = recv(fdinfo->fd, buffer, sizeof(buffer), 0);
|
nread = recv(fdinfo->fd, tctx->mc.payload, tctx->mc.payload_size, 0);
|
||||||
if (nread == -1 && errno == EAGAIN) return 1; // Read done
|
if (nread == -1 && errno == EAGAIN) return 1; // Read done
|
||||||
if (nread == 0) { fprintf(stderr, "WARN! Read 0 bytes.\n"); return 1; }
|
if (nread == 0) { fprintf(stderr, "WARN! Read 0 bytes.\n"); return 1; }
|
||||||
if (nread < 0 || nread > sizeof(buffer)) {
|
if (nread < 0 || nread > tctx->mc.payload_size) {
|
||||||
fprintf(stderr, "Message is either truncated or an error occured. nread=%ld\n", nread);
|
fprintf(stderr, "Message is either truncated or an error occured. nread=%ld, expected=%ld\n", nread, tctx->mc.payload_size);
|
||||||
perror("read errno");
|
perror("read errno");
|
||||||
exit(EXIT_FAILURE);
|
exit(EXIT_FAILURE);
|
||||||
}
|
}
|
||||||
|
|
||||||
nwritten = send(fdinfo->fd, buffer, nread, 0);
|
if (tctx->is_measlat) measure_parse (nread, &tctx->mc);
|
||||||
|
|
||||||
|
nwritten = send(fdinfo->fd, tctx->mc.payload, nread, 0);
|
||||||
// @FIXME don't support EAGAIN on write. Could be intended, you don't think so?
|
// @FIXME don't support EAGAIN on write. Could be intended, you don't think so?
|
||||||
if (nwritten != nread) {
|
if (nwritten != nread) {
|
||||||
fprintf(stderr, "Didn't write the same number of bytes as read - not supported. nread=%ld, nwritten=%ld\n", nread, nwritten);
|
fprintf(stderr, "Didn't write the same number of bytes as read - not supported. nread=%ld, nwritten=%ld\n", nread, nwritten);
|
||||||
|
@ -91,13 +99,21 @@ int main(int argc, char** argv) {
|
||||||
struct tor_ctl tctl;
|
struct tor_ctl tctl;
|
||||||
enum TOR_ONION_FLAGS tof = TOR_ONION_FLAG_NONE;
|
enum TOR_ONION_FLAGS tof = TOR_ONION_FLAG_NONE;
|
||||||
char url[1024];
|
char url[1024];
|
||||||
|
struct torecho_ctx tctx = {0};
|
||||||
|
tctx.mc.inhibit_exit = 1;
|
||||||
|
tctx.mc.payload_size = 1500;
|
||||||
|
|
||||||
|
while ((opt = getopt(argc, argv, "ns:m")) != -1) {
|
||||||
while ((opt = getopt(argc, argv, "n")) != -1) {
|
|
||||||
switch(opt) {
|
switch(opt) {
|
||||||
case 'n':
|
case 'n':
|
||||||
tof |= TOR_ONION_FLAG_NON_ANONYMOUS;
|
tof |= TOR_ONION_FLAG_NON_ANONYMOUS;
|
||||||
break;
|
break;
|
||||||
|
case 'm':
|
||||||
|
tctx.is_measlat = 1;
|
||||||
|
break;
|
||||||
|
case 's':
|
||||||
|
tctx.mc.payload_size = atoi(optarg);
|
||||||
|
break;
|
||||||
default:
|
default:
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
|
@ -105,7 +121,7 @@ int main(int argc, char** argv) {
|
||||||
|
|
||||||
// 1. Register categories
|
// 1. Register categories
|
||||||
struct evt_core_cat tcp_co = {
|
struct evt_core_cat tcp_co = {
|
||||||
.app_ctx = NULL,
|
.app_ctx = &tctx,
|
||||||
.free_app_ctx = NULL,
|
.free_app_ctx = NULL,
|
||||||
.cb = te_on_tcp_co,
|
.cb = te_on_tcp_co,
|
||||||
.err_cb = NULL,
|
.err_cb = NULL,
|
||||||
|
@ -114,7 +130,7 @@ int main(int argc, char** argv) {
|
||||||
.socklist = NULL
|
.socklist = NULL
|
||||||
};
|
};
|
||||||
struct evt_core_cat tcp_all = {
|
struct evt_core_cat tcp_all = {
|
||||||
.app_ctx = NULL,
|
.app_ctx = &tctx,
|
||||||
.free_app_ctx = NULL,
|
.free_app_ctx = NULL,
|
||||||
.cb = te_on_tcp,
|
.cb = te_on_tcp,
|
||||||
.err_cb = NULL,
|
.err_cb = NULL,
|
||||||
|
@ -122,6 +138,8 @@ int main(int argc, char** argv) {
|
||||||
.flags = EPOLLIN | EPOLLOUT | EPOLLET | EPOLLRDHUP,
|
.flags = EPOLLIN | EPOLLOUT | EPOLLET | EPOLLRDHUP,
|
||||||
.socklist = NULL
|
.socklist = NULL
|
||||||
};
|
};
|
||||||
|
measure_prepare (&tctx.mc);
|
||||||
|
|
||||||
evt_core_init(&evts, 0);
|
evt_core_init(&evts, 0);
|
||||||
evt_core_add_cat(&evts, &tcp_co);
|
evt_core_add_cat(&evts, &tcp_co);
|
||||||
evt_core_add_cat(&evts, &tcp_all);
|
evt_core_add_cat(&evts, &tcp_all);
|
||||||
|
|
Loading…
Reference in a new issue