From 7c1bc48c853f99f2574deb61fb9347a5d3056ad0 Mon Sep 17 00:00:00 2001 From: Vladimir Dubrovin <3proxy@3proxy.ru> Date: Fri, 15 May 2026 18:45:47 +0300 Subject: [PATCH 1/2] Fix socks v5 parent with no auth --- src/redirect.c | 9 +++++---- 1 file changed, 5 insertions(+), 4 deletions(-) diff --git a/src/redirect.c b/src/redirect.c index a18b9ee..13b21e6 100644 --- a/src/redirect.c +++ b/src/redirect.c @@ -134,12 +134,13 @@ int clientnegotiate(struct chain * redir, struct clientparam * param, struct soc int atyp; int skip_port = 0; buf[0] = 5; - buf[1] = user? 1 : 0; - buf[2] = 2; - if(socksend(param, param->remsock, buf, user?3:2, conf.timeouts[CHAIN_TO]) < 2){ + buf[1] = user? 2 : 1; + buf[2] = 0; + buf[3] = 2; + if(socksend(param, param->remsock, buf, user?4:3, conf.timeouts[CHAIN_TO]) < 2){ return 51; } - param->statssrv64+=3; + param->statssrv64+=user?4:3; param->nwrites++; if(sockgetlinebuf(param, SERVER, buf, 2, EOF, conf.timeouts[CHAIN_TO]) != 2){ return 52; From 16af910f3a648b55519dae209d8c9f1ffbc4d5d2 Mon Sep 17 00:00:00 2001 From: Vladimir Dubrovin <3proxy@3proxy.ru> Date: Fri, 22 May 2026 16:57:53 +0300 Subject: [PATCH 2/2] Fix: non-initialized mutex (crash under Windows) --- src/hash.c | 1 + 1 file changed, 1 insertion(+) diff --git a/src/hash.c b/src/hash.c index 6d3e97d..0aafb9b 100644 --- a/src/hash.c +++ b/src/hash.c @@ -9,6 +9,7 @@ struct hashentry { void destroyhashtable(struct hashtable *ht){ + if(!ht->ihashtable) return; _3proxy_mutex_lock(&ht->hash_mutex); if(ht->ihashtable){ free(ht->ihashtable);