mirror of
https://github.com/3proxy/3proxy.git
synced 2026-11-22 23:59:41 +08:00
-N(NAT_address) option added for socks
This commit is contained in:
1 parent
d0725163d1
commit
ebd7b34159
3 files changed
+8
-3
No files matched your search
+3
-3
@@ -173,9 +173,9 @@ void * sockschild(struct clientparam* param) {
|
||||
case 3:
|
||||
|
||||
#ifndef NOIPV6
|
||||
param->sinsl = *SAFAMILY(¶m->req)==AF_INET6? param->srv->extsa6 : param->srv->extsa;
|
||||
param->sinsl = *SAFAMILY(¶m->req)==AF_INET6? param->srv->extsa6 : (SAISNULL(¶m->srv->extNat)?param->srv->extsa:param->srv->extNat);
|
||||
#else
|
||||
param->sinsl = param->srv->extsa;
|
||||
param->sinsl = SAISNULL(¶m->srv->extNat)?param->srv->extsa:param->srv->extNat;
|
||||
#endif
|
||||
if ((param->remsock=so._socket(SASOCK(¶m->req), command == 2? SOCK_STREAM:SOCK_DGRAM, command == 2?IPPROTO_TCP:IPPROTO_UDP)) == INVALID_SOCKET) {RETURN (11);}
|
||||
param->operation = command == 2?BIND:UDPASSOC;
|
||||
@@ -461,7 +461,7 @@ struct proxydef childdef = {
|
||||
1080,
|
||||
0,
|
||||
S_SOCKS,
|
||||
""
|
||||
"-N(EXTERNAL_IP) External NAT address to report to client for BIND\n"
|
||||
};
|
||||
#include "proxymain.c"
|
||||
#endif
|
||||
Reference in new issue
Block a user