Merge branch 'devel' of https://github.com/z3APA3A/3proxy into devel

This commit is contained in:
z3APA3A 2016-12-10 03:56:20 +03:00
commit 953c7efafc
2 changed files with 16 additions and 6 deletions

View File

@ -4,7 +4,7 @@
# You can try to remove -DWITH_STD_MALLOC to CFLAGS to use optimized malloc # You can try to remove -DWITH_STD_MALLOC to CFLAGS to use optimized malloc
# libraries # libraries
# #
# remove -DNOODBC from CFLAGS and add -lodbc to LDFLAGS to compile with ODBC # remove -DNOODBC from CFLAGS and add -lodbc to LIBS to compile with ODBC
# library support. Add -DSAFESQL for poorely written ODBC library / drivers. # library support. Add -DSAFESQL for poorely written ODBC library / drivers.
BUILDDIR = BUILDDIR =

View File

@ -190,11 +190,21 @@ int clientnegotiate(struct chain * redir, struct clientparam * param, struct soc
if(buf[1] != 0) { if(buf[1] != 0) {
return 60 + (buf[1] % 10); return 60 + (buf[1] % 10);
} }
if(buf[3] != 1) { switch (buf[3]) {
return 58; case 1:
} if (redir->type == R_SOCKS5B || sockgetlinebuf(param, SERVER, buf, 6, EOF, conf.timeouts[CHAIN_TO]) == 6)
if (redir->type != R_SOCKS5B && sockgetlinebuf(param, SERVER, buf, 6, EOF, conf.timeouts[CHAIN_TO]) != 6){ break;
return 59; return 59;
case 3:
if (sockgetlinebuf(param, SERVER, buf, 256, 0, conf.timeouts[CHAIN_TO]) > 1)
break;
return 59;
case 4:
if (sockgetlinebuf(param, SERVER, buf, 18, EOF, conf.timeouts[CHAIN_TO]) == 18)
break;
return 59;
default:
return 58;
} }
return 0; return 0;
} }