From f77f65ac4ec7f10d019847d9ca95ce631fb0d332 Mon Sep 17 00:00:00 2001 From: Vladimir Dubrovin <3proxy@3proxy.ru> Date: Sun, 12 Apr 2026 14:16:48 +0300 Subject: [PATCH] Fix: SOCKSv5 parent reply parsing for domain name address --- Makefile.Linux | 1 - Makefile.openwrt-mips | 1 - src/auth.c | 2 +- 3 files changed, 1 insertion(+), 3 deletions(-) diff --git a/Makefile.Linux b/Makefile.Linux index 3276a3d..0e381af 100644 --- a/Makefile.Linux +++ b/Makefile.Linux @@ -82,7 +82,6 @@ INSTALL_SYSTEMD_SCRIPT = scripts/3proxy.service CHROOTDIR = $(DESTDIR)$(chroot_prefix)/3proxy CHROOTREL = ../..$(chroot_prefix)/3proxy -MANDIR1 = $(DESTDIR)$(man_prefix)/man/man1 MANDIR3 = $(DESTDIR)$(man_prefix)/man/man3 MANDIR8 = $(DESTDIR)$(man_prefix)/man/man8 BINDIR = $(DESTDIR)$(exec_prefix)/bin diff --git a/Makefile.openwrt-mips b/Makefile.openwrt-mips index a2ad64c..707752f 100644 --- a/Makefile.openwrt-mips +++ b/Makefile.openwrt-mips @@ -77,7 +77,6 @@ INSTALL_CFG_DEST = config INSTALL_CFG_OBJS2 = passwd counters bandlimiters -MANDIR1 = $(DESTDIR)$(man_prefix)/man/man1 MANDIR3 = $(DESTDIR)$(man_prefix)/man/man3 MANDIR8 = $(DESTDIR)$(man_prefix)/man/man8 BINDIR = $(DESTDIR)$(exec_prefix)/bin diff --git a/src/auth.c b/src/auth.c index b1395e3..40b51bc 100644 --- a/src/auth.c +++ b/src/auth.c @@ -198,7 +198,7 @@ int clientnegotiate(struct chain * redir, struct clientparam * param, struct soc case 3: if (sockgetlinebuf(param, SERVER, buf, 1, EOF, conf.timeouts[CHAIN_TO]) != 1) return 59; len = (unsigned char)buf[0]; - if (sockgetlinebuf(param, SERVER, buf, len, EOF, conf.timeouts[CHAIN_TO]) != len) return 59; + if (sockgetlinebuf(param, SERVER, buf, len + 2, EOF, conf.timeouts[CHAIN_TO]) != len + 2) return 59; break; case 4: if (sockgetlinebuf(param, SERVER, buf, 18, EOF, conf.timeouts[CHAIN_TO]) == 18)