Merge branch 'master' of gitlab.inria.fr:qdufour/donar

This commit is contained in:
Quentin 2020-02-04 11:44:47 +01:00
commit 49dd7910aa
47 changed files with 708 additions and 373 deletions

View file

@ -690,11 +690,7 @@ jan_tor_analysis:
jan_battle_normal:
./run-3 \
8,jan_battle_normal. \
orig-client 135000 40 172, \
orig-client 135000 40 172, \
orig-client 135000 40 172, \
orig-client 135000 40 172, \
32,jan_battle_normal. \
orig-client 135000 40 172, \
orig-client 135000 40 172, \
orig-client 135000 40 172, \
@ -703,22 +699,10 @@ jan_battle_normal:
dup2-client 135000 40 172 2, \
dup2-client 135000 40 172 2, \
dup2-client 135000 40 172 2, \
dup2-client 135000 40 172 2, \
dup2-client 135000 40 172 2, \
dup2-client 135000 40 172 2, \
dup2-client 135000 40 172 2, \
lightning-client 135000 40 172 12 fast_count=3!tick_tock=1!measlat=1!window=2000, \
lightning-client 135000 40 172 12 fast_count=3!tick_tock=1!measlat=1!window=2000, \
lightning-client 135000 40 172 12 fast_count=3!tick_tock=1!measlat=1!window=2000, \
lightning-client 135000 40 172 12 fast_count=3!tick_tock=1!measlat=1!window=2000, \
lightning-client 135000 40 172 12 fast_count=3!tick_tock=1!measlat=1!window=2000, \
lightning-client 135000 40 172 12 fast_count=3!tick_tock=1!measlat=1!window=2000, \
lightning-client 135000 40 172 12 fast_count=3!tick_tock=1!measlat=1!window=2000, \
lightning-client 135000 40 172 12 fast_count=3!tick_tock=1!measlat=1!window=2000, \
lightning-client 135000 40 172 12 fast_count=3!tick_tock=0!measlat=1!window=2000, \
lightning-client 135000 40 172 12 fast_count=3!tick_tock=0!measlat=1!window=2000, \
lightning-client 135000 40 172 12 fast_count=3!tick_tock=0!measlat=1!window=2000, \
lightning-client 135000 40 172 12 fast_count=3!tick_tock=0!measlat=1!window=2000, \
lightning-client 135000 40 172 12 fast_count=3!tick_tock=0!measlat=1!window=2000, \
lightning-client 135000 40 172 12 fast_count=3!tick_tock=0!measlat=1!window=2000, \
lightning-client 135000 40 172 12 fast_count=3!tick_tock=0!measlat=1!window=2000, \
@ -727,14 +711,6 @@ jan_battle_normal:
orig-server 135000 40 172, \
orig-server 135000 40 172, \
orig-server 135000 40 172, \
orig-server 135000 40 172, \
orig-server 135000 40 172, \
orig-server 135000 40 172, \
orig-server 135000 40 172, \
dup2-server 135000 40 172 2, \
dup2-server 135000 40 172 2, \
dup2-server 135000 40 172 2, \
dup2-server 135000 40 172 2, \
dup2-server 135000 40 172 2, \
dup2-server 135000 40 172 2, \
dup2-server 135000 40 172 2, \
@ -743,90 +719,46 @@ jan_battle_normal:
lightning-server 135000 40 172 12 fast_count=3!tick_tock=1!measlat=1!window=2000, \
lightning-server 135000 40 172 12 fast_count=3!tick_tock=1!measlat=1!window=2000, \
lightning-server 135000 40 172 12 fast_count=3!tick_tock=1!measlat=1!window=2000, \
lightning-server 135000 40 172 12 fast_count=3!tick_tock=1!measlat=1!window=2000, \
lightning-server 135000 40 172 12 fast_count=3!tick_tock=1!measlat=1!window=2000, \
lightning-server 135000 40 172 12 fast_count=3!tick_tock=1!measlat=1!window=2000, \
lightning-server 135000 40 172 12 fast_count=3!tick_tock=1!measlat=1!window=2000, \
lightning-server 135000 40 172 12 fast_count=3!tick_tock=0!measlat=1!window=2000, \
lightning-server 135000 40 172 12 fast_count=3!tick_tock=0!measlat=1!window=2000, \
lightning-server 135000 40 172 12 fast_count=3!tick_tock=0!measlat=1!window=2000, \
lightning-server 135000 40 172 12 fast_count=3!tick_tock=0!measlat=1!window=2000, \
lightning-server 135000 40 172 12 fast_count=3!tick_tock=0!measlat=1!window=2000, \
lightning-server 135000 40 172 12 fast_count=3!tick_tock=0!measlat=1!window=2000, \
lightning-server 135000 40 172 12 fast_count=3!tick_tock=0!measlat=1!window=2000, \
lightning-server 135000 40 172 12 fast_count=3!tick_tock=0!measlat=1!window=2000. \
tor2 -f /etc/torrc_guard_16, \
tor2 -f /etc/torrc_guard_16, \
tor2 -f /etc/torrc_guard_16, \
tor2 -f /etc/torrc_guard_16, \
tor2 -f /etc/torrc_guard_16, \
tor2 -f /etc/torrc_guard_16, \
tor2 -f /etc/torrc_guard_16, \
tor2 -f /etc/torrc_guard_16, \
tor2 -f /etc/torrc_guard_16, \
tor2 -f /etc/torrc_guard_16, \
tor2 -f /etc/torrc_guard_16, \
tor2 -f /etc/torrc_guard_16, \
tor2 -f /etc/torrc_guard_16, \
tor2 -f /etc/torrc_guard_16, \
tor2 -f /etc/torrc_guard_16, \
tor2 -f /etc/torrc_guard_16, \
tor2 -f /etc/torrc_guard_16, \
tor2 -f /etc/torrc_guard_16, \
tor2 -f /etc/torrc_guard_16, \
tor2 -f /etc/torrc_guard_16, \
tor2 -f /etc/torrc_guard_16, \
tor2 -f /etc/torrc_guard_16, \
tor2 -f /etc/torrc_guard_16, \
tor2 -f /etc/torrc_guard_16, \
tor2 -f /etc/torrc_guard_16, \
tor2 -f /etc/torrc_guard_16, \
tor2 -f /etc/torrc_guard_16, \
tor2 -f /etc/torrc_guard_16, \
tor2 -f /etc/torrc_guard_16, \
tor2 -f /etc/torrc_guard_16, \
tor2 -f /etc/torrc_guard_16, \
tor2 -f /etc/torrc_guard_16. \
tor2 -f /etc/torrc_guard_16, \
tor2 -f /etc/torrc_guard_16, \
tor2 -f /etc/torrc_guard_16, \
tor2 -f /etc/torrc_guard_16, \
tor2 -f /etc/torrc_guard_16, \
tor2 -f /etc/torrc_guard_16, \
tor2 -f /etc/torrc_guard_16, \
tor2 -f /etc/torrc_guard_16, \
tor2 -f /etc/torrc_guard_16, \
tor2 -f /etc/torrc_guard_16, \
tor2 -f /etc/torrc_guard_16, \
tor2 -f /etc/torrc_guard_16, \
tor2 -f /etc/torrc_guard_16, \
tor2 -f /etc/torrc_guard_16, \
tor2 -f /etc/torrc_guard_16, \
tor2 -f /etc/torrc_guard_16, \
tor2 -f /etc/torrc_guard_16, \
tor2 -f /etc/torrc_guard_16, \
tor2 -f /etc/torrc_guard_16, \
tor2 -f /etc/torrc_guard_16, \
tor2 -f /etc/torrc_guard_16, \
tor2 -f /etc/torrc_guard_16, \
tor2 -f /etc/torrc_guard_16, \
tor2 -f /etc/torrc_guard_16, \
tor2 -f /etc/torrc_guard_16, \
tor2 -f /etc/torrc_guard_16, \
tor2 -f /etc/torrc_guard_16, \
tor2 -f /etc/torrc_guard_16, \
tor2 -f /etc/torrc_guard_16, \
tor2 -f /etc/torrc_guard_16, \
tor2 -f /etc/torrc_guard_16, \
tor2 -f /etc/torrc_guard_16.
tor2 -f /etc/torrc_guard_12, \
tor2 -f /etc/torrc_guard_12, \
tor2 -f /etc/torrc_guard_12, \
tor2 -f /etc/torrc_guard_12, \
tor2 -f /etc/torrc_guard_12, \
tor2 -f /etc/torrc_guard_12, \
tor2 -f /etc/torrc_guard_12, \
tor2 -f /etc/torrc_guard_12, \
tor2 -f /etc/torrc_guard_12, \
tor2 -f /etc/torrc_guard_12, \
tor2 -f /etc/torrc_guard_12, \
tor2 -f /etc/torrc_guard_12, \
tor2 -f /etc/torrc_guard_12, \
tor2 -f /etc/torrc_guard_12, \
tor2 -f /etc/torrc_guard_12, \
tor2 -f /etc/torrc_guard_12. \
tor2 -f /etc/torrc_guard_12, \
tor2 -f /etc/torrc_guard_12, \
tor2 -f /etc/torrc_guard_12, \
tor2 -f /etc/torrc_guard_12, \
tor2 -f /etc/torrc_guard_12, \
tor2 -f /etc/torrc_guard_12, \
tor2 -f /etc/torrc_guard_12, \
tor2 -f /etc/torrc_guard_12, \
tor2 -f /etc/torrc_guard_12, \
tor2 -f /etc/torrc_guard_12, \
tor2 -f /etc/torrc_guard_12, \
tor2 -f /etc/torrc_guard_12, \
tor2 -f /etc/torrc_guard_12, \
tor2 -f /etc/torrc_guard_12, \
tor2 -f /etc/torrc_guard_12, \
tor2 -f /etc/torrc_guard_12.
jan_battle_hardened:
./run-3 \
8,jan_battle_hardened. \
orig-client 135000 40 172, \
orig-client 135000 40 172, \
orig-client 135000 40 172, \
orig-client 135000 40 172, \
32,jan_battle_hardened. \
orig-client 135000 40 172, \
orig-client 135000 40 172, \
orig-client 135000 40 172, \
@ -835,22 +767,10 @@ jan_battle_hardened:
dup2-client 135000 40 172 2, \
dup2-client 135000 40 172 2, \
dup2-client 135000 40 172 2, \
dup2-client 135000 40 172 2, \
dup2-client 135000 40 172 2, \
dup2-client 135000 40 172 2, \
dup2-client 135000 40 172 2, \
lightning-client 135000 40 172 12 fast_count=3!tick_tock=1!measlat=1!window=2000, \
lightning-client 135000 40 172 12 fast_count=3!tick_tock=1!measlat=1!window=2000, \
lightning-client 135000 40 172 12 fast_count=3!tick_tock=1!measlat=1!window=2000, \
lightning-client 135000 40 172 12 fast_count=3!tick_tock=1!measlat=1!window=2000, \
lightning-client 135000 40 172 12 fast_count=3!tick_tock=1!measlat=1!window=2000, \
lightning-client 135000 40 172 12 fast_count=3!tick_tock=1!measlat=1!window=2000, \
lightning-client 135000 40 172 12 fast_count=3!tick_tock=1!measlat=1!window=2000, \
lightning-client 135000 40 172 12 fast_count=3!tick_tock=1!measlat=1!window=2000, \
lightning-client 135000 40 172 12 fast_count=3!tick_tock=0!measlat=1!window=2000, \
lightning-client 135000 40 172 12 fast_count=3!tick_tock=0!measlat=1!window=2000, \
lightning-client 135000 40 172 12 fast_count=3!tick_tock=0!measlat=1!window=2000, \
lightning-client 135000 40 172 12 fast_count=3!tick_tock=0!measlat=1!window=2000, \
lightning-client 135000 40 172 12 fast_count=3!tick_tock=0!measlat=1!window=2000, \
lightning-client 135000 40 172 12 fast_count=3!tick_tock=0!measlat=1!window=2000, \
lightning-client 135000 40 172 12 fast_count=3!tick_tock=0!measlat=1!window=2000, \
@ -859,14 +779,6 @@ jan_battle_hardened:
orig-server 135000 40 172, \
orig-server 135000 40 172, \
orig-server 135000 40 172, \
orig-server 135000 40 172, \
orig-server 135000 40 172, \
orig-server 135000 40 172, \
orig-server 135000 40 172, \
dup2-server 135000 40 172 2, \
dup2-server 135000 40 172 2, \
dup2-server 135000 40 172 2, \
dup2-server 135000 40 172 2, \
dup2-server 135000 40 172 2, \
dup2-server 135000 40 172 2, \
dup2-server 135000 40 172 2, \
@ -875,14 +787,6 @@ jan_battle_hardened:
lightning-server 135000 40 172 12 fast_count=3!tick_tock=1!measlat=1!window=2000, \
lightning-server 135000 40 172 12 fast_count=3!tick_tock=1!measlat=1!window=2000, \
lightning-server 135000 40 172 12 fast_count=3!tick_tock=1!measlat=1!window=2000, \
lightning-server 135000 40 172 12 fast_count=3!tick_tock=1!measlat=1!window=2000, \
lightning-server 135000 40 172 12 fast_count=3!tick_tock=1!measlat=1!window=2000, \
lightning-server 135000 40 172 12 fast_count=3!tick_tock=1!measlat=1!window=2000, \
lightning-server 135000 40 172 12 fast_count=3!tick_tock=1!measlat=1!window=2000, \
lightning-server 135000 40 172 12 fast_count=3!tick_tock=0!measlat=1!window=2000, \
lightning-server 135000 40 172 12 fast_count=3!tick_tock=0!measlat=1!window=2000, \
lightning-server 135000 40 172 12 fast_count=3!tick_tock=0!measlat=1!window=2000, \
lightning-server 135000 40 172 12 fast_count=3!tick_tock=0!measlat=1!window=2000, \
lightning-server 135000 40 172 12 fast_count=3!tick_tock=0!measlat=1!window=2000, \
lightning-server 135000 40 172 12 fast_count=3!tick_tock=0!measlat=1!window=2000, \
lightning-server 135000 40 172 12 fast_count=3!tick_tock=0!measlat=1!window=2000, \
@ -902,22 +806,6 @@ jan_battle_hardened:
tor3 -f /etc/torrc_guard_2, \
tor3 -f /etc/torrc_guard_2, \
tor3 -f /etc/torrc_guard_2, \
tor3 -f /etc/torrc_guard_2, \
tor3 -f /etc/torrc_guard_2, \
tor3 -f /etc/torrc_guard_2, \
tor3 -f /etc/torrc_guard_2, \
tor3 -f /etc/torrc_guard_2, \
tor3 -f /etc/torrc_guard_2, \
tor3 -f /etc/torrc_guard_2, \
tor3 -f /etc/torrc_guard_2, \
tor3 -f /etc/torrc_guard_2, \
tor3 -f /etc/torrc_guard_2, \
tor3 -f /etc/torrc_guard_2, \
tor3 -f /etc/torrc_guard_2, \
tor3 -f /etc/torrc_guard_2, \
tor3 -f /etc/torrc_guard_2, \
tor3 -f /etc/torrc_guard_2, \
tor3 -f /etc/torrc_guard_2, \
tor3 -f /etc/torrc_guard_2. \
tor3 -f /etc/torrc_guard_2, \
tor3 -f /etc/torrc_guard_2, \
@ -934,6 +822,180 @@ jan_battle_hardened:
tor3 -f /etc/torrc_guard_2, \
tor3 -f /etc/torrc_guard_2, \
tor3 -f /etc/torrc_guard_2, \
tor3 -f /etc/torrc_guard_2.
jan_battle_light:
./run-3 \
32,jan_battle_light. \
orig-client 135000 40 172, \
orig-client 135000 40 172, \
orig-client 135000 40 172, \
orig-client 135000 40 172, \
dup2-client 135000 40 172 2, \
dup2-client 135000 40 172 2, \
dup2-client 135000 40 172 2, \
dup2-client 135000 40 172 2, \
lightning-client 135000 40 172 12 fast_count=3!tick_tock=1!measlat=1!window=2000, \
lightning-client 135000 40 172 12 fast_count=3!tick_tock=1!measlat=1!window=2000, \
lightning-client 135000 40 172 12 fast_count=3!tick_tock=1!measlat=1!window=2000, \
lightning-client 135000 40 172 12 fast_count=3!tick_tock=1!measlat=1!window=2000, \
lightning-client 135000 40 172 12 fast_count=3!tick_tock=0!measlat=1!window=2000, \
lightning-client 135000 40 172 12 fast_count=3!tick_tock=0!measlat=1!window=2000, \
lightning-client 135000 40 172 12 fast_count=3!tick_tock=0!measlat=1!window=2000, \
lightning-client 135000 40 172 12 fast_count=3!tick_tock=0!measlat=1!window=2000. \
orig-server-single 135000 40 172, \
orig-server-single 135000 40 172, \
orig-server-single 135000 40 172, \
orig-server-single 135000 40 172, \
dup2-server-single 135000 40 172 2, \
dup2-server-single 135000 40 172 2, \
dup2-server-single 135000 40 172 2, \
dup2-server-single 135000 40 172 2, \
lightning-server-single 135000 40 172 12 fast_count=3!tick_tock=1!measlat=1!window=2000, \
lightning-server-single 135000 40 172 12 fast_count=3!tick_tock=1!measlat=1!window=2000, \
lightning-server-single 135000 40 172 12 fast_count=3!tick_tock=1!measlat=1!window=2000, \
lightning-server-single 135000 40 172 12 fast_count=3!tick_tock=1!measlat=1!window=2000, \
lightning-server-single 135000 40 172 12 fast_count=3!tick_tock=0!measlat=1!window=2000, \
lightning-server-single 135000 40 172 12 fast_count=3!tick_tock=0!measlat=1!window=2000, \
lightning-server-single 135000 40 172 12 fast_count=3!tick_tock=0!measlat=1!window=2000, \
lightning-server-single 135000 40 172 12 fast_count=3!tick_tock=0!measlat=1!window=2000. \
tor2 -f /etc/torrc_guard_12, \
tor2 -f /etc/torrc_guard_12, \
tor2 -f /etc/torrc_guard_12, \
tor2 -f /etc/torrc_guard_12, \
tor2 -f /etc/torrc_guard_12, \
tor2 -f /etc/torrc_guard_12, \
tor2 -f /etc/torrc_guard_12, \
tor2 -f /etc/torrc_guard_12, \
tor2 -f /etc/torrc_guard_12, \
tor2 -f /etc/torrc_guard_12, \
tor2 -f /etc/torrc_guard_12, \
tor2 -f /etc/torrc_guard_12, \
tor2 -f /etc/torrc_guard_12, \
tor2 -f /etc/torrc_guard_12, \
tor2 -f /etc/torrc_guard_12, \
tor2 -f /etc/torrc_guard_12. \
tor2 -f /etc/torrc_single_hop_12, \
tor2 -f /etc/torrc_single_hop_12, \
tor2 -f /etc/torrc_single_hop_12, \
tor2 -f /etc/torrc_single_hop_12, \
tor2 -f /etc/torrc_single_hop_12, \
tor2 -f /etc/torrc_single_hop_12, \
tor2 -f /etc/torrc_single_hop_12, \
tor2 -f /etc/torrc_single_hop_12, \
tor2 -f /etc/torrc_single_hop_12, \
tor2 -f /etc/torrc_single_hop_12, \
tor2 -f /etc/torrc_single_hop_12, \
tor2 -f /etc/torrc_single_hop_12, \
tor2 -f /etc/torrc_single_hop_12, \
tor2 -f /etc/torrc_single_hop_12, \
tor2 -f /etc/torrc_single_hop_12, \
tor2 -f /etc/torrc_single_hop_12.
jan_dcall_normal:
./run-3 \
32,jan_dcall_normal. \
dcall-simple-client 1 360, \
dcall-simple-client 1 360, \
dcall-simple-client 1 360, \
dcall-simple-client 1 360, \
dcall-dup2-client 2 352, \
dcall-dup2-client 2 352, \
dcall-dup2-client 2 352, \
dcall-dup2-client 2 352, \
dcall-lightning-client 12 fast_count=3!tick_tock=1!measlat=0!window=2000 213, \
dcall-lightning-client 12 fast_count=3!tick_tock=1!measlat=0!window=2000 213, \
dcall-lightning-client 12 fast_count=3!tick_tock=1!measlat=0!window=2000 213, \
dcall-lightning-client 12 fast_count=3!tick_tock=1!measlat=0!window=2000 213, \
dcall-lightning-client 12 fast_count=3!tick_tock=0!measlat=0!window=2000 176, \
dcall-lightning-client 12 fast_count=3!tick_tock=0!measlat=0!window=2000 176, \
dcall-lightning-client 12 fast_count=3!tick_tock=0!measlat=0!window=2000 176, \
dcall-lightning-client 12 fast_count=3!tick_tock=0!measlat=0!window=2000 176. \
dcall-simple-server 1 360, \
dcall-simple-server 1 360, \
dcall-simple-server 1 360, \
dcall-simple-server 1 360, \
dcall-dup2-server 2 352, \
dcall-dup2-server 2 352, \
dcall-dup2-server 2 352, \
dcall-dup2-server 2 352, \
dcall-lightning-server 12 fast_count=3!tick_tock=1!measlat=0!window=2000 213, \
dcall-lightning-server 12 fast_count=3!tick_tock=1!measlat=0!window=2000 213, \
dcall-lightning-server 12 fast_count=3!tick_tock=1!measlat=0!window=2000 213, \
dcall-lightning-server 12 fast_count=3!tick_tock=1!measlat=0!window=2000 213, \
dcall-lightning-server 12 fast_count=3!tick_tock=0!measlat=0!window=2000 176, \
dcall-lightning-server 12 fast_count=3!tick_tock=0!measlat=0!window=2000 176, \
dcall-lightning-server 12 fast_count=3!tick_tock=0!measlat=0!window=2000 176, \
dcall-lightning-server 12 fast_count=3!tick_tock=0!measlat=0!window=2000 176. \
tor2 -f /etc/torrc_guard_12, \
tor2 -f /etc/torrc_guard_12, \
tor2 -f /etc/torrc_guard_12, \
tor2 -f /etc/torrc_guard_12, \
tor2 -f /etc/torrc_guard_12, \
tor2 -f /etc/torrc_guard_12, \
tor2 -f /etc/torrc_guard_12, \
tor2 -f /etc/torrc_guard_12, \
tor2 -f /etc/torrc_guard_12, \
tor2 -f /etc/torrc_guard_12, \
tor2 -f /etc/torrc_guard_12, \
tor2 -f /etc/torrc_guard_12, \
tor2 -f /etc/torrc_guard_12, \
tor2 -f /etc/torrc_guard_12, \
tor2 -f /etc/torrc_guard_12, \
tor2 -f /etc/torrc_guard_12. \
tor2 -f /etc/torrc_guard_12, \
tor2 -f /etc/torrc_guard_12, \
tor2 -f /etc/torrc_guard_12, \
tor2 -f /etc/torrc_guard_12, \
tor2 -f /etc/torrc_guard_12, \
tor2 -f /etc/torrc_guard_12, \
tor2 -f /etc/torrc_guard_12, \
tor2 -f /etc/torrc_guard_12, \
tor2 -f /etc/torrc_guard_12, \
tor2 -f /etc/torrc_guard_12, \
tor2 -f /etc/torrc_guard_12, \
tor2 -f /etc/torrc_guard_12, \
tor2 -f /etc/torrc_guard_12, \
tor2 -f /etc/torrc_guard_12, \
tor2 -f /etc/torrc_guard_12, \
tor2 -f /etc/torrc_guard_12.
jan_dcall_hardened:
./run-3 \
32,jan_dcall_hardened. \
dcall-simple-client 1 360, \
dcall-simple-client 1 360, \
dcall-simple-client 1 360, \
dcall-simple-client 1 360, \
dcall-dup2-client 2 360, \
dcall-dup2-client 2 360, \
dcall-dup2-client 2 360, \
dcall-dup2-client 2 360, \
dcall-lightning-client 12 fast_count=3!tick_tock=1!measlat=0!window=2000 360, \
dcall-lightning-client 12 fast_count=3!tick_tock=1!measlat=0!window=2000 360, \
dcall-lightning-client 12 fast_count=3!tick_tock=1!measlat=0!window=2000 360, \
dcall-lightning-client 12 fast_count=3!tick_tock=1!measlat=0!window=2000 360, \
dcall-lightning-client 12 fast_count=3!tick_tock=0!measlat=0!window=2000 311, \
dcall-lightning-client 12 fast_count=3!tick_tock=0!measlat=0!window=2000 311, \
dcall-lightning-client 12 fast_count=3!tick_tock=0!measlat=0!window=2000 311, \
dcall-lightning-client 12 fast_count=3!tick_tock=0!measlat=0!window=2000 311. \
dcall-simple-server 1 360, \
dcall-simple-server 1 360, \
dcall-simple-server 1 360, \
dcall-simple-server 1 360, \
dcall-dup2-server 2 360, \
dcall-dup2-server 2 360, \
dcall-dup2-server 2 360, \
dcall-dup2-server 2 360, \
dcall-lightning-server 12 fast_count=3!tick_tock=1!measlat=0!window=2000 360, \
dcall-lightning-server 12 fast_count=3!tick_tock=1!measlat=0!window=2000 360, \
dcall-lightning-server 12 fast_count=3!tick_tock=1!measlat=0!window=2000 360, \
dcall-lightning-server 12 fast_count=3!tick_tock=1!measlat=0!window=2000 360, \
dcall-lightning-server 12 fast_count=3!tick_tock=0!measlat=0!window=2000 311, \
dcall-lightning-server 12 fast_count=3!tick_tock=0!measlat=0!window=2000 311, \
dcall-lightning-server 12 fast_count=3!tick_tock=0!measlat=0!window=2000 311, \
dcall-lightning-server 12 fast_count=3!tick_tock=0!measlat=0!window=2000 311. \
tor3 -f /etc/torrc_guard_2, \
tor3 -f /etc/torrc_guard_2, \
tor3 -f /etc/torrc_guard_2, \
@ -949,139 +1011,88 @@ jan_battle_hardened:
tor3 -f /etc/torrc_guard_2, \
tor3 -f /etc/torrc_guard_2, \
tor3 -f /etc/torrc_guard_2, \
tor3 -f /etc/torrc_guard_2. \
tor3 -f /etc/torrc_guard_2, \
tor3 -f /etc/torrc_guard_2, \
tor3 -f /etc/torrc_guard_2, \
tor3 -f /etc/torrc_guard_2, \
tor3 -f /etc/torrc_guard_2, \
tor3 -f /etc/torrc_guard_2, \
tor3 -f /etc/torrc_guard_2, \
tor3 -f /etc/torrc_guard_2, \
tor3 -f /etc/torrc_guard_2, \
tor3 -f /etc/torrc_guard_2, \
tor3 -f /etc/torrc_guard_2, \
tor3 -f /etc/torrc_guard_2, \
tor3 -f /etc/torrc_guard_2, \
tor3 -f /etc/torrc_guard_2, \
tor3 -f /etc/torrc_guard_2, \
tor3 -f /etc/torrc_guard_2.
jan_battle_light:
jan_dcall_light:
./run-3 \
8,jan_battle_light. \
orig-client 135000 40 172, \
orig-client 135000 40 172, \
orig-client 135000 40 172, \
orig-client 135000 40 172, \
orig-client 135000 40 172, \
orig-client 135000 40 172, \
orig-client 135000 40 172, \
orig-client 135000 40 172, \
dup2-client 135000 40 172 2, \
dup2-client 135000 40 172 2, \
dup2-client 135000 40 172 2, \
dup2-client 135000 40 172 2, \
dup2-client 135000 40 172 2, \
dup2-client 135000 40 172 2, \
dup2-client 135000 40 172 2, \
dup2-client 135000 40 172 2, \
lightning-client 135000 40 172 12 fast_count=3!tick_tock=1!measlat=1!window=2000, \
lightning-client 135000 40 172 12 fast_count=3!tick_tock=1!measlat=1!window=2000, \
lightning-client 135000 40 172 12 fast_count=3!tick_tock=1!measlat=1!window=2000, \
lightning-client 135000 40 172 12 fast_count=3!tick_tock=1!measlat=1!window=2000, \
lightning-client 135000 40 172 12 fast_count=3!tick_tock=1!measlat=1!window=2000, \
lightning-client 135000 40 172 12 fast_count=3!tick_tock=1!measlat=1!window=2000, \
lightning-client 135000 40 172 12 fast_count=3!tick_tock=1!measlat=1!window=2000, \
lightning-client 135000 40 172 12 fast_count=3!tick_tock=1!measlat=1!window=2000, \
lightning-client 135000 40 172 12 fast_count=3!tick_tock=0!measlat=1!window=2000, \
lightning-client 135000 40 172 12 fast_count=3!tick_tock=0!measlat=1!window=2000, \
lightning-client 135000 40 172 12 fast_count=3!tick_tock=0!measlat=1!window=2000, \
lightning-client 135000 40 172 12 fast_count=3!tick_tock=0!measlat=1!window=2000, \
lightning-client 135000 40 172 12 fast_count=3!tick_tock=0!measlat=1!window=2000, \
lightning-client 135000 40 172 12 fast_count=3!tick_tock=0!measlat=1!window=2000, \
lightning-client 135000 40 172 12 fast_count=3!tick_tock=0!measlat=1!window=2000, \
lightning-client 135000 40 172 12 fast_count=3!tick_tock=0!measlat=1!window=2000. \
orig-server-single 135000 40 172, \
orig-server-single 135000 40 172, \
orig-server-single 135000 40 172, \
orig-server-single 135000 40 172, \
orig-server-single 135000 40 172, \
orig-server-single 135000 40 172, \
orig-server-single 135000 40 172, \
orig-server-single 135000 40 172, \
dup2-server-single 135000 40 172 2, \
dup2-server-single 135000 40 172 2, \
dup2-server-single 135000 40 172 2, \
dup2-server-single 135000 40 172 2, \
dup2-server-single 135000 40 172 2, \
dup2-server-single 135000 40 172 2, \
dup2-server-single 135000 40 172 2, \
dup2-server-single 135000 40 172 2, \
lightning-server-single 135000 40 172 12 fast_count=3!tick_tock=1!measlat=1!window=2000, \
lightning-server-single 135000 40 172 12 fast_count=3!tick_tock=1!measlat=1!window=2000, \
lightning-server-single 135000 40 172 12 fast_count=3!tick_tock=1!measlat=1!window=2000, \
lightning-server-single 135000 40 172 12 fast_count=3!tick_tock=1!measlat=1!window=2000, \
lightning-server-single 135000 40 172 12 fast_count=3!tick_tock=1!measlat=1!window=2000, \
lightning-server-single 135000 40 172 12 fast_count=3!tick_tock=1!measlat=1!window=2000, \
lightning-server-single 135000 40 172 12 fast_count=3!tick_tock=1!measlat=1!window=2000, \
lightning-server-single 135000 40 172 12 fast_count=3!tick_tock=1!measlat=1!window=2000, \
lightning-server-single 135000 40 172 12 fast_count=3!tick_tock=0!measlat=1!window=2000, \
lightning-server-single 135000 40 172 12 fast_count=3!tick_tock=0!measlat=1!window=2000, \
lightning-server-single 135000 40 172 12 fast_count=3!tick_tock=0!measlat=1!window=2000, \
lightning-server-single 135000 40 172 12 fast_count=3!tick_tock=0!measlat=1!window=2000, \
lightning-server-single 135000 40 172 12 fast_count=3!tick_tock=0!measlat=1!window=2000, \
lightning-server-single 135000 40 172 12 fast_count=3!tick_tock=0!measlat=1!window=2000, \
lightning-server-single 135000 40 172 12 fast_count=3!tick_tock=0!measlat=1!window=2000, \
lightning-server-single 135000 40 172 12 fast_count=3!tick_tock=0!measlat=1!window=2000. \
tor2 -f /etc/torrc_guard_16, \
tor2 -f /etc/torrc_guard_16, \
tor2 -f /etc/torrc_guard_16, \
tor2 -f /etc/torrc_guard_16, \
tor2 -f /etc/torrc_guard_16, \
tor2 -f /etc/torrc_guard_16, \
tor2 -f /etc/torrc_guard_16, \
tor2 -f /etc/torrc_guard_16, \
tor2 -f /etc/torrc_guard_16, \
tor2 -f /etc/torrc_guard_16, \
tor2 -f /etc/torrc_guard_16, \
tor2 -f /etc/torrc_guard_16, \
tor2 -f /etc/torrc_guard_16, \
tor2 -f /etc/torrc_guard_16, \
tor2 -f /etc/torrc_guard_16, \
tor2 -f /etc/torrc_guard_16, \
tor2 -f /etc/torrc_guard_16, \
tor2 -f /etc/torrc_guard_16, \
tor2 -f /etc/torrc_guard_16, \
tor2 -f /etc/torrc_guard_16, \
tor2 -f /etc/torrc_guard_16, \
tor2 -f /etc/torrc_guard_16, \
tor2 -f /etc/torrc_guard_16, \
tor2 -f /etc/torrc_guard_16, \
tor2 -f /etc/torrc_guard_16, \
tor2 -f /etc/torrc_guard_16, \
tor2 -f /etc/torrc_guard_16, \
tor2 -f /etc/torrc_guard_16, \
tor2 -f /etc/torrc_guard_16, \
tor2 -f /etc/torrc_guard_16, \
tor2 -f /etc/torrc_guard_16, \
tor2 -f /etc/torrc_guard_16. \
tor2 -f /etc/torrc_single_hop_16, \
tor2 -f /etc/torrc_single_hop_16, \
tor2 -f /etc/torrc_single_hop_16, \
tor2 -f /etc/torrc_single_hop_16, \
tor2 -f /etc/torrc_single_hop_16, \
tor2 -f /etc/torrc_single_hop_16, \
tor2 -f /etc/torrc_single_hop_16, \
tor2 -f /etc/torrc_single_hop_16, \
tor2 -f /etc/torrc_single_hop_16, \
tor2 -f /etc/torrc_single_hop_16, \
tor2 -f /etc/torrc_single_hop_16, \
tor2 -f /etc/torrc_single_hop_16, \
tor2 -f /etc/torrc_single_hop_16, \
tor2 -f /etc/torrc_single_hop_16, \
tor2 -f /etc/torrc_single_hop_16, \
tor2 -f /etc/torrc_single_hop_16, \
tor2 -f /etc/torrc_single_hop_16, \
tor2 -f /etc/torrc_single_hop_16, \
tor2 -f /etc/torrc_single_hop_16, \
tor2 -f /etc/torrc_single_hop_16, \
tor2 -f /etc/torrc_single_hop_16, \
tor2 -f /etc/torrc_single_hop_16, \
tor2 -f /etc/torrc_single_hop_16, \
tor2 -f /etc/torrc_single_hop_16, \
tor2 -f /etc/torrc_single_hop_16, \
tor2 -f /etc/torrc_single_hop_16, \
tor2 -f /etc/torrc_single_hop_16, \
tor2 -f /etc/torrc_single_hop_16, \
tor2 -f /etc/torrc_single_hop_16, \
tor2 -f /etc/torrc_single_hop_16, \
tor2 -f /etc/torrc_single_hop_16, \
tor2 -f /etc/torrc_single_hop_16.
32,jan_dcall_light. \
dcall-simple-client 1 360, \
dcall-simple-client 1 360, \
dcall-simple-client 1 360, \
dcall-simple-client 1 360, \
dcall-dup2-client 2 355, \
dcall-dup2-client 2 355, \
dcall-dup2-client 2 355, \
dcall-dup2-client 2 355, \
dcall-lightning-client 12 fast_count=3!tick_tock=1!measlat=0!window=2000 198, \
dcall-lightning-client 12 fast_count=3!tick_tock=1!measlat=0!window=2000 198, \
dcall-lightning-client 12 fast_count=3!tick_tock=1!measlat=0!window=2000 198, \
dcall-lightning-client 12 fast_count=3!tick_tock=1!measlat=0!window=2000 198, \
dcall-lightning-client 12 fast_count=3!tick_tock=0!measlat=0!window=2000 153, \
dcall-lightning-client 12 fast_count=3!tick_tock=0!measlat=0!window=2000 153, \
dcall-lightning-client 12 fast_count=3!tick_tock=0!measlat=0!window=2000 153, \
dcall-lightning-client 12 fast_count=3!tick_tock=0!measlat=0!window=2000 153. \
dcall-simple-server-single 1 360, \
dcall-simple-server-single 1 360, \
dcall-simple-server-single 1 360, \
dcall-simple-server-single 1 360, \
dcall-dup2-server-single 2 355, \
dcall-dup2-server-single 2 355, \
dcall-dup2-server-single 2 355, \
dcall-dup2-server-single 2 355, \
dcall-lightning-server-single 12 fast_count=3!tick_tock=1!measlat=0!window=2000 198, \
dcall-lightning-server-single 12 fast_count=3!tick_tock=1!measlat=0!window=2000 198, \
dcall-lightning-server-single 12 fast_count=3!tick_tock=1!measlat=0!window=2000 198, \
dcall-lightning-server-single 12 fast_count=3!tick_tock=1!measlat=0!window=2000 198, \
dcall-lightning-server-single 12 fast_count=3!tick_tock=0!measlat=0!window=2000 153, \
dcall-lightning-server-single 12 fast_count=3!tick_tock=0!measlat=0!window=2000 153, \
dcall-lightning-server-single 12 fast_count=3!tick_tock=0!measlat=0!window=2000 153, \
dcall-lightning-server-single 12 fast_count=3!tick_tock=0!measlat=0!window=2000 153. \
tor2 -f /etc/torrc_guard_12, \
tor2 -f /etc/torrc_guard_12, \
tor2 -f /etc/torrc_guard_12, \
tor2 -f /etc/torrc_guard_12, \
tor2 -f /etc/torrc_guard_12, \
tor2 -f /etc/torrc_guard_12, \
tor2 -f /etc/torrc_guard_12, \
tor2 -f /etc/torrc_guard_12, \
tor2 -f /etc/torrc_guard_12, \
tor2 -f /etc/torrc_guard_12, \
tor2 -f /etc/torrc_guard_12, \
tor2 -f /etc/torrc_guard_12, \
tor2 -f /etc/torrc_guard_12, \
tor2 -f /etc/torrc_guard_12, \
tor2 -f /etc/torrc_guard_12, \
tor2 -f /etc/torrc_guard_12. \
tor2 -f /etc/torrc_single_hop_12, \
tor2 -f /etc/torrc_single_hop_12, \
tor2 -f /etc/torrc_single_hop_12, \
tor2 -f /etc/torrc_single_hop_12, \
tor2 -f /etc/torrc_single_hop_12, \
tor2 -f /etc/torrc_single_hop_12, \
tor2 -f /etc/torrc_single_hop_12, \
tor2 -f /etc/torrc_single_hop_12, \
tor2 -f /etc/torrc_single_hop_12, \
tor2 -f /etc/torrc_single_hop_12, \
tor2 -f /etc/torrc_single_hop_12, \
tor2 -f /etc/torrc_single_hop_12, \
tor2 -f /etc/torrc_single_hop_12, \
tor2 -f /etc/torrc_single_hop_12, \
tor2 -f /etc/torrc_single_hop_12, \
tor2 -f /etc/torrc_single_hop_12.

