mirror of
https://github.com/3proxy/3proxy.git
synced 2025-12-24 23:36:43 +08:00
Compare commits
No commits in common. "fe53378596df213f4e1be079c59b4d23be24ee62" and "fbca6d8e9328ad2b6fbd04344bcc7ded99f532c6" have entirely different histories.
fe53378596
...
fbca6d8e93
42
src/common.c
42
src/common.c
@ -93,31 +93,27 @@ char *rotations[] = {
|
||||
|
||||
|
||||
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; */
|
||||
{0, 0},
|
||||
{1, 5, 30, 60, 180, 1800, 15, 60, 15, 5, 0, 0},
|
||||
NULL,
|
||||
NULL,
|
||||
NULL, NULL,
|
||||
NULL,
|
||||
NULL,
|
||||
NULL,
|
||||
0,
|
||||
-1, 0, 0, 0, 0,
|
||||
0, 500, 0, 0, 0, 0, 0, 0, 2,
|
||||
0, 0, 0,
|
||||
6, 600,
|
||||
1048576,
|
||||
NULL, NULL,
|
||||
NONE, NONE,
|
||||
NULL,
|
||||
#ifndef NOIPV6
|
||||
{AF_INET},
|
||||
{AF_INET6},
|
||||
{AF_INET},
|
||||
{AF_INET},{AF_INET6},{AF_INET},
|
||||
#else
|
||||
{AF_INET},
|
||||
{AF_INET},
|
||||
{AF_INET},{AF_INET},
|
||||
#endif
|
||||
NULL,
|
||||
NULL,
|
||||
|
||||
@ -466,11 +466,6 @@ static int h_rotate(int argc, unsigned char **argv){
|
||||
return 0;
|
||||
}
|
||||
|
||||
static int h_maxseg(int argc, unsigned char **argv){
|
||||
conf.maxseg = atoi((char *)argv[1]);
|
||||
return 0;
|
||||
}
|
||||
|
||||
static int h_logformat(int argc, unsigned char **argv){
|
||||
unsigned char * old = conf.logformat;
|
||||
conf.logformat = (unsigned char *)mystrdup((char *)argv[1]);
|
||||
@ -1653,9 +1648,8 @@ struct commands commandhandlers[]={
|
||||
{commandhandlers+64, "auto", h_proxy, 1, 0},
|
||||
{commandhandlers+65, "backlog", h_backlog, 2, 2},
|
||||
{commandhandlers+66, "tlspr", h_proxy, 1, 0},
|
||||
{commandhandlers+67, "maxseg", h_maxseg, 2, 2},
|
||||
#ifndef NORADIUS
|
||||
{commandhandlers+68, "radius", h_radius, 3, 0},
|
||||
{commandhandlers+67, "radius", h_radius, 3, 0},
|
||||
#endif
|
||||
{specificcommands, "", h_noop, 1, 0}
|
||||
};
|
||||
|
||||
@ -170,9 +170,6 @@ struct socketoptions sockopts[] = {
|
||||
#endif
|
||||
#ifdef TCP_FASTOPEN_CONNECT
|
||||
{TCP_FASTOPEN_CONNECT, "TCP_FASTOPEN_CONNECT"},
|
||||
#endif
|
||||
#ifdef TCP_MAXSEG
|
||||
{TCP_MAXSEG, "TCP_MAXSEG"},
|
||||
#endif
|
||||
{0, NULL}
|
||||
};
|
||||
@ -196,12 +193,6 @@ void setopts(SOCKET s, int opts){
|
||||
int i, opt, set;
|
||||
for(i = 0; opts >= (opt = (1<<i)); i++){
|
||||
set = 1;
|
||||
#ifdef TCP_MAXSEG
|
||||
if(sockopts[i].opt == TCP_MAXSEG){
|
||||
if(!conf.maxseg) continue;
|
||||
set = conf.maxseg;
|
||||
}
|
||||
#endif
|
||||
if(opts & opt) setsockopt(s, *sockopts[i].optname == 'T'? IPPROTO_TCP:
|
||||
#ifdef SOL_IP
|
||||
*sockopts[i].optname == 'I'? SOL_IP:
|
||||
|
||||
@ -651,7 +651,6 @@ struct extparam {
|
||||
int authcachetype, authcachetime;
|
||||
int filtermaxsize;
|
||||
int gracetraf, gracenum, gracedelay;
|
||||
int maxseg;
|
||||
unsigned char *logname, **archiver;
|
||||
ROTATION logtype, countertype;
|
||||
char * counterfile;
|
||||
|
||||
Loading…
Reference in New Issue
Block a user