From 8a1ddd5f602ae1217716c882f9ffaa65066f36d6 Mon Sep 17 00:00:00 2001 From: Radkesvat <134321679+radkesvat@users.noreply.github.com> Date: Mon, 15 Jul 2024 04:40:50 +0000 Subject: [PATCH] enable random peeker --- tunnels/server/reverse/reverse_server.c | 11 ++++++----- 1 file changed, 6 insertions(+), 5 deletions(-) diff --git a/tunnels/server/reverse/reverse_server.c b/tunnels/server/reverse/reverse_server.c index e9267046..76c9c846 100644 --- a/tunnels/server/reverse/reverse_server.c +++ b/tunnels/server/reverse/reverse_server.c @@ -5,6 +5,7 @@ #include "shiftbuffer.h" #include "tunnel.h" #include "types.h" +#include "frand.h" #include "ww.h" enum @@ -87,11 +88,11 @@ static void upStream(tunnel_t *self, context_t *c) reverse_server_con_state_t *ucstate = this_tb->u_cons_root.next; - // size_t random_choosen = (fastRand() % this_tb->u_count); - // while (random_choosen--) - // { - // ucstate = ucstate->next; - // } + size_t random_choosen = (fastRand() % this_tb->u_count); + while (random_choosen--) + { + ucstate = ucstate->next; + } removeConnectionU(this_tb, ucstate); ucstate->d = c->line;