mirror of
https://github.com/3proxy/3proxy.git
synced 2026-10-16 00:25:48 +08:00
Remove dial on demand
dialer ran a program when a name could not be resolved, for dial-up links; with nscache it did not even run. The command is still accepted and ignored, so configurations using it keep loading. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This commit is contained in:
parent
ca0b5e0c88
commit
18c0ebda0f
@ -579,9 +579,7 @@ for a record naming an IPv6 address - and
|
||||
\fBnserver\fR must be set as well: without it the system resolver is used and
|
||||
static records are never consulted. If 0.0.0.0
|
||||
is used as a hostaddr host will never resolve, it can be used to
|
||||
blacklist something or together with
|
||||
.B dialer
|
||||
command to set up UDL for dialing.
|
||||
blacklist something.
|
||||
|
||||
.br
|
||||
.B fakeresolve
|
||||
@ -593,10 +591,8 @@ redirected to a parent proxy with \fBhttp\fR, \fBsocks4+\fR, \fBconnect+\fR or \
|
||||
.BR dialer
|
||||
\fI<progname>\fR
|
||||
.br
|
||||
Execute progname if external name can\'t be resolved.
|
||||
Hint: if you use nscache, dialer may not work, because names will
|
||||
be resolved through cache. In this case you can use something like
|
||||
http://dial.right.now/ from browser to set up connection.
|
||||
Ignored: dial on demand is no longer supported. The command is accepted so
|
||||
that configurations using it still load.
|
||||
|
||||
|
||||
.br
|
||||
|
||||
@ -288,7 +288,6 @@ struct extparam conf = {
|
||||
.filters = NULL,
|
||||
.authfuncs = NULL,
|
||||
.stdlog = NULL,
|
||||
.demanddialprog = NULL,
|
||||
.stringtable = NULL,
|
||||
.logtime = (time_t)0,
|
||||
.time = (time_t)0,
|
||||
@ -956,8 +955,6 @@ uint32_t getip(unsigned char *name){
|
||||
}
|
||||
}
|
||||
if((tmpresolv=resolvfunc)){
|
||||
if((*tmpresolv)(AF_INET, name, (unsigned char *)&retval)) return retval;
|
||||
if(conf.demanddialprog) system(conf.demanddialprog);
|
||||
return (*tmpresolv)(AF_INET, name, (unsigned char *)&retval)?retval:0;
|
||||
}
|
||||
#ifndef NOSTDRESOLVE
|
||||
@ -969,10 +966,6 @@ uint32_t getip(unsigned char *name){
|
||||
_3proxy_mutex_lock(&gethostbyname_mutex);
|
||||
#endif
|
||||
hp=gethostbyname((char *)name);
|
||||
if (!hp && conf.demanddialprog) {
|
||||
system(conf.demanddialprog);
|
||||
hp=gethostbyname((char *)name);
|
||||
}
|
||||
retval = hp?*(uint32_t *)hp->h_addr:0;
|
||||
#if !defined(_WIN32) && !defined(GETHOSTBYNAME_R)
|
||||
_3proxy_mutex_unlock(&gethostbyname_mutex);
|
||||
|
||||
@ -757,9 +757,9 @@ static int h_nsrecord(int argc, unsigned char **argv){
|
||||
return 0;
|
||||
}
|
||||
|
||||
/* dialer: running a program when a name does not resolve is gone; the
|
||||
command is still taken, and ignored, so configurations keep loading */
|
||||
static int h_dialer(int argc, unsigned char **argv){
|
||||
if(conf.demanddialprog) free(conf.demanddialprog);
|
||||
conf.demanddialprog = strdup((char *)argv[1]);
|
||||
return 0;
|
||||
}
|
||||
|
||||
|
||||
@ -882,7 +882,6 @@ struct extparam {
|
||||
struct filter * filters;
|
||||
struct auth *authfuncs;
|
||||
FILE *stdlog;
|
||||
char* demanddialprog;
|
||||
unsigned char **stringtable;
|
||||
time_t logtime, time;
|
||||
unsigned logdumpsrv, logdumpcli;
|
||||
|
||||
@ -154,7 +154,7 @@ takes effect, or that services come back.
|
||||
|
||||
### DNS
|
||||
|
||||
`fakeresolve` `nscache6` `dialer`.
|
||||
`fakeresolve` `nscache6`.
|
||||
|
||||
### Known limitations, deliberately not asserted
|
||||
|
||||
|
||||
Loading…
Reference in New Issue
Block a user