WIP evaluation Tor
This commit is contained in:
parent
67fb4a745e
commit
87c561574e
4 changed files with 36 additions and 2 deletions
|
@ -13,3 +13,25 @@ tor_bw_finale:
|
|||
orig-server, orig-server, orig-server, orig-server . \
|
||||
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, tor3 -f /etc/torrc_simple, tor3 -f /etc/torrc_simple
|
||||
|
||||
tor_guards_small:
|
||||
./run-3 \
|
||||
1 . \
|
||||
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, \
|
||||
dup2-server 8, \
|
||||
dup2-server 8 . \
|
||||
tor3 -f /etc/torrc_guard_1, \
|
||||
tor3 -f /etc/torrc_guard_3, \
|
||||
tor3 -f /etc/torrc_guard_5, \
|
||||
tor3 -f /etc/torrc_simple . \
|
||||
tor3 -f /etc/torrc_guard_1, \
|
||||
tor3 -f /etc/torrc_guard_3, \
|
||||
tor3 -f /etc/torrc_guard_5, \
|
||||
tor3 -f /etc/torrc_simple
|
||||
|
||||
|
||||
|
|
|
@ -4,7 +4,8 @@ donar \
|
|||
-a dup2 \
|
||||
-c \
|
||||
-o $5/shared/onion_services.pub \
|
||||
-l $4
|
||||
-l $4 \
|
||||
-b \
|
||||
-r 9000 \
|
||||
> $5/log/client-donar-stdout.log 2> $5/log/client-donar-stderr.log &
|
||||
sleep 2
|
||||
|
|
|
@ -2,5 +2,12 @@
|
|||
mkdir -p $2/{log,shared}
|
||||
cd $2/shared
|
||||
|
||||
donar -a dup2 -s -l $1 -e 9000 > ../log/server-donar-stdout.log 2> ../log/server-donar-stderr.log &
|
||||
donar \
|
||||
-a dup2 \
|
||||
-s \
|
||||
-l $1 \
|
||||
-b \
|
||||
-e 9000 \
|
||||
> ../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
|
||||
|
|
|
@ -102,6 +102,9 @@ int main_on_tcp_write(struct evt_core_ctx* ctx, struct evt_core_fdinfo* fdinfo)
|
|||
// 1. Get current write buffer OR a buffer from the waiting queue OR leave
|
||||
if ((bp = get_write_buffer(&app_ctx->br, fdinfo)) == NULL) return 1;
|
||||
|
||||
// 1.5. Prevent buffer sending if we are still bootstrapping...
|
||||
if (app_ctx->ap.is_waiting_bootstrap && !app_ctx->is_rdy) goto free_buffer;
|
||||
|
||||
// 2. Write data from the buffer to the socket
|
||||
while (bp->mode == BP_WRITING) {
|
||||
write_res = write_packet_to_tcp(fdinfo, bp);
|
||||
|
@ -109,6 +112,7 @@ int main_on_tcp_write(struct evt_core_ctx* ctx, struct evt_core_fdinfo* fdinfo)
|
|||
if (write_res == FDS_AGAIN) return 1;
|
||||
}
|
||||
|
||||
free_buffer:
|
||||
// 3. A whole packet has been written
|
||||
// Release the buffer and notify
|
||||
mv_buffer_wtof(&app_ctx->br, fdinfo);
|
||||
|
|
Loading…
Reference in a new issue