View file

@ -0,0 +1,20 @@
#!/bin/bash
mkdir -p $3/{log,shared,res}
donar \
-a dup2 \
-c \
-o $3/shared/onion_services.pub \
-l $1 \
-e 5000 \
-r 5000 \
> $3/log/client-donar-stdout.log 2> $3/log/client-donar-stderr.log &
dcall \
-t filesrc \
-a file:///assets/i_have_a_dream.mp3 \
-s fakesink \
-b 127.0.0.1 \
-l $2 \
-d $3/log/client-dcall-gstreamer.log \
> $3/log/client-dcall-stdout.log 2> $3/log/client-dcall-stderr.log

View file

@ -0,0 +1,20 @@
#!/bin/bash
mkdir -p $3/{log,shared}
cd $3/shared
donar \
-a dup2 \
-s \
-l $1 \
-e 5000 \
-r 5000 \
> ../log/server-donar-stdout.log 2> ../log/server-donar-stderr.log &
dcall \
-t filesrc \
-a file:///assets/i_have_a_dream.mp3 \
-s fakesink \
-b 127.0.0.1 \
-l $2 \
-d ../log/server-dcall-gstreamer.log \
> ../log/server-dcall-stdout.log 2> ../log/server-dcall-stderr.log

View file

@ -0,0 +1,21 @@
#!/bin/bash
mkdir -p $3/{log,shared}
cd $3/shared
donar \
-a dup2 \
-s \
-n \
-l $1 \
-e 5000 \
-r 5000 \
> ../log/server-donar-stdout.log 2> ../log/server-donar-stderr.log &
dcall \
-t filesrc \
-a file:///assets/i_have_a_dream.mp3 \
-s fakesink \
-b 127.0.0.1 \
-l $2 \
-d ../log/server-dcall-gstreamer.log \
> ../log/server-dcall-stdout.log 2> ../log/server-dcall-stderr.log

