This repository has been archived by the owner on Jun 24, 2023. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 61
/
Copy pathmain.h
70 lines (55 loc) · 2.03 KB
/
main.h
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
#ifndef HAVE_CONFIG_H
#include "config.h"
#endif
#ifndef _MAIN_H
#define _MAIN_H
#include <stdio.h>
#include "utils.h"
typedef enum {
INTERCEPT_ONLY,
INTERCEPT_EXCEPT
} intercept_t;
typedef struct __proxenet_config {
unsigned char verbose;
bool use_color;
unsigned short nb_threads;
bool daemon;
char* logfile;
FILE* logfile_fd;
char* port;
char* iface;
int ip_version;
/* interception parameters */
intercept_t intercept_mode;
char* intercept_pattern;
/* plugin paths */
char* plugins_path;
char* autoload_path;
/* proxenet SSL certificate for SSL interception */
char* cafile; // realpath to proxenet CA certificate
char* keyfile; // realpath to proxenet private key
char* keyfile_pwd; // password to unlock the private key
char* certsdir; // realpath to stored certificates
char* certskey; // realpath to stored certificates private key
char* certskey_pwd; // password to unlock the stored certificates private key
/* client-side SSL certificate */
char* sslcli_certfile; // realpath to SSL client certificate
char* sslcli_keyfile; // realpath to SSL client private key
char* sslcli_keyfile_pwd; // password to unlock the client private key
char* sslcli_domain; // domain to use the client the certificate
struct _proxy_t {
char* host;
char* port;
} proxy;
bool is_socks_proxy;
unsigned short try_exit;
unsigned short try_exit_max;
bool ie_compat;
bool ssl_intercept;
bool do_restart;
} conf_t;
conf_t current_config;
conf_t* cfg;
int proxenet_init_config(int, char**);
void proxenet_free_config();
#endif /* _MAIN_H */