mirror of
https://github.com/3proxy/3proxy.git
synced 2026-08-26 09:55:48 +08:00
Fix non-linux cmake
This commit is contained in:
parent
307e6d2c49
commit
7f430ccc79
@ -186,10 +186,6 @@ elseif(CMAKE_SYSTEM_NAME STREQUAL "Linux")
|
||||
add_compile_definitions(WITH_NETFILTER)
|
||||
endif()
|
||||
|
||||
if(3PROXY_USE_HTTPSRV)
|
||||
add_compile_definitions(WITH_HTTPSRV)
|
||||
endif()
|
||||
|
||||
if(3PROXY_USE_UNIX_SOCKETS)
|
||||
add_compile_definitions(WITH_UN)
|
||||
endif()
|
||||
@ -241,6 +237,10 @@ else()
|
||||
)
|
||||
endif()
|
||||
|
||||
if(3PROXY_USE_HTTPSRV)
|
||||
add_compile_definitions(WITH_HTTPSRV)
|
||||
endif()
|
||||
|
||||
# Unix domain sockets off: NO_UN also undefines WITH_UN if it arrives from
|
||||
# elsewhere, e.g. CFLAGS
|
||||
if(NOT 3PROXY_USE_UNIX_SOCKETS)
|
||||
|
||||
28
src/acl.c
28
src/acl.c
@ -161,3 +161,31 @@ int checkACL(struct clientparam * param){
|
||||
}
|
||||
return 3;
|
||||
}
|
||||
|
||||
char * aceaction (int action){
|
||||
switch (action) {
|
||||
case ALLOW:
|
||||
case REDIRECT:
|
||||
return "allow";
|
||||
case DENY:
|
||||
return "deny";
|
||||
case BANDLIM:
|
||||
return "bandlim";
|
||||
case NOBANDLIM:
|
||||
return "nobandlim";
|
||||
case COUNTIN:
|
||||
return "countin";
|
||||
case NOCOUNTIN:
|
||||
return "nocountin";
|
||||
case COUNTOUT:
|
||||
return "countout";
|
||||
case NOCOUNTOUT:
|
||||
return "nocountout";
|
||||
case COUNTALL:
|
||||
return "countall";
|
||||
case NOCOUNTALL:
|
||||
return "nocountall";
|
||||
default:
|
||||
return "unknown";
|
||||
}
|
||||
}
|
||||
|
||||
@ -391,8 +391,6 @@ static void * ef_ace_next(struct node * node){
|
||||
}
|
||||
|
||||
|
||||
char * aceaction (int action);
|
||||
|
||||
static void * ef_ace_type(struct node * node){
|
||||
return aceaction(((struct ace *)node->value) -> action);
|
||||
}
|
||||
|
||||
@ -322,6 +322,7 @@ int parseusername(char *username, struct clientparam *param, int extpasswd);
|
||||
int parseconnusername(char *username, struct clientparam *param, int extpasswd, uint16_t port);
|
||||
int ACLmatches(struct ace* acentry, struct clientparam * param);
|
||||
int checkACL(struct clientparam * param);
|
||||
char * aceaction (int action);
|
||||
extern int havelog;
|
||||
uint32_t udpresolve(int af, unsigned char * name, unsigned char * value, uint32_t *retttl, struct clientparam* param, int makeauth);
|
||||
|
||||
|
||||
@ -25,35 +25,6 @@ struct printparam {
|
||||
struct clientparam *cp;
|
||||
};
|
||||
|
||||
char * aceaction (int action){
|
||||
switch (action) {
|
||||
case ALLOW:
|
||||
case REDIRECT:
|
||||
return "allow";
|
||||
case DENY:
|
||||
return "deny";
|
||||
case BANDLIM:
|
||||
return "bandlim";
|
||||
case NOBANDLIM:
|
||||
return "nobandlim";
|
||||
case COUNTIN:
|
||||
return "countin";
|
||||
case NOCOUNTIN:
|
||||
return "nocountin";
|
||||
case COUNTOUT:
|
||||
return "countout";
|
||||
case NOCOUNTOUT:
|
||||
return "nocountout";
|
||||
case COUNTALL:
|
||||
return "countall";
|
||||
case NOCOUNTALL:
|
||||
return "nocountall";
|
||||
default:
|
||||
return "unknown";
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
static void stdpr(struct printparam* pp, char *buf, int inbuf){
|
||||
if((pp->inbuf + inbuf > 1024) || !buf) {
|
||||
socksend(pp->cp, pp->cp->clisock, (unsigned char *)pp->buf, pp->inbuf, conf.timeouts[STRING_S]);
|
||||
|
||||
Loading…
Reference in New Issue
Block a user