-
Notifications
You must be signed in to change notification settings - Fork 18
/
mod_proxy.h.in
143 lines (112 loc) · 4.34 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
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
/*
* ProFTPD - mod_proxy
* Copyright (c) 2012-2024 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 <zlib.h> header. */
#undef HAVE_ZLIB_H
/* Define if you have OpenSSL with crippled AES support. */
#undef HAVE_AES_CRIPPLED_OPENSSL
/* Define if you have OpenSSL with EVP_aes_128_ctr support. */
#undef HAVE_EVP_AES_128_CTR_OPENSSL
/* Define if you have OpenSSL with EVP_aes_192_ctr support. */
#undef HAVE_EVP_AES_192_CTR_OPENSSL
/* Define if you have OpenSSL with EVP_aes_256_ctr support. */
#undef HAVE_EVP_AES_256_CTR_OPENSSL
/* Define if you have OpenSSL with EVP_aes_256_gcm support. */
#undef HAVE_EVP_AES_256_GCM_OPENSSL
/* Define if you have OpenSSL with OSSL_PROVIDER_load support. */
#undef HAVE_OSSL_PROVIDER_LOAD_OPENSSL
/* Define if you have OpenSSL with SHA256 support. */
#undef HAVE_SHA256_OPENSSL
/* Define if you have OpenSSL with SHA512 support. */
#undef HAVE_SHA512_OPENSSL
/* Define if you have OpenSSL with X448 support. */
#undef HAVE_X448_OPENSSL
/* 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 if you have the strnstr(3) function. */
#undef HAVE_STRNSTR
#define MOD_PROXY_VERSION "mod_proxy/0.9.5"
/* Make sure the version of proftpd is as necessary. */
#if PROFTPD_VERSION_NUMBER < 0x0001030706
# error "ProFTPD 1.3.7a or later required"
#endif
/* mod_proxy option flags */
#define PROXY_OPT_USE_PROXY_PROTOCOL_V1 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
#define PROXY_OPT_USE_PROXY_PROTOCOL_V2 0x0020
#define PROXY_OPT_USE_PROXY_PROTOCOL_V2_TLVS 0x0040
#define PROXY_OPT_ALLOW_FOREIGN_ADDRESS 0x0080
/* 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
#define PROXY_SESS_STATE_BACKEND_HAS_DATA_TLS 0x0010
#define PROXY_SESS_STATE_SSH_HAVE_KEX 0x0020
#define PROXY_SESS_STATE_SSH_HAVE_SERVICE 0x0040
#define PROXY_SESS_STATE_SSH_HAVE_AUTH 0x0080
#define PROXY_SESS_STATE_SSH_REKEYING 0x0100
#define PROXY_SESS_STATE_SSH_HAVE_EXT_INFO 0x0200
#ifndef PROXY_DEFAULT_RETRY_COUNT
# define PROXY_DEFAULT_RETRY_COUNT 5
#endif
/* mod_proxy SSH roles */
#define PROXY_SSH_ROLE_SERVER 1
#define PROXY_SSH_ROLE_CLIENT 2
#endif /* MOD_PROXY_H */