View file

@ -13,8 +13,9 @@ donar \
dcall \
-t filesrc \
-a /assets/i_have_a_dream.mp3 \
-a file:///assets/i_have_a_dream.mp3 \
-s fakesink \
-b 127.0.0.1 \
-l $3 \
-d $4/log/server-dcall-gstreamer.log \
-d $4/log/client-dcall-gstreamer.log \
> $4/log/client-dcall-stdout.log 2> $4/log/client-dcall-stderr.log

View file

@ -13,8 +13,9 @@ donar \
dcall \
-t filesrc \
-a /assets/i_have_a_dream.mp3 \
-a file:///assets/i_have_a_dream.mp3 \
-s fakesink \
-b 127.0.0.1 \
-l $3 \
-d ../log/server-dcall-gstreamer.log \
> ../log/server-dcall-stdout.log 2> ../log/server-dcall-stderr.log

View file

@ -0,0 +1,22 @@
#!/bin/bash
mkdir -p $4/{log,shared}
cd $4/shared
donar \
-a lightning \
-s \
-n \
-l $1 \
-p $2 \
-e 5000 \
-r 5000 \
> ../log/server-donar-stdout.log 2> ../log/server-donar-stderr.log &
dcall \
-t filesrc \
-a file:///assets/i_have_a_dream.mp3 \
-s fakesink \
-b 127.0.0.1 \
-l $3 \
-d ../log/server-dcall-gstreamer.log \
> ../log/server-dcall-stdout.log 2> ../log/server-dcall-stderr.log

