From 572a5b3c3404eef9dac8bc0eac2f368fcd47e2bb Mon Sep 17 00:00:00 2001 From: z3APA3A <3APA3A@3proxy.ru> Date: Fri, 27 Apr 2018 15:09:18 +0300 Subject: [PATCH] Fixed: socks fails on 1-character username or password --- Makefile.Linux | 4 ++++ scripts/3proxy.cfg.chroot | 2 +- src/sockgetchar.c | 2 +- 3 files changed, 6 insertions(+), 2 deletions(-) diff --git a/Makefile.Linux b/Makefile.Linux index 5cae88c..d81ea08 100644 --- a/Makefile.Linux +++ b/Makefile.Linux @@ -142,6 +142,10 @@ install: install-bin install-chroot-dir install-etc install-log install-man inst @echo "" @echo 3proxy installed. @echo use + @echo " "service 3proxy start + @echo to start proxy + @echo " "service 3proxy stop + @echo to stop proxy @echo " "$(INSTALL_CFG_DEST)/add3proxyuser.sh @echo to add users @echo "" diff --git a/scripts/3proxy.cfg.chroot b/scripts/3proxy.cfg.chroot index d436171..6083671 100644 --- a/scripts/3proxy.cfg.chroot +++ b/scripts/3proxy.cfg.chroot @@ -2,4 +2,4 @@ daemon pidfile /var/run/3proxy/3proxy.pid chroot /usr/local/3proxy proxy proxy -include /conf/3proxy.cfg \ No newline at end of file +include /conf/3proxy.cfg diff --git a/src/sockgetchar.c b/src/sockgetchar.c index 3691e47..be95022 100644 --- a/src/sockgetchar.c +++ b/src/sockgetchar.c @@ -156,7 +156,7 @@ int sockgetcharsrv(struct clientparam * param, int timeosec, int timeousec){ int sockgetlinebuf(struct clientparam * param, DIRECTION which, unsigned char * buf, int bufsize, int delim, int to){ int c; int i=0; - if(bufsize<2) return 0; + if(bufsize < 1) return 0; c = (which)?sockgetcharsrv(param, to, 0):sockgetcharcli(param, to, 0); if (c == EOF) { return 0;