mirror of
https://github.com/3proxy/3proxy.git
synced 2026-04-06 21:30:12 +08:00
Move timeouts from conf
Some checks are pending
C/C++ CI / ${{ matrix.target }} (macos-15) (push) Waiting to run
C/C++ CI / ${{ matrix.target }} (ubuntu-24.04-arm) (push) Waiting to run
C/C++ CI / ${{ matrix.target }} (ubuntu-latest) (push) Waiting to run
C/C++ CI / ${{ matrix.target }} (windows-2022) (push) Waiting to run
Some checks are pending
C/C++ CI / ${{ matrix.target }} (macos-15) (push) Waiting to run
C/C++ CI / ${{ matrix.target }} (ubuntu-24.04-arm) (push) Waiting to run
C/C++ CI / ${{ matrix.target }} (ubuntu-latest) (push) Waiting to run
C/C++ CI / ${{ matrix.target }} (windows-2022) (push) Waiting to run
This commit is contained in:
parent
46be1fb96c
commit
5cb42abbb3
114
src/common.c
114
src/common.c
@ -92,49 +92,85 @@ char *rotations[] = {
|
||||
};
|
||||
|
||||
|
||||
int timeouts[12] = {
|
||||
1, /* SINGLEBYTE_S */
|
||||
5, /* SINGLEBYTE_L */
|
||||
30, /* STRING_S */
|
||||
60, /* STRING_L */
|
||||
180, /* CONNECTION_S */
|
||||
1800, /* CONNECTION_L */
|
||||
15, /* DNS_TO */
|
||||
60, /* CHAIN_TO */
|
||||
15, /* CONNECT_TO */
|
||||
5, /* CONNBACK_TO */
|
||||
0,
|
||||
0
|
||||
};
|
||||
|
||||
struct extparam conf = {
|
||||
{0, 0}, /* threadinit */
|
||||
{1, 5, 30, 60, 180, 1800, 15, 60, 15, 5, 0, 0}, /* timeouts */
|
||||
NULL, /* struct ace * acl; */
|
||||
NULL, /* char * conffile; */
|
||||
NULL, NULL, /* struct bandlim * bandlimiter, *bandlimiterout; */
|
||||
NULL, /* struct connlim * connlimiter; */
|
||||
NULL, /* struct trafcount * trafcounter; */
|
||||
NULL, /* struct srvparam *services; */
|
||||
0, /* int stacksize, */
|
||||
-1, 0, 0, 0, 0, /* counterd, haveerror, rotate, paused, archiverc, */
|
||||
0, 500, 0, 0, 0, 0, 0, 0, 2, /* demon, maxchild, backlog, needreload, timetoexit, version, noforce, bandlimver, parentretries; */
|
||||
6, 600, /* int authcachetype, authcachetime; */
|
||||
1048576, /* int filtermaxsize; */
|
||||
0, 0, 0, /* int gracetraf, gracenum, gracedelay */
|
||||
0, /* int maxseg */
|
||||
NULL, NULL, /* unsigned char *logname, **archiver; */
|
||||
NONE, NONE, /* ROTATION logtype, countertype; */
|
||||
NULL, /* char * counterfile; */
|
||||
.threadinit = {0, 0},
|
||||
.timeouts = timeouts,
|
||||
.acl = NULL,
|
||||
.conffile = NULL,
|
||||
.bandlimiter = NULL,
|
||||
.bandlimiterout = NULL,
|
||||
.connlimiter = NULL,
|
||||
.trafcounter = NULL,
|
||||
.services = NULL,
|
||||
.stacksize = 0,
|
||||
.counterd = -1,
|
||||
.haveerror = 0,
|
||||
.rotate = 0,
|
||||
.paused = 0,
|
||||
.archiverc = 0,
|
||||
.demon = 0,
|
||||
.maxchild = 500,
|
||||
.backlog = 0,
|
||||
.needreload = 0,
|
||||
.timetoexit = 0,
|
||||
.version = 0,
|
||||
.noforce = 0,
|
||||
.bandlimver = 0,
|
||||
.parentretries = 2,
|
||||
.authcachetype = 6,
|
||||
.authcachetime = 600,
|
||||
.filtermaxsize = 1048576,
|
||||
.gracetraf = 0,
|
||||
.gracenum = 0,
|
||||
.gracedelay = 0,
|
||||
.maxseg = 0,
|
||||
.logname = NULL,
|
||||
.archiver = NULL,
|
||||
.logtype = NONE,
|
||||
.countertype = NONE,
|
||||
.counterfile = NULL,
|
||||
#ifndef NOIPV6
|
||||
{AF_INET},
|
||||
{AF_INET6},
|
||||
{AF_INET},
|
||||
.intsa = {AF_INET},
|
||||
.extsa6 = {AF_INET6},
|
||||
.extsa = {AF_INET},
|
||||
#else
|
||||
{AF_INET},
|
||||
{AF_INET},
|
||||
.intsa = {AF_INET},
|
||||
.extsa = {AF_INET},
|
||||
#endif
|
||||
NULL,
|
||||
NULL,
|
||||
doconnect,
|
||||
lognone,
|
||||
NULL,
|
||||
NULL,
|
||||
NULL, NULL,
|
||||
NULL,
|
||||
NULL,
|
||||
NULL,
|
||||
NULL,
|
||||
NULL,
|
||||
NULL,
|
||||
(time_t)0, (time_t)0,
|
||||
0,0,
|
||||
'@',
|
||||
.pwl = NULL,
|
||||
.authenticate = NULL,
|
||||
.authfunc = doconnect,
|
||||
.logfunc = lognone,
|
||||
.bandlimfunc = NULL,
|
||||
.trafcountfunc = NULL,
|
||||
.logtarget = NULL,
|
||||
.logformat = NULL,
|
||||
.fmon = NULL,
|
||||
.filters = NULL,
|
||||
.authfuncs = NULL,
|
||||
.stdlog = NULL,
|
||||
.demanddialprog = NULL,
|
||||
.stringtable = NULL,
|
||||
.logtime = (time_t)0,
|
||||
.time = (time_t)0,
|
||||
.logdumpsrv = 0,
|
||||
.logdumpcli = 0,
|
||||
.delimchar = '@',
|
||||
};
|
||||
|
||||
int numservers=0;
|
||||
|
||||
@ -154,6 +154,8 @@ extern int timetoexit;
|
||||
|
||||
extern struct extparam conf;
|
||||
|
||||
extern int timeouts[12];
|
||||
|
||||
int sockmap(struct clientparam * param, int timeo, int usesplice);
|
||||
int socksend(struct clientparam *param, SOCKET sock, unsigned char * buf, int bufsize, int to);
|
||||
int socksendto(struct clientparam *param, SOCKET sock, struct sockaddr * sin, unsigned char * buf, int bufsize, int to);
|
||||
|
||||
@ -643,7 +643,7 @@ struct extparam {
|
||||
#else
|
||||
int threadinit[2];
|
||||
#endif
|
||||
int timeouts[12];
|
||||
int *timeouts;
|
||||
struct ace * acl;
|
||||
char * conffile;
|
||||
struct bandlim * bandlimiter, *bandlimiterout;
|
||||
|
||||
Loading…
Reference in New Issue
Block a user