mirror of
https://github.com/3proxy/3proxy.git
synced 2025-02-23 10:35:40 +08:00
Merge branch 'devel' of https://github.com/z3APA3A/3proxy into devel
This commit is contained in:
commit
1d162abec3
@ -63,7 +63,7 @@ struct extparam conf = {
|
||||
#else
|
||||
0,
|
||||
#endif
|
||||
0, -1, 0, 0, 0, 0, 0, 500, 0, 0, 0, 0,
|
||||
0, -1, 0, 0, 0, 0, 0, 500, 0, 0, 0, 0, 0,
|
||||
6, 600,
|
||||
1048576,
|
||||
NULL, NULL,
|
||||
|
13
src/conf.c
13
src/conf.c
@ -341,6 +341,17 @@ static int h_stacksize(int argc, unsigned char **argv){
|
||||
return 0;
|
||||
}
|
||||
|
||||
|
||||
static int h_force(int argc, unsigned char **argv){
|
||||
conf.noforce = 0;
|
||||
return 0;
|
||||
}
|
||||
|
||||
static int h_noforce(int argc, unsigned char **argv){
|
||||
conf.noforce = 1;
|
||||
return 0;
|
||||
}
|
||||
|
||||
static int h_service(int argc, unsigned char **argv){
|
||||
return 0;
|
||||
}
|
||||
@ -1400,6 +1411,8 @@ struct commands commandhandlers[]={
|
||||
{commandhandlers+56, "delimchar",h_delimchar, 2, 2},
|
||||
{commandhandlers+57, "authnserver", h_authnserver, 2, 2},
|
||||
{commandhandlers+58, "stacksize", h_stacksize, 2, 2},
|
||||
{commandhandlers+59, "force", h_force, 1, 1},
|
||||
{commandhandlers+60, "noforce", h_noforce, 1, 1},
|
||||
{specificcommands, "", h_noop, 1, 0}
|
||||
};
|
||||
|
||||
|
@ -713,6 +713,7 @@ void srvinit(struct srvparam * srv, struct clientparam *param){
|
||||
srv->version = conf.version + 1;
|
||||
srv->paused = conf.paused;
|
||||
srv->logfunc = conf.logfunc;
|
||||
srv->noforce = conf.noforce;
|
||||
if(srv->logformat)myfree(srv->logformat);
|
||||
srv->logformat = conf.logformat? (unsigned char *)mystrdup((char *)conf.logformat) : NULL;
|
||||
srv->authfunc = conf.authfunc;
|
||||
|
@ -69,7 +69,7 @@ int sockmap(struct clientparam * param, int timeo){
|
||||
while (!stop&&!conf.timetoexit){
|
||||
sasize = sizeof(struct sockaddr_in);
|
||||
if(param->version < conf.version){
|
||||
if (res = (*param->srv->authfunc)(param)) {return(res);}
|
||||
if((res = (*param->srv->authfunc)(param)) && !param->srv->noforce) {return(res);}
|
||||
param->paused = conf.paused;
|
||||
param->version = conf.version;
|
||||
}
|
||||
|
@ -373,6 +373,7 @@ struct srvparam {
|
||||
int nfilters, nreqfilters, nhdrfilterscli, nhdrfilterssrv, npredatfilters, ndatfilterscli, ndatfilterssrv;
|
||||
int family;
|
||||
int stacksize;
|
||||
int noforce;
|
||||
unsigned bufsize;
|
||||
unsigned logdumpsrv, logdumpcli;
|
||||
#ifndef NOIPV6
|
||||
@ -496,7 +497,7 @@ struct extparam {
|
||||
struct trafcount * trafcounter;
|
||||
struct srvparam *services;
|
||||
int stacksize, threadinit, counterd, haveerror, rotate, paused, archiverc,
|
||||
demon, maxchild, singlepacket, needreload, timetoexit, version;
|
||||
demon, maxchild, singlepacket, needreload, timetoexit, version, noforce;
|
||||
int authcachetype, authcachetime;
|
||||
int filtermaxsize;
|
||||
unsigned char *logname, **archiver;
|
||||
|
Loading…
Reference in New Issue
Block a user