mirror of
https://github.com/3proxy/3proxy.git
synced 2026-11-26 23:59:41 +08:00
-s switch support for dnspr
dnspr -s switch to act as a simple DNS proxy and do not use 3proxy's resolver and DNS cache.
This commit is contained in:
1 parent
efdbaee29f
commit
a4cb2f36b5
3 files changed
+4
-3
No files matched your search
+2
-2
@@ -82,7 +82,7 @@ void * dnsprchild(struct clientparam* param) {
|
||||
*s2 = (len - (int)(s2 - buf)) - 1;
|
||||
|
||||
type = ((unsigned)buf[len+1])*256 + (unsigned)buf[len+2];
|
||||
if(type==1){
|
||||
if(type==1 && !param->srv->singlepacket){
|
||||
ip = udpresolve((unsigned char *)host, &ttl, param, 0);
|
||||
}
|
||||
|
||||
@@ -129,7 +129,7 @@ void * dnsprchild(struct clientparam* param) {
|
||||
}
|
||||
else ip = 0;
|
||||
}
|
||||
if(!ip && nservers[0].ip && type!=1){
|
||||
if(!ip && nservers[0].ip){
|
||||
if((param->remsock=so._socket(PF_INET, nservers[0].usetcp? SOCK_STREAM:SOCK_DGRAM, nservers[0].usetcp?IPPROTO_TCP:IPPROTO_UDP)) == INVALID_SOCKET) {
|
||||
RETURN(818);
|
||||
}
|
||||
|
||||
Reference in new issue
Block a user