Fixed: socks fails on 1-character username or password

This commit is contained in:
z3APA3A 2018-04-27 15:09:18 +03:00
parent 9bd81a18b9
commit 572a5b3c34
3 changed files with 6 additions and 2 deletions

View File

@ -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 ""

View File

@ -2,4 +2,4 @@
daemon
pidfile /var/run/3proxy/3proxy.pid
chroot /usr/local/3proxy proxy proxy
include /conf/3proxy.cfg
include /conf/3proxy.cfg

View File

@ -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;