View file

@ -0,0 +1,20 @@
#!/bin/bash
mkdir -p $3/{log,shared,res}
donar \
-a naive \
-c \
-o $3/shared/onion_services.pub \
-l $1 \
-e 5000 \
-r 5000 \
> $3/log/client-donar-stdout.log 2> $3/log/client-donar-stderr.log &
dcall \
-t filesrc \
-a file:///assets/i_have_a_dream.mp3 \
-s fakesink \
-b 127.0.0.1 \
-l $2 \
-d $3/log/client-dcall-gstreamer.log \
> $3/log/client-dcall-stdout.log 2> $3/log/client-dcall-stderr.log

View file

@ -0,0 +1,20 @@
#!/bin/bash
mkdir -p $3/{log,shared}
cd $3/shared
donar \
-a naive \
-s \
-l $1 \
-e 5000 \
-r 5000 \
> ../log/server-donar-stdout.log 2> ../log/server-donar-stderr.log &
dcall \
-t filesrc \
-a file:///assets/i_have_a_dream.mp3 \
-s fakesink \
-b 127.0.0.1 \
-l $2 \
-d ../log/server-dcall-gstreamer.log \
> ../log/server-dcall-stdout.log 2> ../log/server-dcall-stderr.log

View file

@ -0,0 +1,21 @@
#!/bin/bash
mkdir -p $3/{log,shared}
cd $3/shared
donar \
-a naive \
-s \
-n \
-l $1 \
-e 5000 \
-r 5000 \
> ../log/server-donar-stdout.log 2> ../log/server-donar-stderr.log &
dcall \
-t filesrc \
-a file:///assets/i_have_a_dream.mp3 \
-s fakesink \
-b 127.0.0.1 \
-l $2 \
-d ../log/server-dcall-gstreamer.log \
> ../log/server-dcall-stdout.log 2> ../log/server-dcall-stderr.log

