-
Notifications
You must be signed in to change notification settings - Fork 26
/
Copy pathconfig.h
39 lines (29 loc) · 1.4 KB
/
config.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
#pragma once
// The maximum forward rules allowed.
#define MAX_FWD_RULES 256
// The maximum bind IPs used.
// This is used to determine the size of the port map.
// If you plan on binding multiple IP addresses, set this accordingly.
#define MAX_BIND_IPS 1
// The port range to use when selecting an available source port.
// MAX_PORT - (MIN_PORT - 1) = The maximum amount of concurrent connections.
#define MIN_PORT 500
#define MAX_PORT 900
// Enables forward rule logging.
#define ENABLE_RULE_LOGGING
// Counts packets sent back to the client towards "forwarded" stat counter.
//#define STATS_COUNT_FWD_BACK
// If enabled, performs a FIB lookup on the route table when forwarding packets.
// Otherwise, the ethernet source and destination MAC addresses are swapped.
#define ENABLE_FIB_LOOKUPS
// Maximum interfaces the firewall can attach to.
#define MAX_INTERFACES 6
// Whether to recycle connections by last seen time.
// Otherwise, connections are recycled by least amount of packets per nanosecond.
#define RECYCLE_LAST_SEEN
// Adds packet and last seen counters to connections.
// This isn't used anywhere in the program right now which is why it's disabled by default.
//#define CONNECTION_COUNTERS
// If enabled, uses a newer bpf_loop() function when choosing a source port for a new connection.
// This allows for a much higher source port range. However, it requires a more recent kernel.
#define USE_NEW_LOOP