mirror of
https://github.com/3proxy/3proxy.git
synced 2026-11-22 23:59:41 +08:00
Redirection fixes
This commit is contained in:
1 parent
b5bcb44e27
commit
f82d1e296b
3 files changed
+11
-11
No files matched your search
+2
-4
@@ -619,12 +619,10 @@ int doconnect(struct clientparam * param){
|
||||
if ((param->remsock=so._socket(*SAFAMILY(¶m->sinsr), SOCK_STREAM, IPPROTO_TCP)) == INVALID_SOCKET) {return (11);}
|
||||
so._setsockopt(param->remsock, SOL_SOCKET, SO_LINGER, (unsigned char *)&lg, sizeof(lg));
|
||||
#ifndef NOIPV6
|
||||
if(*SAFAMILY(¶m->sinsr) == AF_INET)
|
||||
if(*SAFAMILY(¶m->sinsr) == AF_INET6) memcpy(¶m->sinsl, ¶m->srv->extsa6, sizeof(param->srv->extsa6));
|
||||
else
|
||||
#endif
|
||||
memcpy(¶m->sinsl, ¶m->srv->extsa, sizeof(param->srv->extsa));
|
||||
#ifndef NOIPV6
|
||||
else memcpy(¶m->sinsl, ¶m->srv->extsa6, sizeof(param->srv->extsa6));
|
||||
#endif
|
||||
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) {
|
||||
#ifndef NOIPV6
|
||||
|
||||
Reference in new issue
Block a user