View file

@ -5,7 +5,6 @@ donar \
-c \
-o $5/shared/onion_services.pub \
-l $4 \
-b \
-r 9000 \
> $5/log/client-donar-stdout.log 2> $5/log/client-donar-stderr.log &
sleep 2

View file

@ -11,7 +11,6 @@ donar \
-a dup2 \
-s \
-l $4 \
-b \
-e 9000 \
> ../log/server-donar-stdout.log 2> ../log/server-donar-stderr.log &

View file

@ -6,7 +6,6 @@ donar \
-o $6/shared/onion_services.pub \
-l $4 \
-p $5 \
-b \
-r 9000 \
> $6/log/client-donar-stdout.log 2> $6/log/client-donar-stderr.log &
sleep 2

View file

@ -21,7 +21,6 @@ donar \
-s \
-l $4 \
-p $5 \
-b \
-e 9000 \
> ../log/server-donar-stdout.log 2> ../log/server-donar-stderr.log &

View file

@ -25,8 +25,11 @@ def compute_dropped(s):
s['current']['missing'].append((start, s['current']['npkt'], 1+s['current']['npkt']-start))
t = s['current']['missing']
t = filter(lambda p: (lambda start, stop, diff: start != 0)(*p), t)
# Don't consider first 10 seconds are links are still being connected
t = filter(lambda p: (lambda start, stop, diff: start > 250)(*p), t)
# Below 1 second continuous drop, don't consider the call dropped
t = filter(lambda p: (lambda start, stop, diff: diff > 25)(*p), t)
# Don't consider the last drop as it is already parsed elsewhere
t = filter(lambda p: (lambda start, stop, diff: stop != s['current']['npkt'])(*p), t)
t = [x for x in t]
if len(t) > 0:

View file

@ -39,6 +39,7 @@ done
echo ":: Bootstrap"
echo "Create output folder..."
docker pull registry.gitlab.inria.fr/qdufour/donar
docker run \
--rm \
--user root \

View file

@ -49,6 +49,11 @@ int algo_naive_on_datagram(struct evt_core_ctx* ctx, struct evt_core_fdinfo* fdi
}
int algo_naive_on_err(struct evt_core_ctx *ctx, struct evt_core_fdinfo *fdinfo) {
// We do nothing
struct algo_ctx* app_ctx = fdinfo->cat->app_ctx;
if (strcmp("tcp-read", fdinfo->cat->name) == 0 || strcmp("tcp-write", fdinfo->cat->name) == 0)
return app_ctx->ap.sr(ctx, fdinfo);
fprintf(stderr, "%s is not eligible for a reconnect\n", fdinfo->url);
// We do nothing
return 1;
}

View file

