diff --git a/doc/html/faqe.html b/doc/html/faqe.html
index 581100e..ab4df43 100644
--- a/doc/html/faqe.html
+++ b/doc/html/faqe.html
@@ -114,7 +114,7 @@ parent 1000 http 0.0.0.0 0
allow * * $c:\3proxy\local.nets 80,8080-8088
#allow direct access to local.nets networks
allow * * * 80,8080-8088
-parent 1000 http proxy.sandy.ru 3128
+parent 1000 http proxy.3proxy.ru 3128
#use parent caching proxy for rest of the networks
allow *
diff --git a/doc/html/faqr.html b/doc/html/faqr.html
index ed3a39e..6824bb4 100644
--- a/doc/html/faqr.html
+++ b/doc/html/faqr.html
@@ -191,7 +191,7 @@
allow * * $c:\3proxy\local.nets 80,8080-8088
#разрешить прямой web-доступ к сетям из local.nets
allow * * * 80,8080-8088
- parent 1000 http proxy.sandy.ru 3128
+ parent 1000 http proxy.3proxy.ru 3128
#все остальные веб-запросы перенаправить на внешний прокси-сервер
allow *
#разрешить socks-запросы по другим портам
diff --git a/src/auth.c b/src/auth.c
index 326a4d5..f1a9c2c 100644
--- a/src/auth.c
+++ b/src/auth.c
@@ -1061,7 +1061,7 @@ unsigned long udpresolve(int af, unsigned char * name, unsigned char * value, un
*SAFAMILY(sinsl) = *SAFAMILY(&nservers[i].addr);
}
if((sock=so._socket(SASOCK(sinsl), usetcp?SOCK_STREAM:SOCK_DGRAM, usetcp?IPPROTO_TCP:IPPROTO_UDP)) == INVALID_SOCKET) break;
- if(so._bind(sock,sinsl,sizeof(addr))){
+ if(so._bind(sock,sinsl,SASIZE(sinsl))){
so._shutdown(sock, SHUT_RDWR);
so._closesocket(sock);
break;
diff --git a/src/common.c b/src/common.c
index a160395..266563e 100644
--- a/src/common.c
+++ b/src/common.c
@@ -668,9 +668,9 @@ int doconnect(struct clientparam * param){
#endif
memcpy(¶m->sinsl, ¶m->srv->extsa, sizeof(param->srv->extsa));
if (param->srv->targetport && !*SAPORT(¶m->sinsl) && ntohs(*SAPORT(¶m->sincr)) > 1023) *SAPORT(¶m->sinsl) = *SAPORT(¶m->sincr);
- if(so._bind(param->remsock, (struct sockaddr*)¶m->sinsl, sizeof(param->sinsl))==-1) {
+ if(so._bind(param->remsock, (struct sockaddr*)¶m->sinsl, SASIZE(¶m->sinsl))==-1) {
*SAPORT(¶m->sinsl) = 0;
- if(so._bind(param->remsock, (struct sockaddr*)¶m->sinsl, sizeof(param->sinsl))==-1) {
+ if(so._bind(param->remsock, (struct sockaddr*)¶m->sinsl, SASIZE(¶m->sinsl))==-1) {
return 12;
}
}
diff --git a/src/dnspr.c b/src/dnspr.c
index ac67895..2f8a532 100644
--- a/src/dnspr.c
+++ b/src/dnspr.c
@@ -48,7 +48,7 @@ void * dnsprchild(struct clientparam* param) {
}
ioctlsocket(param->clisock, FIONBIO, &ul);
if(so._setsockopt(param->clisock, SOL_SOCKET, SO_REUSEADDR, (unsigned char *)&ul, sizeof(int))) {RETURN(820);};
- if(so._bind(param->clisock,(struct sockaddr *)¶m->sincl,sizeof(param->sincl))) {
+ if(so._bind(param->clisock,(struct sockaddr *)¶m->sincl,SASIZE(¶m->sincl))) {
RETURN(822);
}
@@ -135,7 +135,7 @@ void * dnsprchild(struct clientparam* param) {
}
memset(¶m->sinsl, 0, sizeof(param->sinsl));
*SAFAMILY(¶m->sinsl) = *SAFAMILY(&nservers[0].addr);
- if(so._bind(param->remsock,(struct sockaddr *)¶m->sinsl,sizeof(param->sinsl))) {
+ if(so._bind(param->remsock,(struct sockaddr *)¶m->sinsl,SASIZE(¶m->sinsl))) {
RETURN(819);
}
memcpy(¶m->sinsr, &nservers[0].addr, sizeof(param->sinsr));
diff --git a/src/ftppr.c b/src/ftppr.c
index 40d1297..f1a4f74 100644
--- a/src/ftppr.c
+++ b/src/ftppr.c
@@ -121,7 +121,7 @@ void * ftpprchild(struct clientparam* param) {
if ((clidatasock=socket(SASOCK(¶m->sincl), SOCK_STREAM, IPPROTO_TCP)) == INVALID_SOCKET) {RETURN(821);}
sasize = sizeof(param->sincl);
*SAPORT(¶m->sincl) = 0;
- if(so._bind(clidatasock, (struct sockaddr *)¶m->sincl, sasize)){RETURN(822);}
+ if(so._bind(clidatasock, (struct sockaddr *)¶m->sincl, SASIZE(¶m->sincl))){RETURN(822);}
if (pasv) {
if(so._listen(clidatasock, 1)) {RETURN(823);}
if(so._getsockname(clidatasock, (struct sockaddr *)¶m->sincl, &sasize)){RETURN(824);}
diff --git a/src/proxymain.c b/src/proxymain.c
index 92e940b..ab55602 100644
--- a/src/proxymain.c
+++ b/src/proxymain.c
@@ -444,7 +444,7 @@ int MODULEMAINFUNC (int argc, char** argv){
#endif
}
size = sizeof(srv.intsa);
- for(sleeptime = SLEEPTIME * 100; so._bind(sock, (struct sockaddr*)&srv.intsa, size)==-1; usleep(sleeptime)) {
+ for(sleeptime = SLEEPTIME * 100; so._bind(sock, (struct sockaddr*)&srv.intsa, SASIZE(&srv.intsa))==-1; usleep(sleeptime)) {
sprintf((char *)buf, "bind(): %s", strerror(errno));
if(!srv.silent)(*srv.logfunc)(&defparam, buf);
sleeptime = (sleeptime<<1);
@@ -481,7 +481,7 @@ int MODULEMAINFUNC (int argc, char** argv){
so._setsockopt(srv.cbsock, SOL_SOCKET, SO_REUSEPORT, (unsigned char *)&opt, sizeof(int));
#endif
- if(so._bind(srv.cbsock, (struct sockaddr*)&cbsa, sizeof(cbsa))==-1) {
+ if(so._bind(srv.cbsock, (struct sockaddr*)&cbsa, SASIZE(&cbsa))==-1) {
(*srv.logfunc)(&defparam, "Failed to bind connect back socket");
return -7;
}
diff --git a/src/socks.c b/src/socks.c
index 1dea56d..3a26138 100644
--- a/src/socks.c
+++ b/src/socks.c
@@ -206,7 +206,7 @@ fflush(stderr);
if(param->clisock == INVALID_SOCKET) {RETURN(11);}
memcpy(&sin, ¶m->sincl, sizeof(&sin));
*SAPORT(&sin) = 0;
- if(so._bind(param->clisock,(struct sockaddr *)&sin,sizeof(sin))) {RETURN (12);}
+ if(so._bind(param->clisock,(struct sockaddr *)&sin,SASIZE(&sin))) {RETURN (12);}
#if SOCKSTRACE > 0
fprintf(stderr, "%hu binded to communicate with client\n",
ntohs(*SAPORT(&sin))
diff --git a/src/udppm.c b/src/udppm.c
index eb9164b..a629886 100644
--- a/src/udppm.c
+++ b/src/udppm.c
@@ -63,7 +63,7 @@ void * udppmchild(struct clientparam* param) {
ioctlsocket(param->clisock, FIONBIO, &ul);
size = sizeof(param->sinsl);
if(so._getsockname(param->srv->srvsock, (struct sockaddr *)¶m->sinsl, &size)) {RETURN(21);};
- if(so._bind(param->clisock,(struct sockaddr *)¶m->sinsl,sizeof(struct sockaddr_in))) {
+ if(so._bind(param->clisock,(struct sockaddr *)¶m->sinsl,SASIZE(¶m->sinsl))) {
RETURN(822);
}
#else
@@ -77,7 +77,7 @@ void * udppmchild(struct clientparam* param) {
#endif
*SAPORT(¶m->sinsl) = 0;
if ((param->remsock=so._socket(SASOCK(¶m->sinsl), SOCK_DGRAM, IPPROTO_UDP)) == INVALID_SOCKET) {RETURN (11);}
- if(so._bind(param->remsock,(struct sockaddr *)¶m->sinsl,sizeof(param->sinsl))) {RETURN (12);}
+ if(so._bind(param->remsock,(struct sockaddr *)¶m->sinsl,SASIZE(¶m->sinsl))) {RETURN (12);}
#ifdef _WIN32
ioctlsocket(param->remsock, FIONBIO, &ul);
#else