Documentation ¶
Index ¶
- Constants
- func RunAudit(ctx context.Context, wg *sync.WaitGroup, conf *config.Config) error
- type DNSAnswer
- type DNSProxy
- type DNSResolver
- type DefaultResolver
- type IPAddress
- type Manager
- func (mgr *Manager) AsyncResolve()
- func (m *Manager) Attach() error
- func (m *Manager) Close()
- func (mgr *Manager) ResolveAddressv4(domain string) (*DNSAnswer, error)
- func (mgr *Manager) ResolveAddressv6(domain string) (*DNSAnswer, error)
- func (m *Manager) SetConfigToMap() error
- func (m *Manager) Start(eventsChannel chan []byte) error
- func (mgr *Manager) StartDNSServer(bindAddress string) error
- func (m *Manager) Stop()
Constants ¶
View Source
const ( UPDATE_INTERVAL = 5 TASK_COMM_LEN = 16 NEW_UTS_LEN = 64 PADDING_LEN = 7 SRCIP_V4_LEN = 4 DSTIP_V4_LEN = 4 SRCIP_V6_LEN = 16 DSTIP_V6_LEN = 16 ACTION_MONITOR uint8 = 0 ACTION_BLOCKED uint8 = 1 ACTION_MONITOR_STRING = "MONITOR" ACTION_BLOCKED_STRING = "BLOCKED" ACTION_UNKNOWN_STRING = "UNKNOWN" BLOCKED_IPV4 int32 = 0 BLOCKED_IPV6 int32 = 1 LSM_HOOK_POINT_CONNECT uint8 = 0 LSM_HOOK_POINT_SENDMSG uint8 = 1 )
View Source
const ( TCP = 1 UDP = 2 TCP_STRING = "TCP" UDP_STRING = "UDP" PROTOCOL_UNKNOWN_STRING = "UNKOWN" )
View Source
const ( MODE_MONITOR uint32 = 0 MODE_BLOCK uint32 = 1 TARGET_HOST uint32 = 0 TAREGT_CONTAINER uint32 = 1 // BPF Map Names RESTRICT_NETWORK_CONFIG_MAP_NAME = "network_bouheki_config_map" ALLOWED_V4_CIDR_LIST_MAP_NAME = "allowed_v4_cidr_list" ALLOWED_V6_CIDR_LIST_MAP_NAME = "allowed_v6_cidr_list" DENIED_V4_CIDR_LIST_MAP_NAME = "denied_v4_cidr_list" DENIED_V6_CIDR_LIST_MAP_NAME = "denied_v6_cidr_list" ALLOWED_UID_LIST_MAP_NAME = "allowed_uid_list" DENIED_UID_LIST_MAP_NAME = "denied_uid_list" ALLOWED_GID_LIST_MAP_NAME = "allowed_gid_list" DENIED_GID_LIST_MAP_NAME = "denied_gid_list" ALLOWED_COMMAND_LIST_MAP_NAME = "allowed_command_list" DENIED_COMMAND_LIST_MAP_NAME = "denied_command_list" MAP_SIZE = 20 MAP_MODE_START = 0 MAP_MODE_END = 4 MAP_TARGET_START = 4 MAP_TARGET_END = 8 MAP_ALLOW_COMMAND_INDEX = 8 MAP_ALLOW_UID_INDEX = 12 MAP_ALLOW_GID_INDEX = 16 )
View Source
const (
BPF_OBJECT_NAME = "restricted-network"
)
Variables ¶
This section is empty.
Functions ¶
Types ¶
type DNSResolver ¶
type DefaultResolver ¶
type DefaultResolver struct {
// contains filtered or unexported fields
}
type Manager ¶
type Manager struct {
// contains filtered or unexported fields
}
func (*Manager) AsyncResolve ¶ added in v0.0.9
func (mgr *Manager) AsyncResolve()
func (*Manager) ResolveAddressv4 ¶ added in v0.0.8
func (*Manager) ResolveAddressv6 ¶ added in v0.0.8
func (*Manager) SetConfigToMap ¶
func (*Manager) StartDNSServer ¶ added in v0.0.9
Click to show internal directories.
Click to hide internal directories.