forked from Castaglia/proftpd-mod_proxy
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathmod_proxy.h.in
96 lines (78 loc) · 2.86 KB
/
mod_proxy.h.in
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
/*
* ProFTPD - mod_proxy
* Copyright (c) 2012-2017 TJ Saunders
*
* This program is free software; you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
* the Free Software Foundation; either version 2 of the License, or
* (at your option) any later version.
*
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
*
* You should have received a copy of the GNU General Public License
* along with this program; if not, write to the Free Software
* Foundation, Inc., 51 Franklin Street, Suite 500, Boston, MA 02110-1335, USA.
*
* As a special exemption, TJ Saunders and other respective copyright holders
* give permission to link this program with OpenSSL, and distribute the
* resulting executable, without including the source code for OpenSSL in the
* source distribution.
*/
#ifndef MOD_PROXY_H
#define MOD_PROXY_H
#include "conf.h"
#include "privs.h"
#include <signal.h>
#if HAVE_SYS_MMAN_H
# include <sys/mman.h>
#endif
/* Define if you have the sqlite3.h header. */
#undef HAVE_SQLITE3_H
#if !defined(HAVE_SQLITE3_H)
# error "SQLite library/headers required"
#endif
/* Define if you have the random(3) function. */
#undef HAVE_RANDOM
/* Define if you have the sqlite3_stmt_readonly() function. */
#undef HAVE_SQLITE3_STMT_READONLY
/* Define if you have the sqlite3_trace() function. */
#undef HAVE_SQLITE3_TRACE
/* Define if you have the sqlite3_trace_v2() function. */
#undef HAVE_SQLITE3_TRACE_V2
/* Define if you have the srandom(3) function. */
#undef HAVE_SRANDOM
#define MOD_PROXY_VERSION "mod_proxy/0.5"
/* Make sure the version of proftpd is as necessary. */
#if PROFTPD_VERSION_NUMBER < 0x0001030605
# error "ProFTPD 1.3.6rc5 or later required"
#endif
/* mod_proxy option flags */
#define PROXY_OPT_USE_PROXY_PROTOCOL 0x0001
#define PROXY_OPT_SHOW_FEATURES 0x0002
#define PROXY_OPT_USE_REVERSE_PROXY_AUTH 0x0004
#define PROXY_OPT_USE_DIRECT_DATA_TRANSFERS 0x0008
#define PROXY_OPT_IGNORE_CONFIG_PERMS 0x0010
/* mod_proxy datastores */
#define PROXY_DATASTORE_SQLITE 1
#define PROXY_DATASTORE_REDIS 2
/* Miscellaneous */
extern int proxy_logfd;
extern module proxy_module;
extern pool *proxy_pool;
extern unsigned long proxy_opts;
extern unsigned int proxy_sess_state;
extern int proxy_datastore;
extern void *proxy_datastore_data;
extern size_t proxy_datastore_datasz;
/* mod_proxy session state flags */
#define PROXY_SESS_STATE_PROXY_AUTHENTICATED 0x0001
#define PROXY_SESS_STATE_CONNECTED 0x0002
#define PROXY_SESS_STATE_BACKEND_AUTHENTICATED 0x0004
#define PROXY_SESS_STATE_BACKEND_HAS_CTRL_TLS 0x0008
#ifndef PROXY_DEFAULT_RETRY_COUNT
# define PROXY_DEFAULT_RETRY_COUNT 5
#endif
#endif /* MOD_PROXY_H */