-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathconf.py
More file actions
42 lines (31 loc) · 843 Bytes
/
Copy pathconf.py
File metadata and controls
42 lines (31 loc) · 843 Bytes
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
# coding: utf-8
__author__ = "fripSide"
"""
"""
class Config:
PLAT_WEBTHINGS = "WebThings"
PLAT_AZURE = "AzureIoT"
PLAT_SMARTTHINGS = "SmartThings"
def __init__(self):
self.debug = True
# ebpf config
self.http_filter_ebpf = "ebpf/tcp_filter.c"
self.http_ebpf_section = "handle_pkt"
# xdp
self.xdp_ebpf_code = "ebpf/xdp_policy.c"
self.xdp_ebpf_section = "xdp_firewall"
# net config
self.platform = Config.PLAT_WEBTHINGS
self.net_interface = "lo" # eth0
self.byte_order = "big"
# ip filters config
self.host_ip = "192.168.33.10" # gateway
self.gateway_addr = ["192.168.33.10:8080"]
self.device_nodes = [
"192.168.33.15:8888", # webthings node
]
self.target_servers = self.gateway_addr + self.device_nodes
# self.hy_debug()
def hy_debug(self):
self.net_interface = "eth1"
CONFIG = Config()