0
0
mirror of https://github.com/hufrea/byedpi.git synced 2025-06-29 18:21:14 +00:00

Variable timeout

This commit is contained in:
ruti 2025-02-02 15:40:47 +03:00
parent 9b9cea1bd2
commit 9346c48e48
3 changed files with 6 additions and 5 deletions

View File

@ -601,7 +601,7 @@ ssize_t desync(struct poolhd *pool,
LOG(LOG_S, "split: pos=%ld-%ld (%zd), m: %s\n", lp, pos, s, demode_str[part.m]);
if (s == ERR_WAIT) {
set_timer(pool, val, 10);
set_timer(pool, val, params.await_int);
return lp - offset;
}
if (s < 0) {

7
main.c
View File

@ -45,7 +45,7 @@ fake_udp = {
struct params params = {
.wait_send = 1,
.await_int = 10,
.cache_ttl = 100800,
.ipv6 = 1,
@ -178,7 +178,7 @@ const struct option options[] = {
{"tlsrec", 1, 0, 'r'},
{"udp-fake", 1, 0, 'a'},
{"def-ttl", 1, 0, 'g'},
{"not-wait-send", 0, 0, 'W'}, //
{"await-int", 1, 0, 'W'}, //
#ifdef __linux__
{"drop-sack", 0, 0, 'Y'},
{"protect-path", 1, 0, 'P'}, //
@ -1068,8 +1068,9 @@ int main(int argc, char **argv)
break;
case 'W':
params.wait_send = 0;
params.await_int = atoi(optarg);
break;
#ifdef __linux__
case 'P':
params.protect_path = optarg;

View File

@ -101,7 +101,7 @@ struct desync_params {
struct params {
int dp_count;
struct desync_params *dp;
bool wait_send;
int await_int;
int def_ttl;
bool custom_ttl;