routing

package
v1.0.1 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Nov 13, 2018 License: MIT Imports: 17 Imported by: 0

Documentation

Index

Constants

View Source
const (
	TABLE_MANGLE     = "mangle"
	CHAIN_TPROXY     = "RED_FROG_TPROXY"
	CHAIN_DIVERT     = "RED_FROG_DIVERT"
	CHAIN_RED_FROG   = "RED_FROG"
	CHAIN_PREROUTING = "PREROUTING"

	IPSET_RED_FROG_V4 = "RED_FROG_IPSET_V4"
	IPSET_RED_FROG_V6 = "RED_FROG_IPSET_V6"

	ROUTING_PRIORITY = 1
)
View Source
const (
	CACHE_PATH = "routing_mgr_cache.yaml"
)

Variables

This section is empty.

Functions

This section is empty.

Types

type RoutingMgr

type RoutingMgr struct {
	sync.RWMutex
	// contains filtered or unexported fields
}

func StartRoutingMgr

func StartRoutingMgr(port int, mark string, routingTableNum int, ignoreIP []string, interfaceName []string, bIPSet bool) (ret *RoutingMgr, err error)

func (*RoutingMgr) AddIPStr

func (c *RoutingMgr) AddIPStr(domain string, input string) (err error)

func (*RoutingMgr) AddIp

func (c *RoutingMgr) AddIp(domain string, ip net.IP) error

func (*RoutingMgr) FlushRoutingTable

func (c *RoutingMgr) FlushRoutingTable() (err error)

func (*RoutingMgr) LoadPacList

func (c *RoutingMgr) LoadPacList(domains map[string]bool, ips map[string]bool)

func (*RoutingMgr) PopulateRoutingTable

func (c *RoutingMgr) PopulateRoutingTable() (err error)

func (*RoutingMgr) ReloadPacList

func (c *RoutingMgr) ReloadPacList(domains map[string]bool, ips map[string]bool, ipDeleteList []string)

func (*RoutingMgr) Stop

func (c *RoutingMgr) Stop()

type RoutingMgrCache

type RoutingMgrCache struct {
	IPv4 map[string][]net.IP `yaml:"ipv4"`
	IPv6 map[string][]net.IP `yaml:"ipv6"`
}

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL