mirror of
https://github.com/3proxy/3proxy.git
synced 2026-11-27 07:59:41 +08:00
Name resolution via TCP support
Supports _real_ name resolution via parent proxy over TCP in nserver / dnspr. Can be used to create UDP->TCP name proxy, e.g. nserver 127.0.0.1/tcp nscache 65535 auth none dnspr auth iponly tcppm 53 77.88.8.8 53 now, all names are resolved via TCP connection to 77.88.8.8 (dns.yandex.ru).
This commit is contained in:
1 parent
e3645ee971
commit
15f9f24f04
9 files changed
+96
-37
No files matched your search
+2
-2
@@ -57,7 +57,7 @@ void * udppmchild(struct clientparam* param) {
|
||||
param->cliinbuf = i;
|
||||
|
||||
#ifdef _WIN32
|
||||
if((param->clisock=so._socket(*SAFAMILY(¶m->sincr), SOCK_DGRAM, IPPROTO_UDP)) == INVALID_SOCKET) {
|
||||
if((param->clisock=so._socket(SASOCK(¶m->sincr), SOCK_DGRAM, IPPROTO_UDP)) == INVALID_SOCKET) {
|
||||
RETURN(818);
|
||||
}
|
||||
if(so._setsockopt(param->clisock, SOL_SOCKET, SO_REUSEADDR, (unsigned char *)&ul, sizeof(int))) {RETURN(820);};
|
||||
@@ -77,7 +77,7 @@ void * udppmchild(struct clientparam* param) {
|
||||
memcpy(¶m->sinsl, ¶m->srv->extsa, SASIZE(¶m->req));
|
||||
#endif
|
||||
*SAPORT(¶m->sinsl) = 0;
|
||||
if ((param->remsock=so._socket(*SAFAMILY(¶m->sinsl), SOCK_DGRAM, IPPROTO_UDP)) == INVALID_SOCKET) {RETURN (11);}
|
||||
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);}
|
||||
#ifdef _WIN32
|
||||
ioctlsocket(param->remsock, FIONBIO, &ul);
|
||||
|
||||
Reference in new issue
Block a user