@ -12,9 +12,10 @@ struct dcall_elements {
GstElement *pipeline;
GstElement *rx_tap, *rx_jitterbuffer, *rx_depay, *rx_opusdec, *rx_resample, *rx_echocancel, *rx_pulse, *rx_fakesink;
GstElement *tx_pulse, *tx_filesrc, *tx_mpegaudioparse, *tx_mpgaudiodec, *tx_audioconvert, *tx_echocancel, *tx_queue, *tx_resample, *tx_opusenc, *tx_pay, *tx_sink;
char *remote_host, *audio_tap, *audio_sink, *audio_file, *gstreamer_log_path;
int remote_port, latency;
char *local_host, *remote_host, *audio_tap, *audio_sink, *audio_file, *gstreamer_log_path;
int remote_port, local_port, latency;
guint64 grtppktlost;
GMainLoop *loop;
};
int create_rx_chain(struct dcall_elements* de) {
@ -32,8 +33,8 @@ int create_rx_chain(struct dcall_elements* de) {
return -1;
}
g_object_set(G_OBJECT (de->rx_tap), "port", 5000, NULL);
//g_object_set(G_OBJECT (rx_tap), "address", "127.0.0.1", NULL);
g_object_set(G_OBJECT (de->rx_tap), "port", de->local_port, NULL);
g_object_set(G_OBJECT (de->rx_tap), "address", de->local_host, NULL);
g_object_set(G_OBJECT (de->rx_tap), "caps", gst_caps_new_simple("application/x-rtp", "media", G_TYPE_STRING, "audio", NULL), NULL);
g_object_set(G_OBJECT (de->rx_jitterbuffer), "do-lost", TRUE, NULL);
@ -65,9 +66,56 @@ int create_rx_chain(struct dcall_elements* de) {
return 0;
}
static void uridecodebin_newpad (GstElement *src, GstPad *new_pad, gpointer data) {
struct dcall_elements *de = data;
GstPad *sink_pad = gst_element_get_static_pad (de->tx_audioconvert, "sink");
GstPadLinkReturn ret;
GstCaps *new_pad_caps = NULL;
GstStructure *new_pad_struct = NULL;
const gchar *new_pad_type = NULL;
g_print ("Received new pad '%s' from '%s':\n", GST_PAD_NAME (new_pad), GST_ELEMENT_NAME (src));
/* If our converter is already linked, we have nothing to do here */
if (gst_pad_is_linked (sink_pad)) {
g_print ("We are already linked. Ignoring.\n");
goto exit;
}
/* Check the new pad's type */
new_pad_caps = gst_pad_get_current_caps (new_pad);
new_pad_struct = gst_caps_get_structure (new_pad_caps, 0);
new_pad_type = gst_structure_get_name (new_pad_struct);
if (!g_str_has_prefix (new_pad_type, "audio/x-raw")) {
g_print ("It has type '%s' which is not raw audio. Ignoring.\n", new_pad_type);
goto exit;
}
/* Attempt the link */
ret = gst_pad_link (new_pad, sink_pad);
if (GST_PAD_LINK_FAILED (ret)) {
g_print ("Type is '%s' but link failed.\n", new_pad_type);
} else {
g_print ("Link succeeded (type '%s').\n", new_pad_type);
}
exit:
/* Unreference the new pad's caps, if we got them */
if (new_pad_caps != NULL)
gst_caps_unref (new_pad_caps);
/* Unreference the sink pad */
gst_object_unref (sink_pad);
}
static void uridecodebin_drained (GstElement *src, gpointer data) {
struct dcall_elements *de = data;
g_main_loop_quit (de->loop);
}
int create_tx_chain(struct dcall_elements* de) {
de->tx_pulse = gst_element_factory_make("pulsesrc", "tx-pulse");
de->tx_filesrc = gst_element_factory_make("filesrc", "tx-filesrc");
de->tx_filesrc = gst_element_factory_make("uridecodebin", "tx-filesrc");
de->tx_mpegaudioparse = gst_element_factory_make("mpegaudioparse", "tx-mpegaudioparse");
de->tx_mpgaudiodec = gst_element_factory_make("mpg123audiodec", "tx-mpgaudiodec");
de->tx_audioconvert = gst_element_factory_make("audioconvert", "tx-audioconvert");
@ -107,14 +155,16 @@ int create_tx_chain(struct dcall_elements* de) {
g_object_set (de->tx_pulse, "stream-properties", props, NULL);
gst_structure_free (props);
g_object_set(de->tx_filesrc, "location", de->audio_file, NULL);
g_object_set(de->tx_filesrc, "uri", de->audio_file, NULL);
if (strcmp(de->audio_tap, "pulsesrc") == 0) {
gst_bin_add_many(GST_BIN(de->pipeline), de->tx_pulse, de->tx_echocancel, de->tx_queue, de->tx_resample, de->tx_opusenc, de->tx_pay, de->tx_sink, NULL);
gst_element_link_many(de->tx_pulse, de->tx_resample, de->tx_echocancel, de->tx_queue, de->tx_opusenc, de->tx_pay, de->tx_sink, NULL);
} else if (strcmp(de->audio_tap, "filesrc") == 0) {
gst_bin_add_many(GST_BIN(de->pipeline), de->tx_filesrc, de->tx_mpegaudioparse, de->tx_mpgaudiodec, de->tx_audioconvert, de->tx_queue, de->tx_resample, de->tx_opusenc, de->tx_pay, de->tx_sink, NULL);
gst_element_link_many(de->tx_filesrc, de->tx_mpegaudioparse, de->tx_mpgaudiodec, de->tx_audioconvert, de->tx_resample, de->tx_queue, de->tx_opusenc, de->tx_pay, de->tx_sink, NULL);
gst_element_link_many(de->tx_audioconvert, de->tx_resample, de->tx_queue, de->tx_opusenc, de->tx_pay, de->tx_sink, NULL);
g_signal_connect (de->tx_filesrc, "pad-added", G_CALLBACK (uridecodebin_newpad), de);
g_signal_connect (de->tx_filesrc, "drained", G_CALLBACK(uridecodebin_drained), de);
} else {
fprintf(stderr, "Wrong audio tap %s, exiting...\n", de->audio_tap);
exit(EXIT_FAILURE);
@ -165,24 +215,32 @@ gboolean stop_handler(gpointer user_data) {
}
int main(int argc, char *argv[]) {
GMainLoop *loop;
GstBus *bus;
struct dcall_elements de = {
.audio_file = "voice.mp3",
.audio_file = "file://./voice.mp3",
.gstreamer_log_path = "dcall.log",
.latency = 150,
.remote_port = 5000,
.remote_host = "127.13.3.7",
.remote_port = 5000,
.local_host = "0.0.0.0",
.local_port = 5000,
.audio_sink = "pulsesink",
.audio_tap = "pulsesrc",
.grtppktlost = 0
};
int opt = 0;
while ((opt = getopt(argc, argv, "t:s:r:p:l:d:a:h")) != -1) {
while ((opt = getopt(argc, argv, "t:s:r:p:l:d:a:hb:c:")) != -1) {
switch(opt) {
case 'a': //latency
case 'a':
de.audio_file = optarg;
break;
case 'b':
de.local_host = optarg;
break;
case 'c':
de.local_port = atoi(optarg);
case 'd':
de.gstreamer_log_path = optarg;
break;
@ -208,12 +266,14 @@ int main(int argc, char *argv[]) {
break;
}
}
printf("dcall configuration:\n\tnetwork in: %s:%d, out: %s:%d\n\taudio in: %s, out: %s\n\tmisc latency: %dms, audio_file: %s\n",
de.local_host, de.local_port, de.remote_host, de.remote_port, de.audio_tap, de.audio_sink, de.latency, de.audio_file);
setenv("GST_DEBUG_FILE", de.gstreamer_log_path, 0);
setenv("GST_DEBUG", "3,opusdec:5", 0);
gst_init (&argc, &argv);
loop = g_main_loop_new (NULL, FALSE);
de.loop = g_main_loop_new (NULL, FALSE);
de.pipeline = gst_pipeline_new ("pipeline");
if (!de.pipeline) {
@ -226,11 +286,11 @@ int main(int argc, char *argv[]) {
gst_element_set_state (de.pipeline, GST_STATE_PLAYING);
g_unix_signal_add (SIGTERM, stop_handler, loop);
g_unix_signal_add (SIGINT, stop_handler, loop);
g_unix_signal_add (SIGTERM, stop_handler, de.loop);
g_unix_signal_add (SIGINT, stop_handler, de.loop);
g_print ("Running...\n");
g_main_loop_run (loop);
g_main_loop_run (de.loop);
g_print ("Main loop stopped...\n");
@ -247,7 +307,7 @@ int main(int argc, char *argv[]) {
gst_element_set_state (de.pipeline, GST_STATE_NULL);
gst_object_unref (GST_OBJECT (de.pipeline));
g_main_loop_unref (loop);
g_main_loop_unref (de.loop);
return 0;
}

View file

@ -7,12 +7,11 @@ void load_onion_services(struct donar_client_ctx* ctx, char* onion_file, int por
void init_socks5_client(struct donar_client_ctx* app_ctx, int pos) {
char target_host[255];
if (strlen(app_ctx->tos.keys[pos].pub) > 254) {
fprintf(stderr, "Domain name is too long\n");
exit(EXIT_FAILURE);
}
sprintf(target_host, "%s.onion", app_ctx->tos.keys[pos].pub);
if (strlen(app_ctx->tos.keys[0].pub) > 254) {
fprintf(stderr, "Domain name is too long\n");
exit(EXIT_FAILURE);
}
sprintf(target_host, "%s.onion", app_ctx->tos.keys[0].pub);
app_ctx->ports[pos] = 7500 + pos;
socks5_create_dns_client (&app_ctx->evts, "127.0.0.1", "9050", target_host, app_ctx->ports[pos]);
@ -44,13 +43,31 @@ failed:
exit(EXIT_FAILURE);
}
void reinit_socks5(struct evt_core_ctx* ctx, void* user_data) {
// @FIXME: Ugly way to get donar_client_ctx. Shame on me :/
struct evt_core_cat* cat = evt_core_get_from_cat (ctx, "socks5-failed");
if (cat == NULL) {
fprintf(stderr, "Unable to reconnect stream as socks5-failed cat is not available...\n");
exit(EXIT_FAILURE);
}
struct donar_client_ctx* app_ctx = cat->app_ctx;
int64_t pos = (int64_t) user_data; // trust me...
fprintf(stdout, "[%s][donar-client] We have waited enough, retriggering socks5 for port %ld\n", current_human_datetime (), pos+7500);
init_socks5_client (app_ctx, pos);
}
int on_socks5_failed(struct evt_core_ctx* ctx, struct evt_core_fdinfo* fdinfo) {
struct donar_client_ctx* app_ctx = fdinfo->cat->app_ctx;
struct socks5_ctx* s5ctx = fdinfo->other;
int pos = s5ctx->port - 7500;
int64_t pos = 0;
pos = s5ctx->port - 7500;
int64_t to_wait_sec = 30 + pos*3;
fprintf(stdout, "[%s][donar-client] Retriggering socks5 in %ld seconds for port %d\n", current_human_datetime (), to_wait_sec, s5ctx->port);
set_timeout(ctx, 1000 * to_wait_sec, (void*) pos, reinit_socks5);
evt_core_rm_fd (ctx, fdinfo->fd);
init_socks5_client (app_ctx, pos);
//init_socks5_client (app_ctx, pos);
return 1;
}
@ -70,18 +87,11 @@ void init_socks5_sinks(struct donar_client_ctx* app_ctx) {
}
int donar_client_stream_repair(struct evt_core_ctx* ctx, struct evt_core_fdinfo* fdinfo) {
// @FIXME: Ugly way to get donar_client_ctx. Shame on me :/
fprintf(stdout, "[%s][donar-client] %s broke\n", current_human_datetime (), fdinfo->url);
struct evt_core_cat* cat = evt_core_get_from_cat (ctx, "socks5-failed");
if (cat == NULL) {
fprintf(stderr, "Unable to reconnect stream as socks5-failed cat is not available...\n");
exit(EXIT_FAILURE);
}
struct donar_client_ctx* app_ctx = cat->app_ctx;
struct evt_core_fdinfo* fdtarget = NULL;
int port = url_get_port_int (fdinfo->url);
int pos = port - 7500, removed = 0;
int64_t pos = 0, removed = 0;
pos = port - 7500;
char buffer[256];
sprintf(buffer, "tcp:read:127.0.0.1:%d", port);
@ -99,15 +109,17 @@ int donar_client_stream_repair(struct evt_core_ctx* ctx, struct evt_core_fdinfo*
}
if (removed == 2) {
fprintf(stdout, "[%s][donar-client] Retriggering socks5 for port %d\n", current_human_datetime (), port);
init_socks5_client (app_ctx, pos);
int64_t to_wait_sec = 10 + pos*3;
fprintf(stdout, "[%s][donar-client] Retriggering socks5 in %ld seconds for port %d\n", current_human_datetime (), to_wait_sec, port);
set_timeout(ctx, 1000 * to_wait_sec, (void*) pos, reinit_socks5);
//init_socks5_client (app_ctx, pos);
return 1;
} else if (removed == 0) {
fprintf(stdout, "[%s][donar-client] Socks5 has already been retriggered for port %d\n", current_human_datetime (), port);
return 1;
} else {
fprintf(stderr, "[%s][donar-client] We only removed 1 link and not 2 for port %d, strange behaviour, exiting...\n", current_human_datetime (), port);
exit(EXIT_FAILURE);
fprintf(stderr, "[%s][donar-client] We only removed 1 link and not 2 for port %d\n", current_human_datetime (), port);
//exit(EXIT_FAILURE);
}
}
@ -138,8 +150,13 @@ void donar_client(struct donar_client_ctx* ctx, struct donar_params* dp) {
load_onion_services (ctx, dp->onion_file, dp->links);
printf("--- Onion services loaded\n");
for (int i = 0; i < dp->links; i++) {
init_socks5_client(ctx, i);
init_timer(&ctx->evts);
printf("--- Inited Timer\n");
for (int64_t i = 0; i < dp->links; i++) {
int64_t to_wait_sec = i * 3;
fprintf(stdout, "[%s][donar-client] Triggering socks5 in %ld seconds for port %d\n", current_human_datetime (), to_wait_sec, i+7500);
set_timeout(&ctx->evts, 1000 * to_wait_sec, (void*) i, reinit_socks5);
}
printf("--- TCP Clients Connected\n");
@ -153,5 +170,6 @@ void donar_client(struct donar_client_ctx* ctx, struct donar_params* dp) {
evt_core_loop(&(ctx->evts));
//stop_timer(&(ctx->evts));
tor_os_free (&(ctx->tos));
}

View file

@ -6,6 +6,7 @@
#include "socks5.h"
#include "proxy.h"
#include "donar_init.h"
#include "timer.h"
#define CLIENT_PORT_SIZE 64

View file

@ -1,7 +1,7 @@
#include "donar_server.h"
void 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", 1);
tor_os_read (tos);
int err = 0;
@ -10,7 +10,7 @@ void create_onion_services(struct tor_os_str* tos, struct tor_ctl* tctl, uint16_
fprintf(stderr, "Unable to open Tor Socket\n");
exit(EXIT_FAILURE);
}
err = tor_ctl_add_onion (tctl, tos, ports, tof);
err = tor_ctl_add_onion (tctl, tos, ports, ports_count, tof);
if (err != 0) {
fprintf(stderr, "Unable to create Onion Services (error: %d)\n", err);
exit(EXIT_FAILURE);
@ -82,7 +82,7 @@ struct donar_server_os_republish_params {
struct donar_server_ctx* dctx;
struct donar_params* dp;
};
/*
void republish_tor_os(struct evt_core_ctx* ctx, void* user_data) {
struct donar_server_os_republish_params* dsorp = user_data;
@ -94,7 +94,7 @@ void republish_tor_os(struct evt_core_ctx* ctx, void* user_data) {
exit(EXIT_FAILURE);
}
printf("Republish Tor OS\n");
}
}*/
void donar_server(struct donar_server_ctx* ctx, struct donar_params* dp) {
struct algo_params ap = {

View file

@ -215,7 +215,7 @@ void timing_fx_start(struct timing_fx* tfx, ...) {
va_end(args);
}
if (clock_gettime(CLOCK_REALTIME, &tfx->start) == -1) {
if (clock_gettime(CLOCK_MONOTONIC, &tfx->start) == -1) {
perror("clock_gettime");
exit(EXIT_FAILURE);
}
@ -228,7 +228,7 @@ double timing_fx_stop(struct timing_fx* tfx, ...) {
if (!(tfx->config & TIMING_ACTIVATED)) return 0.;
if (clock_gettime(CLOCK_REALTIME, &stop) == -1) {
if (clock_gettime(CLOCK_MONOTONIC, &stop) == -1) {
perror("clock_gettime");
exit(EXIT_FAILURE);
}

View file

@ -39,7 +39,7 @@ void register_timer(struct evt_core_ctx* evts, struct timespec* next_tick) {
mctx->is_timer_started = 1;
if (clock_gettime(CLOCK_REALTIME, &now) == -1) {
if (clock_gettime(CLOCK_MONOTONIC, &now) == -1) {
perror("clock_gettime");
exit(EXIT_FAILURE);
}
@ -51,7 +51,7 @@ void register_timer(struct evt_core_ctx* evts, struct timespec* next_tick) {
printf("timer_config: sec=%ld nsec=%ld \n", (uint64_t) timer_config.it_value.tv_sec, (uint64_t) timer_config.it_value.tv_nsec);
fdinfo.fd = timerfd_create(CLOCK_REALTIME, 0);
fdinfo.fd = timerfd_create(CLOCK_MONOTONIC, 0);
if (fdinfo.fd == -1) {
perror("Unable to timerfd_create");
exit(EXIT_FAILURE);
@ -71,27 +71,37 @@ int on_receive_measure_packet_err(struct evt_core_ctx* ctx, struct evt_core_fdin
}
int on_receive_measure_packet(struct evt_core_ctx* ctx, struct evt_core_fdinfo* fdinfo) {
ssize_t nread;
struct measlat_ctx* mctx = fdinfo->cat->app_ctx;
ssize_t nread;
if (mctx->is_from_needed) nread = recvfrom(fdinfo->fd, mctx->mc.payload, mctx->mc.payload_size, MSG_TRUNC, (struct sockaddr*)&mctx->addr, &mctx->addrlen);
else nread = recv(fdinfo->fd, mctx->mc.payload, mctx->mc.payload_size, 0);
if (mctx->mc.read_size >= mctx->mc.payload_size || strcmp(mctx->transport, "udp") == 0) mctx->mc.read_size = 0;
if ((nread == -1 && errno == EAGAIN) || nread == 0) return 1;
// @FIXME logic is wrong for TCP here but would lead (hopefully) to a crash
if (mctx->is_from_needed) {
nread = recvfrom(fdinfo->fd, mctx->mc.payload_rcv, mctx->mc.payload_size, MSG_TRUNC, (struct sockaddr*)&mctx->addr, &mctx->addrlen);
} else {
nread = recv(fdinfo->fd, mctx->mc.payload_rcv + mctx->mc.read_size, mctx->mc.payload_size - mctx->mc.read_size, 0);
}
if (nread > 0) mctx->mc.read_size += nread;
if ((nread == -1 && errno == EAGAIN) || nread == 0) {
return 1;
}
if (strcmp("udp", mctx->transport) != 0 && mctx->mc.read_size < mctx->mc.payload_size) {
return 0;
}
// First we parse the packet and exit if needed
measure_parse (nread, &mctx->mc);
measure_parse (mctx->mc.read_size, &mctx->mc);
// Old behaviour where we work in a RTT way and send back the packet
if (measure_need_reply (&mctx->mc)) {
ssize_t nwritten;
if (mctx->is_from_needed) nwritten = sendto(fdinfo->fd, mctx->mc.payload, nread, 0, (struct sockaddr*)&mctx->addr, mctx->addrlen);
else nwritten = send(fdinfo->fd, mctx->mc.payload, nread, 0);
if (mctx->is_from_needed) nwritten = sendto(fdinfo->fd, mctx->mc.payload, mctx->mc.read_size, 0, (struct sockaddr*)&mctx->addr, mctx->addrlen);
else nwritten = send(fdinfo->fd, mctx->mc.payload, mctx->mc.read_size, 0);
// @FIXME don't support EAGAIN on write. Could be intended, you don't think so?
if (nwritten != nread) {
fprintf(stderr, "Didn't write the same number of bytes as read. nread=%ld, nwritten=%ld\n", nread, nwritten);
if (nwritten != mctx->mc.read_size) {
fprintf(stderr, "Didn't write the same number of bytes as read. nread=%ld, nwritten=%ld\n", mctx->mc.read_size, nwritten);
perror("write errno");
exit(EXIT_FAILURE);
}
@ -173,9 +183,9 @@ int on_timer(struct evt_core_ctx* ctx, struct evt_core_fdinfo* fdinfo) {
if (mctx->is_from_needed) s = sendto(tgtinfo->fd, mctx->mc.payload, mctx->mc.payload_size, 0, (struct sockaddr*)&mctx->addr, mctx->addrlen);
else s = send(tgtinfo->fd, mctx->mc.payload, mctx->mc.payload_size, 0);
if (s < 0) {
if (s < 0 || s != mctx->mc.payload_size) {
perror("Send error");
//exit(EXIT_FAILURE);
exit(EXIT_FAILURE);
}
return 0;
@ -340,7 +350,7 @@ void spawn_tor_server(struct evt_core_ctx* evts, uint16_t *ports) {
}
void measlat_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", 1);
tor_os_read (tos);
int err = 0;
@ -349,7 +359,7 @@ void measlat_create_onion_services(struct tor_os_str* tos, struct tor_ctl* tctl,
fprintf(stderr, "Unable to open Tor Socket\n");
exit(EXIT_FAILURE);
}
err = tor_ctl_add_onion (tctl, tos, ports, tof);
err = tor_ctl_add_onion (tctl, tos, ports, ports_count, tof);
if (err != 0) {
fprintf(stderr, "Unable to create Onion Services (error: %d)\n", err);
exit(EXIT_FAILURE);

View file

@ -4,11 +4,29 @@ void measure_parse(int size, struct measure_conf* mc) {
struct timespec curr;
uint64_t micro_sec;
if (size != mc->payload_size) {
fprintf(stderr, "read size: %d, expected: %ld\n", size, mc->payload_size);
int i;
fprintf(stderr, "received buffer:\n");
for (i = 0; i < mc->payload_size; i++) {
if (i > 0) fprintf(stderr, ":");
fprintf(stderr, "%02x", (unsigned char) mc->payload_rcv[i]);
}
fprintf(stderr, "\n");
fprintf(stderr, "local buffer (reference):\n");
for (i = 0; i < mc->payload_size; i++) {
if (i > 0) fprintf(stderr, ":");
fprintf(stderr, "%02X", (unsigned char) mc->payload[i]);
}
fprintf(stderr, "\n");
perror("read error, payload has wrong size");
exit(EXIT_FAILURE);
//exit(EXIT_FAILURE);
}
struct measure_packet* head = (struct measure_packet*) mc->payload;
if (clock_gettime(CLOCK_REALTIME, &curr) == -1){
struct measure_packet* head = (struct measure_packet*) mc->payload_rcv;
if (clock_gettime(CLOCK_MONOTONIC, &curr) == -1){
perror("clock_gettime error");
exit(EXIT_FAILURE);
}
@ -43,6 +61,12 @@ void measure_prepare(struct measure_conf* mc) {
}
memset(mc->payload, 0, mc->payload_size);
if ((mc->payload_rcv = malloc(sizeof(char) * mc->payload_size)) == NULL) {
perror("payload malloc failed");
exit(EXIT_FAILURE);
}
memset(mc->payload_rcv, 0, mc->payload_size);
char *my_msg = "Tu n'es pas tout a fait la misere,\nCar les levres les plus pauvres te denoncent\nPar un sourire.";
size_t msg_len = strlen(my_msg);
size_t cursor_msg = 0;
@ -58,7 +82,7 @@ struct measure_packet* measure_generate(struct measure_conf* mc) {
head->counter = mc->counter;
head->is_echo = mc->is_rtt && !mc->is_server;
head->flag = 0;
if (clock_gettime(CLOCK_REALTIME, &head->emit_time) == -1) {
if (clock_gettime(CLOCK_MONOTONIC, &head->emit_time) == -1) {
perror("clock_gettime error");
exit(EXIT_FAILURE);
}
@ -66,11 +90,11 @@ struct measure_packet* measure_generate(struct measure_conf* mc) {
}
void measure_next_tick(struct measure_conf *mc, struct timespec *next) {
struct measure_packet *head = (struct measure_packet*) mc->payload;
struct measure_packet *head = (struct measure_packet*) mc->payload_rcv;
struct timespec now, *sent_at = &head->emit_time;
mc->counter = head->counter;
if (clock_gettime(CLOCK_REALTIME, &now) == -1) {
if (clock_gettime(CLOCK_MONOTONIC, &now) == -1) {
perror("clock_gettime error");
exit(EXIT_FAILURE);
}

View file

@ -9,8 +9,10 @@
struct measure_conf {
uint64_t max_measure;
uint64_t payload_size;
uint64_t read_size;
uint64_t interval;
char* payload;
char* payload_rcv;
uint64_t counter;
uint8_t is_server, is_rtt;
};

View file

@ -34,7 +34,7 @@ int create_ip_client(char* host, char* service, int type) {
}
if (cursor == NULL) {
fprintf(stderr, "No connect worked\n");
fprintf(stderr, "No connect worked for %s:%s\n", host, service);
exit(EXIT_FAILURE);
}

View file

@ -55,7 +55,7 @@ int set_timeout(struct evt_core_ctx* evts, uint64_t milli_sec, void* ctx, timer_
fdinfo.url = url;
//printf("Will add a timeout of %ld ms\n", milli_sec);
if (clock_gettime(CLOCK_REALTIME, &now) == -1) {
if (clock_gettime(CLOCK_MONOTONIC, &now) == -1) {
perror("clock_gettime");
exit(EXIT_FAILURE);
}
@ -66,7 +66,7 @@ int set_timeout(struct evt_core_ctx* evts, uint64_t milli_sec, void* ctx, timer_
timer_config.it_interval.tv_sec = 60;
timer_config.it_interval.tv_nsec = 0;
fdinfo.fd = timerfd_create(CLOCK_REALTIME, 0);
fdinfo.fd = timerfd_create(CLOCK_MONOTONIC, 0);
if (fdinfo.fd == -1) {
perror("Unable to timerfd_create");
exit(EXIT_FAILURE);

View file

@ -51,7 +51,7 @@ void tor_ctl_list_onions(struct tor_ctl* ctx) {
}
}
int tor_ctl_add_onion(struct tor_ctl* ctx, struct tor_os_str* tos, uint16_t* port, enum TOR_ONION_FLAGS flags) {
int tor_ctl_add_onion(struct tor_ctl* ctx, struct tor_os_str* tos, uint16_t* port, uint64_t port_per_os, enum TOR_ONION_FLAGS flags) {
int err = 0;
char buffer1[1024] = {0};
char buffer2[1024] = {0};
@ -59,12 +59,14 @@ int tor_ctl_add_onion(struct tor_ctl* ctx, struct tor_os_str* tos, uint16_t* por
/* Add onion services loaded from file */
for (int i = 0; i < tos->filled; i++) {
if (flags == TOR_ONION_FLAG_NONE)
fprintf(ctx->wsock, "add_onion %s Port=%d,127.13.3.7:%d\n", tos->keys[i].priv, port[i], port[i]);
fprintf(ctx->wsock, "add_onion %s ", tos->keys[i].priv);
for (int j = 0; j < port_per_os; j++) {
fprintf(ctx->wsock, "Port=%d,127.13.3.7:%d ", port[i*port_per_os+j], port[i*port_per_os+j]);
}
if (flags == TOR_ONION_FLAG_NONE) fprintf(ctx->wsock, "\n");
else {
fprintf(ctx->wsock, "add_onion %s Port=%d,127.13.3.7:%d Flags=", tos->keys[i].priv, port[i], port[i]);
if (flags & TOR_ONION_FLAG_NON_ANONYMOUS)
fprintf(ctx->wsock, "NonAnonymous,");
fprintf(ctx->wsock, "Flags=");
if (flags & TOR_ONION_FLAG_NON_ANONYMOUS) fprintf(ctx->wsock, "NonAnonymous,");
fprintf(ctx->wsock, "\n");
}
@ -80,14 +82,17 @@ int tor_ctl_add_onion(struct tor_ctl* ctx, struct tor_os_str* tos, uint16_t* por
/* Complete by creating new onion services */
for (int i = tos->filled; i < tos->size; i++) {
if (flags == TOR_ONION_FLAG_NONE)
fprintf(ctx->wsock, "add_onion NEW:ED25519-V3 Port=%d\n", port[i]);
fprintf(ctx->wsock, "add_onion NEW:ED25519-V3 ");
for (int j = 0; j < port_per_os; j++) {
fprintf(ctx->wsock, "Port=%d,127.13.3.7:%d ", port[i*port_per_os+j], port[i*port_per_os+j]);
}
if (flags == TOR_ONION_FLAG_NONE) fprintf(ctx->wsock, "\n");
else {
fprintf(ctx->wsock, "add_onion NEW:ED25519-V3 Port=%d Flags=", port[i]);
if (flags & TOR_ONION_FLAG_NON_ANONYMOUS)
fprintf(ctx->wsock, "NonAnonymous,");
fprintf(ctx->wsock, "Flags=");
if (flags & TOR_ONION_FLAG_NON_ANONYMOUS) fprintf(ctx->wsock, "NonAnonymous,");
fprintf(ctx->wsock, "\n");
}
//fprintf(ctx->wsock, "add_onion NEW:RSA1024 Port=%d\n", port[i]);
fscanf(ctx->rsock, "%d", &err);

View file

@ -20,6 +20,6 @@ enum TOR_ONION_FLAGS {
};
int tor_ctl_connect(struct tor_ctl* ctx, char* addr, char* service);
int tor_ctl_add_onion(struct tor_ctl* ctx, struct tor_os_str* tos, uint16_t* port, enum TOR_ONION_FLAGS flags);
int tor_ctl_add_onion(struct tor_ctl* ctx, struct tor_os_str* tos, uint16_t* port, uint64_t port_per_os, enum TOR_ONION_FLAGS flags);
void tor_ctl_list_onions(struct tor_ctl* ctx);
void tor_ctl_close(struct tor_ctl* ctx);

View file

@ -14,7 +14,7 @@ struct torecho_ctx {
};
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", 1);
tor_os_read (tos);
int err = 0;
@ -23,7 +23,7 @@ void te_create_onion_services(struct tor_os_str* tos, struct tor_ctl* tctl, uint
fprintf(stderr, "Unable to open Tor Socket\n");
exit(EXIT_FAILURE);
}
err = tor_ctl_add_onion (tctl, tos, ports, tof);
err = tor_ctl_add_onion (tctl, tos, ports, ports_count, tof);
if (err != 0) {
fprintf(stderr, "Unable to create Onion Services (error: %d)\n", err);
exit(EXIT_FAILURE);

View file

@ -3,4 +3,5 @@ UseEntryGuards 1
NumEntryGuards 1
NumPrimaryGuards 1
SafeLogging 0
SocksPort 127.0.0.1:9050 IsolateDestPort
#Log INFO stdout

7
torrc_guard_10 Normal file
View file

@ -0,0 +1,7 @@
ControlPort 9051
UseEntryGuards 1
NumEntryGuards 10
NumPrimaryGuards 10
SafeLogging 0
SocksPort 127.0.0.1:9050 IsolateDestPort
#Log INFO stdout

7
torrc_guard_11 Normal file
View file

@ -0,0 +1,7 @@
ControlPort 9051
UseEntryGuards 1
NumEntryGuards 11
NumPrimaryGuards 11
SafeLogging 0
SocksPort 127.0.0.1:9050 IsolateDestPort
#Log INFO stdout

View file

@ -3,4 +3,5 @@ UseEntryGuards 1
NumEntryGuards 12
NumPrimaryGuards 12
SafeLogging 0
SocksPort 127.0.0.1:9050 IsolateDestPort
#Log INFO stdout

7
torrc_guard_13 Normal file
View file

@ -0,0 +1,7 @@
ControlPort 9051
UseEntryGuards 1
NumEntryGuards 13
NumPrimaryGuards 13
SafeLogging 0
SocksPort 127.0.0.1:9050 IsolateDestPort
#Log INFO stdout

7
torrc_guard_14 Normal file
View file

@ -0,0 +1,7 @@
ControlPort 9051
UseEntryGuards 1
NumEntryGuards 14
NumPrimaryGuards 14
SafeLogging 0
SocksPort 127.0.0.1:9050 IsolateDestPort
#Log INFO stdout

7
torrc_guard_15 Normal file
View file

@ -0,0 +1,7 @@
ControlPort 9051
UseEntryGuards 1
NumEntryGuards 15
NumPrimaryGuards 15
SafeLogging 0
SocksPort 127.0.0.1:9050 IsolateDestPort
#Log INFO stdout

View file

@ -3,4 +3,5 @@ UseEntryGuards 1
NumEntryGuards 16
NumPrimaryGuards 16
SafeLogging 0
SocksPort 127.0.0.1:9050 IsolateDestPort
#Log INFO stdout

View file

@ -3,4 +3,5 @@ UseEntryGuards 1
NumEntryGuards 2
NumPrimaryGuards 2
SafeLogging 0
SocksPort 127.0.0.1:9050 IsolateDestPort
#Log DEBUG stdout

View file

@ -3,4 +3,5 @@ UseEntryGuards 1
NumEntryGuards 3
NumPrimaryGuards 3
SafeLogging 0
SocksPort 127.0.0.1:9050 IsolateDestPort
#Log INFO stdout

View file

@ -3,4 +3,5 @@ UseEntryGuards 1
NumEntryGuards 4
NumPrimaryGuards 4
SafeLogging 0
SocksPort 127.0.0.1:9050 IsolateDestPort
#Log INFO stdout

View file

@ -3,4 +3,5 @@ UseEntryGuards 1
NumEntryGuards 5
NumPrimaryGuards 5
SafeLogging 0
SocksPort 127.0.0.1:9050 IsolateDestPort
#Log INFO stdout

View file

@ -3,4 +3,5 @@ UseEntryGuards 1
NumEntryGuards 6
NumPrimaryGuards 6
SafeLogging 0
SocksPort 127.0.0.1:9050 IsolateDestPort
#Log INFO stdout

View file

@ -3,4 +3,5 @@ UseEntryGuards 1
NumEntryGuards 7
NumPrimaryGuards 7
SafeLogging 0
SocksPort 127.0.0.1:9050 IsolateDestPort
#Log INFO stdout

View file

@ -3,4 +3,5 @@ UseEntryGuards 1
NumEntryGuards 8
NumPrimaryGuards 8
SafeLogging 0
SocksPort 127.0.0.1:9050 IsolateDestPort
#Log INFO stdout

7
torrc_guard_9 Normal file
View file

@ -0,0 +1,7 @@
ControlPort 9051
UseEntryGuards 1
NumEntryGuards 9
NumPrimaryGuards 9
SafeLogging 0
SocksPort 127.0.0.1:9050 IsolateDestPort
#Log INFO stdout

View file

@ -1,5 +1,6 @@
ControlPort 9051
UseEntryGuards 0
SocksPort 127.0.0.1:9050 IsolateDestPort
SafeLogging 0
#IsolateDestPort 1
#Log INFO stdout