mirror of
https://github.com/3proxy/3proxy.git
synced 2026-11-22 23:59:41 +08:00
implement small http server for admin and testing
This commit is contained in:
1 parent
a3b40e6176
commit
3526759e59
22 files changed
+950
-254
No files matched your search
@@ -216,6 +216,7 @@ typedef enum {
|
||||
S_AUTO,
|
||||
S_TLSPR,
|
||||
S_IMAPP,
|
||||
S_HTTPSRV,
|
||||
S_ZOMBIE
|
||||
}PROXYSERVICE;
|
||||
|
||||
@@ -356,6 +357,28 @@ struct hostname {
|
||||
int matchtype;
|
||||
};
|
||||
|
||||
/* A request handed to an http operation. */
|
||||
struct httpreq {
|
||||
struct clientparam *param;
|
||||
char method[16];
|
||||
char path[256];
|
||||
char query[512];
|
||||
char host[256];
|
||||
unsigned long contentlen;
|
||||
int globstart, globlen;
|
||||
};
|
||||
|
||||
/* One "http" line: which host and url it answers for, which operation serves
|
||||
it and the parameters that operation takes. Patterns use the same syntax and
|
||||
the same matcher as host lists in access rules. */
|
||||
struct httprule {
|
||||
struct httprule *next;
|
||||
struct hostname host;
|
||||
struct hostname url;
|
||||
int op;
|
||||
unsigned char *params;
|
||||
};
|
||||
|
||||
struct ace {
|
||||
struct ace *next;
|
||||
int action;
|
||||
@@ -583,6 +606,9 @@ struct srvparam {
|
||||
struct auth *authenticate;
|
||||
struct pollfd * srvfds;
|
||||
struct ace *acl;
|
||||
#ifdef WITH_HTTPSRV
|
||||
struct httprule *httprules;
|
||||
#endif
|
||||
struct auth *authfuncs;
|
||||
struct filter *filter;
|
||||
unsigned char * logformat;
|
||||
@@ -702,6 +728,9 @@ struct extparam {
|
||||
_3proxy_sem_t threadinit;
|
||||
int *timeouts;
|
||||
struct ace * acl;
|
||||
#ifdef WITH_HTTPSRV
|
||||
struct httprule *httprules;
|
||||
#endif
|
||||
char * conffile;
|
||||
struct bandlim * bandlimiter, *bandlimiterout;
|
||||
struct connlim * connlimiter;
|
||||
|
||||
Reference in new issue
Block a user