mirror of
https://github.com/3proxy/3proxy.git
synced 2026-11-22 23:59:41 +08:00
resolver: per service, defaultresolve, fakeresolve or sysresolve
C/C++ CI Linux / ${{ matrix.target }} (ubuntu-24.04-arm) (push) Waiting to run
C/C++ CI Linux / ${{ matrix.target }} (ubuntu-latest) (push) Waiting to run
C/C++ CI MacOS / ${{ matrix.target }} (macos-15) (push) Waiting to run
C/C++ CI Windows / ${{ matrix.target }} (windows-2022) (push) Waiting to run
C/C++ CI cmake / ${{ matrix.target }} (macos-15) (push) Waiting to run
C/C++ CI cmake / ${{ matrix.target }} (ubuntu-24.04-arm) (push) Waiting to run
C/C++ CI cmake / ${{ matrix.target }} (ubuntu-latest) (push) Waiting to run
C/C++ CI cmake / ${{ matrix.target }} (windows-2022) (push) Waiting to run
C/C++ CI cmake / ubuntu-latest (wolfSSL) (push) Waiting to run
C/C++ CI Linux / ${{ matrix.target }} (ubuntu-24.04-arm) (push) Waiting to run
C/C++ CI Linux / ${{ matrix.target }} (ubuntu-latest) (push) Waiting to run
C/C++ CI MacOS / ${{ matrix.target }} (macos-15) (push) Waiting to run
C/C++ CI Windows / ${{ matrix.target }} (windows-2022) (push) Waiting to run
C/C++ CI cmake / ${{ matrix.target }} (macos-15) (push) Waiting to run
C/C++ CI cmake / ${{ matrix.target }} (ubuntu-24.04-arm) (push) Waiting to run
C/C++ CI cmake / ${{ matrix.target }} (ubuntu-latest) (push) Waiting to run
C/C++ CI cmake / ${{ matrix.target }} (windows-2022) (push) Waiting to run
C/C++ CI cmake / ubuntu-latest (wolfSSL) (push) Waiting to run
Each service resolves names the way the last of defaultresolve (the name servers in force, configured or the system's with the hosts file), fakeresolve (127.0.0.2) and sysresolve (the C library) read before it says; the last one in the configuration also applies outside services. defaultresolve is the new command, and the default. The name servers and the hosts file no longer depend on the mode: nserver lines, or the system's, are always in force, so dnspr keeps forwarding; with fakeresolve it does not, as before. fakeresolver moves to common.c, which the standalone services link without resolve.c. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This commit is contained in:
1 parent
994526dbc4
commit
3d20e1104e
14 files changed
+181
-101
No files matched your search
+2
-2
@@ -132,7 +132,7 @@ void * sockschild(struct clientparam* param) {
|
||||
}
|
||||
buf[i] = 0;
|
||||
if(command == 2 && param->srv->family != 6 && (!strcmp((char *)buf, "0.0.0.0") || !strcmp((char *)buf, "0"))) param->req = param->srv->extsa;
|
||||
else if(!getip46(param->srv->family, buf, (struct sockaddr *) ¶m->req)) RETURN(100);
|
||||
else if(!getip46m(param->srv->resolvmode, param->srv->family, buf, (struct sockaddr *) ¶m->req)) RETURN(100);
|
||||
param->sinsr = param->req;
|
||||
break;
|
||||
default:
|
||||
@@ -158,7 +158,7 @@ void * sockschild(struct clientparam* param) {
|
||||
if(sockgetlinebuf(param, CLIENT, buf, BUFSIZE - 1, 0, param->srv->timeouts[STRING_S]) < 0) {RETURN(441);}
|
||||
buf[127] = 0;
|
||||
if(PARAMSTR(param, hostname, buf)){RETURN(21);}
|
||||
if(!getip46(param->srv->family, buf, (struct sockaddr *) ¶m->req)) RETURN(100);
|
||||
if(!getip46m(param->srv->resolvmode, param->srv->family, buf, (struct sockaddr *) ¶m->req)) RETURN(100);
|
||||
param->sinsr = param->req;
|
||||
}
|
||||
}
|
||||
|
||||
Reference in new issue
Block a user