Documentation
¶
Index ¶
- Constants
- Variables
- func GetOpenVPNVersion() int
- func GetSocketServer(s *co.Switch) libol.SocketServer
- func NewNetworker(c *co.Network) api.NetworkApi
- func NotAllowed(w http.ResponseWriter, r *http.Request)
- func NotFound(w http.ResponseWriter, r *http.Request)
- func PeerName(name, prefix string) (string, string)
- func SplitCombined(value string) (string, string)
- func TestOpenVPN_Version(t *testing.T)
- type ACL
- type ACLRule
- type Apps
- type BgpWorker
- func (w *BgpWorker) AddAdvertis(data schema.BgpPrefix)
- func (w *BgpWorker) AddNeighbor(data schema.BgpNeighbor)
- func (w *BgpWorker) AddReceives(data schema.BgpPrefix)
- func (w *BgpWorker) DelAdvertis(data schema.BgpPrefix)
- func (w *BgpWorker) DelNeighbor(data schema.BgpNeighbor)
- func (w *BgpWorker) DelReceives(data schema.BgpPrefix)
- func (w *BgpWorker) Disable()
- func (w *BgpWorker) Enable(data schema.Bgp)
- func (w *BgpWorker) Get() *schema.Bgp
- func (w *BgpWorker) Initialize()
- func (w *BgpWorker) Reload(v api.SwitchApi)
- func (w *BgpWorker) Start(v api.SwitchApi)
- func (w *BgpWorker) Stop()
- type CeciWorker
- type Dhcp
- func (d *Dhcp) Clean()
- func (d *Dhcp) Conf() *co.Dhcp
- func (d *Dhcp) ConfFile() string
- func (d *Dhcp) Initialize()
- func (d *Dhcp) LeaseFile() string
- func (d *Dhcp) LogFile() string
- func (d *Dhcp) Path() string
- func (d *Dhcp) PidFile() string
- func (d *Dhcp) SaveConf()
- func (d *Dhcp) Start()
- func (d *Dhcp) Stop()
- func (d *Dhcp) Tmpl() string
- func (d *Dhcp) UUID() string
- type FindHop
- func (h *FindHop) AddHop(data schema.FindHop) error
- func (h *FindHop) DelHop(data schema.FindHop) error
- func (h *FindHop) ListHop(call func(obj schema.FindHop))
- func (h *FindHop) LoadHop(findhop string, nlr *nl.Route)
- func (h *FindHop) SaveHop()
- func (h *FindHop) Start()
- func (h *FindHop) Stop()
- func (h *FindHop) UnloadHop(findhop string, nlr *nl.Route)
- type FindHopDriver
- type FindHopImpl
- func (c *FindHopImpl) Check(ipList []string) []co.MultiPath
- func (c *FindHopImpl) Config() *co.FindHop
- func (c *FindHopImpl) HasRoute() bool
- func (c *FindHopImpl) LoadRoute(nlr *nl.Route)
- func (c *FindHopImpl) Name() string
- func (c *FindHopImpl) ReloadRoute()
- func (c *FindHopImpl) Start()
- func (c *FindHopImpl) Stop()
- func (c *FindHopImpl) UnloadRoute(rt *nl.Route)
- func (c *FindHopImpl) UpdateAvailable(mp []co.MultiPath) bool
- type Hook
- type Http
- func (t *Http) GetApi(w http.ResponseWriter, r *http.Request)
- func (h *Http) GetIndex(w http.ResponseWriter, r *http.Request)
- func (h *Http) IndexHtml(w http.ResponseWriter, r *http.Request)
- func (h *Http) Initialize()
- func (h *Http) IsAuth(w http.ResponseWriter, r *http.Request) bool
- func (h *Http) LoadRouter()
- func (h *Http) LoadToken()
- func (h *Http) Middleware(next http.Handler) http.Handler
- func (h *Http) PProf(r *mux.Router)
- func (h *Http) ParseFiles(w http.ResponseWriter, name string, data interface{}) error
- func (h *Http) Prome(r *mux.Router)
- func (h *Http) PubFile(w http.ResponseWriter, r *http.Request)
- func (h *Http) Router() *mux.Router
- func (h *Http) SaveToken()
- func (h *Http) SetToken(value string)
- func (h *Http) Shutdown()
- func (h *Http) Start()
- type IPSecWorker
- func (w *IPSecWorker) AddTunnel(data schema.IPSecTunnel)
- func (w *IPSecWorker) DelTunnel(data schema.IPSecTunnel)
- func (w *IPSecWorker) Initialize()
- func (w *IPSecWorker) ListTunnels(call func(obj schema.IPSecTunnel))
- func (w *IPSecWorker) Reload(v api.SwitchApi)
- func (w *IPSecWorker) Start(v api.SwitchApi)
- func (w *IPSecWorker) StartTunnel(data schema.IPSecTunnel)
- func (w *IPSecWorker) Stop()
- func (w *IPSecWorker) UpdateState()
- type KnockRule
- type Link
- func (l *Link) Clean()
- func (l *Link) Conf() *co.Access
- func (l *Link) ConfFile() string
- func (l *Link) FindPid() int
- func (l *Link) ID() string
- func (l *Link) Initialize()
- func (l *Link) Kill()
- func (l *Link) LogFile() string
- func (l *Link) Path() string
- func (l *Link) PidFile() string
- func (l *Link) Start() error
- func (l *Link) StatusFile() string
- func (l *Link) Stop() error
- func (l *Link) UUID() string
- type Links
- type LinuxLink
- type OpenLANWorker
- type OpenVPN
- func (o *OpenVPN) AddClient(name, address string) error
- func (o *OpenVPN) CheckWait()
- func (o *OpenVPN) Clean()
- func (o *OpenVPN) ClientDir() string
- func (o *OpenVPN) DelClient(name string) error
- func (o *OpenVPN) Directory() string
- func (o *OpenVPN) Exec(cmd string) error
- func (o *OpenVPN) FileCfg(full bool) string
- func (o *OpenVPN) FileClient(full bool) string
- func (o *OpenVPN) FileClientProfile(full bool) string
- func (o *OpenVPN) FileCtrl(full bool) string
- func (o *OpenVPN) FileIpp(full bool) string
- func (o *OpenVPN) FileLog(full bool) string
- func (o *OpenVPN) FilePid(full bool) string
- func (o *OpenVPN) FindPid() int
- func (o *OpenVPN) ID() string
- func (o *OpenVPN) Initialize()
- func (o *OpenVPN) Kill()
- func (o *OpenVPN) KillClient(name string) error
- func (o *OpenVPN) ListClients(call func(name, address string))
- func (o *OpenVPN) Path() string
- func (o *OpenVPN) Profile() ([]byte, error)
- func (o *OpenVPN) ServerDir() string
- func (o *OpenVPN) Start()
- func (o *OpenVPN) Stop()
- func (o *OpenVPN) ValidConf() bool
- func (o *OpenVPN) WriteConf(path string) error
- type OpenVPNData
- type OpenVPNProfile
- type PingDriver
- type PingResult
- type QosCtrl
- func (q *QosCtrl) AddOrUpdateQos(name string, inSpeed float64)
- func (q *QosCtrl) AddQos(name string, inSpeed float64) error
- func (q *QosCtrl) ChainIn() string
- func (q *QosCtrl) ClientUpdate()
- func (q *QosCtrl) DelQos(name string) error
- func (q *QosCtrl) DelUserRule(name string)
- func (q *QosCtrl) FindClient(name string) *schema.VPNClient
- func (q *QosCtrl) Initialize()
- func (q *QosCtrl) ListQos(call func(obj schema.Qos))
- func (q *QosCtrl) SaveQos()
- func (q *QosCtrl) Start()
- func (q *QosCtrl) Stop()
- func (q *QosCtrl) Update()
- func (q *QosCtrl) UpdateQos(name string, inSpeed float64) error
- type QosUser
- func (qr *QosUser) BuildChainIn(chain *cn.FireWallChain)
- func (qr *QosUser) BuildChainInJump(chain *cn.FireWallChain)
- func (qr *QosUser) Clear(chainIn *cn.FireWallChain)
- func (qr *QosUser) ClearChainIn(chain *cn.FireWallChain)
- func (qr *QosUser) ClearChainInJump(chain *cn.FireWallChain)
- func (qr *QosUser) InLimitPacket() string
- func (qr *QosUser) InLimitRule() cn.IPRule
- func (qr *QosUser) InLimitStr() string
- func (qr *QosUser) ReBuild(chainIn *cn.FireWallChain)
- func (qr *QosUser) RuleName(dir string) string
- func (qr *QosUser) Start(chainIn *cn.FireWallChain)
- func (qr *QosUser) Update(chainIn *cn.FireWallChain, inSpeed float64, device string, ip string)
- type RouterWorker
- func (w *RouterWorker) AddInterface(data schema.RouterInterface) error
- func (w *RouterWorker) AddPrivate(data string) error
- func (w *RouterWorker) AddRedirect(value schema.RedirectRoute)
- func (w *RouterWorker) AddTunnel(data schema.RouterTunnel) error
- func (w *RouterWorker) DelInterface(data schema.RouterInterface) error
- func (w *RouterWorker) DelPrivate(data string) error
- func (w *RouterWorker) DelRedirect(value schema.RedirectRoute)
- func (w *RouterWorker) DelTunnel(data schema.RouterTunnel) error
- func (w *RouterWorker) Forward()
- func (w *RouterWorker) Initialize()
- func (w *RouterWorker) Reload(v api.SwitchApi)
- func (w *RouterWorker) Start(v api.SwitchApi)
- func (w *RouterWorker) Stop()
- type Switch
- func (v *Switch) AddLdap(value schema.LDAP) error
- func (v *Switch) AddNetwork(network string)
- func (v *Switch) AddRate(device string, mbit int)
- func (v *Switch) Alias() string
- func (v *Switch) Config() *co.Switch
- func (v *Switch) DelLdap()
- func (v *Switch) DelNetwork(network string)
- func (v *Switch) DelRate(device string)
- func (v *Switch) FreeTap(dev network.Taper) error
- func (v *Switch) GetBridge(tenant string) (network.Bridger, error)
- func (v *Switch) GetCert() (ce schema.VersionCert)
- func (v *Switch) GetPort(listen string) string
- func (v *Switch) Initialize()
- func (v *Switch) NewTap(tenant string) (network.Taper, error)
- func (v *Switch) OffClient(client libol.SocketClient)
- func (v *Switch) OnClient(client libol.SocketClient) error
- func (v *Switch) OnClose(client libol.SocketClient) error
- func (v *Switch) Protocol() string
- func (v *Switch) ReadClient(client libol.SocketClient, frame *libol.FrameMessage) error
- func (v *Switch) ReadTap(device network.Taper, readAt func(f *libol.FrameMessage) error)
- func (v *Switch) Reload()
- func (v *Switch) Save()
- func (v *Switch) SaveNetwork(network string)
- func (v *Switch) Server() libol.SocketServer
- func (v *Switch) SignIn(client libol.SocketClient) error
- func (v *Switch) Start()
- func (v *Switch) Stop()
- func (v *Switch) UUID() string
- func (v *Switch) UpTime() int64
- func (v *Switch) UpdateCert(data schema.VersionCert)
- type WorkerImpl
- func (w *WorkerImpl) ACLer() api.ACLApi
- func (w *WorkerImpl) AddAddress(value string)
- func (w *WorkerImpl) AddDnat(data schema.DNAT) error
- func (w *WorkerImpl) AddOutput(data schema.Output)
- func (w *WorkerImpl) AddPhysical(bridge string, output string)
- func (w *WorkerImpl) AddRoute(route *schema.PrefixRoute, v api.SwitchApi) error
- func (w *WorkerImpl) AddVPN(value schema.OpenVPN) error
- func (w *WorkerImpl) AddVPNClient(name, address string) error
- func (w *WorkerImpl) Bridger() cn.Bridger
- func (w *WorkerImpl) Config() *co.Network
- func (w *WorkerImpl) DelAddress()
- func (w *WorkerImpl) DelDnat(data schema.DNAT) error
- func (w *WorkerImpl) DelOutput(data schema.Output)
- func (w *WorkerImpl) DelPhysical(bridge string, output string)
- func (w *WorkerImpl) DelRoute(route *schema.PrefixRoute, v api.SwitchApi) error
- func (w *WorkerImpl) DelVPN()
- func (w *WorkerImpl) DelVPNClient(name string) error
- func (w *WorkerImpl) DisableZTrust()
- func (w *WorkerImpl) EnableZTrust()
- func (w *WorkerImpl) FindHoper() api.FindHopApi
- func (w *WorkerImpl) GetCfgs() (*co.Network, *co.OpenVPN)
- func (w *WorkerImpl) ID() string
- func (w *WorkerImpl) IfAddr() string
- func (w *WorkerImpl) Initialize()
- func (w *WorkerImpl) KillVPNClient(name string) error
- func (w *WorkerImpl) ListClients(call func(name, local string))
- func (w *WorkerImpl) ListDnat(call func(data schema.DNAT))
- func (w *WorkerImpl) ListRoute(call func(obj schema.PrefixRoute))
- func (w *WorkerImpl) Provider() string
- func (w *WorkerImpl) Qoser() api.QosApi
- func (w *WorkerImpl) Reload(v api.SwitchApi)
- func (w *WorkerImpl) Router() api.RouteApi
- func (w *WorkerImpl) SaveOutput()
- func (w *WorkerImpl) SaveRoute()
- func (w *WorkerImpl) SetMss(mss int)
- func (w *WorkerImpl) SetSnat(value string)
- func (w *WorkerImpl) Start(v api.SwitchApi)
- func (w *WorkerImpl) StartVPN()
- func (w *WorkerImpl) Stop()
- func (w *WorkerImpl) String() string
- func (w *WorkerImpl) Subnet() *net.IPNet
- func (w *WorkerImpl) ZTruster() api.ZTrustApi
- type ZGuest
- type ZTrust
- func (z *ZTrust) AddGuest(name, source string) error
- func (z *ZTrust) Chain() string
- func (z *ZTrust) DelGuest(name, source string) error
- func (z *ZTrust) Initialize()
- func (z *ZTrust) Knock(name string, protocol, dest, port string, age int) error
- func (z *ZTrust) ListGuest(call func(obj schema.ZGuest))
- func (z *ZTrust) ListKnock(name string, call func(obj schema.KnockRule))
- func (z *ZTrust) Start()
- func (z *ZTrust) Stop()
- func (z *ZTrust) Update()
Constants ¶
View Source
const ( BgpBin = "/var/openlan/script/frr-client" BgpEtc = "/etc/frr/frr.conf" )
View Source
const ( CeciBin = "/usr/bin/openceci" CeciDir = "/var/openlan/ceci/" )
View Source
const ( DhcpBin = "dnsmasq" DhcpDir = "/var/openlan/dhcp" )
View Source
const ( IPSecBin = "/usr/sbin/ipsec" IPSecEtcDir = "/etc/ipsec.d" IPSecLogDir = "/var/openlan/ipsec" )
View Source
const ( AccessBin = "openlan-access" AccessDir = "/var/openlan/access" )
View Source
const ( OpenVPNBin = "openvpn" VPNCurDir = "/var/openlan/openvpn/default" )
View Source
const (
UDPBin = "openudp"
)
Variables ¶
View Source
var BgpTmpl = `` /* 1317-byte string literal not displayed */
Functions ¶
func GetOpenVPNVersion ¶
func GetOpenVPNVersion() int
func GetSocketServer ¶
func GetSocketServer(s *co.Switch) libol.SocketServer
func NewNetworker ¶
func NewNetworker(c *co.Network) api.NetworkApi
func NotAllowed ¶
func NotAllowed(w http.ResponseWriter, r *http.Request)
func SplitCombined ¶
func TestOpenVPN_Version ¶
Types ¶
type ACL ¶
func (*ACL) Initialize ¶
func (a *ACL) Initialize()
type ACLRule ¶
type BgpWorker ¶
type BgpWorker struct {
*WorkerImpl
// contains filtered or unexported fields
}
func NewBgpWorker ¶
func (*BgpWorker) AddAdvertis ¶
func (*BgpWorker) AddNeighbor ¶
func (w *BgpWorker) AddNeighbor(data schema.BgpNeighbor)
func (*BgpWorker) AddReceives ¶
func (*BgpWorker) DelAdvertis ¶
func (*BgpWorker) DelNeighbor ¶
func (w *BgpWorker) DelNeighbor(data schema.BgpNeighbor)
func (*BgpWorker) DelReceives ¶
func (*BgpWorker) Initialize ¶
func (w *BgpWorker) Initialize()
type CeciWorker ¶
type CeciWorker struct {
*WorkerImpl
// contains filtered or unexported fields
}
func NewCeciWorker ¶
func NewCeciWorker(c *co.Network) *CeciWorker
func (*CeciWorker) AddTcp ¶
func (w *CeciWorker) AddTcp(data schema.CeciTcp)
func (*CeciWorker) DelTcp ¶
func (w *CeciWorker) DelTcp(data schema.CeciTcp)
func (*CeciWorker) Initialize ¶
func (w *CeciWorker) Initialize()
func (*CeciWorker) Reload ¶
func (w *CeciWorker) Reload(v api.SwitchApi)
func (*CeciWorker) Start ¶
func (w *CeciWorker) Start(v api.SwitchApi)
func (*CeciWorker) Stop ¶
func (w *CeciWorker) Stop()
type Dhcp ¶
type Dhcp struct {
// contains filtered or unexported fields
}
func (*Dhcp) Initialize ¶
func (d *Dhcp) Initialize()
type FindHopDriver ¶
type FindHopImpl ¶
type FindHopImpl struct {
Network string
// contains filtered or unexported fields
}
func (*FindHopImpl) Config ¶
func (c *FindHopImpl) Config() *co.FindHop
func (*FindHopImpl) HasRoute ¶
func (c *FindHopImpl) HasRoute() bool
func (*FindHopImpl) LoadRoute ¶
func (c *FindHopImpl) LoadRoute(nlr *nl.Route)
func (*FindHopImpl) Name ¶
func (c *FindHopImpl) Name() string
func (*FindHopImpl) ReloadRoute ¶
func (c *FindHopImpl) ReloadRoute()
func (*FindHopImpl) Start ¶
func (c *FindHopImpl) Start()
func (*FindHopImpl) Stop ¶
func (c *FindHopImpl) Stop()
func (*FindHopImpl) UnloadRoute ¶
func (c *FindHopImpl) UnloadRoute(rt *nl.Route)
func (*FindHopImpl) UpdateAvailable ¶
func (c *FindHopImpl) UpdateAvailable(mp []co.MultiPath) bool
type Hook ¶
type Hook func(client libol.SocketClient, frame *libol.FrameMessage) error
type Http ¶
type Http struct {
// contains filtered or unexported fields
}
func (*Http) Initialize ¶
func (h *Http) Initialize()
func (*Http) LoadRouter ¶
func (h *Http) LoadRouter()
func (*Http) ParseFiles ¶
func (h *Http) ParseFiles(w http.ResponseWriter, name string, data interface{}) error
type IPSecWorker ¶
type IPSecWorker struct {
*WorkerImpl
// contains filtered or unexported fields
}
func NewIPSecWorker ¶
func NewIPSecWorker(c *co.Network) *IPSecWorker
func (*IPSecWorker) AddTunnel ¶
func (w *IPSecWorker) AddTunnel(data schema.IPSecTunnel)
func (*IPSecWorker) DelTunnel ¶
func (w *IPSecWorker) DelTunnel(data schema.IPSecTunnel)
func (*IPSecWorker) Initialize ¶
func (w *IPSecWorker) Initialize()
func (*IPSecWorker) ListTunnels ¶
func (w *IPSecWorker) ListTunnels(call func(obj schema.IPSecTunnel))
func (*IPSecWorker) Reload ¶
func (w *IPSecWorker) Reload(v api.SwitchApi)
func (*IPSecWorker) Start ¶
func (w *IPSecWorker) Start(v api.SwitchApi)
func (*IPSecWorker) StartTunnel ¶
func (w *IPSecWorker) StartTunnel(data schema.IPSecTunnel)
func (*IPSecWorker) Stop ¶
func (w *IPSecWorker) Stop()
func (*IPSecWorker) UpdateState ¶
func (w *IPSecWorker) UpdateState()
type Link ¶
type Link struct {
// contains filtered or unexported fields
}
func (*Link) Initialize ¶
func (l *Link) Initialize()
func (*Link) StatusFile ¶
type OpenLANWorker ¶
type OpenLANWorker struct {
*WorkerImpl
// contains filtered or unexported fields
}
func NewOpenLANWorker ¶
func NewOpenLANWorker(c *co.Network) *OpenLANWorker
func (*OpenLANWorker) Initialize ¶
func (w *OpenLANWorker) Initialize()
func (*OpenLANWorker) Reload ¶
func (w *OpenLANWorker) Reload(v api.SwitchApi)
func (*OpenLANWorker) Start ¶
func (w *OpenLANWorker) Start(v api.SwitchApi)
func (*OpenLANWorker) Stop ¶
func (w *OpenLANWorker) Stop()
func (*OpenLANWorker) UpBridge ¶
func (w *OpenLANWorker) UpBridge(cfg *co.Bridge)
func (*OpenLANWorker) UpTime ¶
func (w *OpenLANWorker) UpTime() int64
type OpenVPN ¶
type OpenVPN struct {
Cfg *co.OpenVPN
Protocol string
Local string
Port string
// contains filtered or unexported fields
}
func NewOpenVPN ¶
func (*OpenVPN) FileClient ¶
func (*OpenVPN) FileClientProfile ¶
func (*OpenVPN) Initialize ¶
func (o *OpenVPN) Initialize()
func (*OpenVPN) KillClient ¶
func (*OpenVPN) ListClients ¶
type OpenVPNData ¶
type OpenVPNData struct {
Local string
Port string
CertNot bool
Ca string
Cert string
Key string
DhPem string
TlsAuth string
Cipher string
Server string
Device string
Protocol string
Script string
Routes []string
Renego int
Stats string
IpIp string
Push []string
ClientDir string
ServerDir string
}
func NewOpenVPNDataFromConf ¶
func NewOpenVPNDataFromConf(obj *OpenVPN) *OpenVPNData
type OpenVPNProfile ¶
type OpenVPNProfile struct {
Server string
Port string
Ca string
Cert string
Key string
TlsAuth string
Cipher string
Device string
Protocol string
Renego int
}
func NewOpenVPNProfileFromConf ¶
func NewOpenVPNProfileFromConf(obj *OpenVPN) *OpenVPNProfile
type PingDriver ¶
type PingDriver struct {
*FindHopImpl
CfgName string
Running bool
PingParams *co.PingParams
}
func NewPingDriver ¶
func NewPingDriver(name string, network string, cfg *co.FindHop) *PingDriver
func (*PingDriver) Check ¶
func (pc *PingDriver) Check(ipList []string) []co.MultiPath
check the ipList and return the available NextHops
func (*PingDriver) Name ¶
func (pc *PingDriver) Name() string
func (*PingDriver) Start ¶
func (pc *PingDriver) Start()
func (*PingDriver) Stop ¶
func (pc *PingDriver) Stop()
type PingResult ¶
type QosCtrl ¶
type QosCtrl struct {
Name string
Rules map[string]*QosUser
// contains filtered or unexported fields
}
func NewQosCtrl ¶
func (*QosCtrl) AddOrUpdateQos ¶
func (*QosCtrl) ClientUpdate ¶
func (q *QosCtrl) ClientUpdate()
func (*QosCtrl) DelUserRule ¶
func (*QosCtrl) Initialize ¶
func (q *QosCtrl) Initialize()
type QosUser ¶
type QosUser struct {
QosChainName string
InSpeed float64 // Mbit
Name string
Ip string
Device string
// contains filtered or unexported fields
}
func (*QosUser) BuildChainIn ¶
func (qr *QosUser) BuildChainIn(chain *cn.FireWallChain)
func (*QosUser) BuildChainInJump ¶
func (qr *QosUser) BuildChainInJump(chain *cn.FireWallChain)
func (*QosUser) Clear ¶
func (qr *QosUser) Clear(chainIn *cn.FireWallChain)
func (*QosUser) ClearChainIn ¶
func (qr *QosUser) ClearChainIn(chain *cn.FireWallChain)
func (*QosUser) ClearChainInJump ¶
func (qr *QosUser) ClearChainInJump(chain *cn.FireWallChain)
func (*QosUser) InLimitPacket ¶
func (*QosUser) InLimitRule ¶
func (*QosUser) InLimitStr ¶
func (*QosUser) ReBuild ¶
func (qr *QosUser) ReBuild(chainIn *cn.FireWallChain)
func (*QosUser) Start ¶
func (qr *QosUser) Start(chainIn *cn.FireWallChain)
type RouterWorker ¶
type RouterWorker struct {
*WorkerImpl
// contains filtered or unexported fields
}
func NewRouterWorker ¶
func NewRouterWorker(c *co.Network) *RouterWorker
func (*RouterWorker) AddInterface ¶
func (w *RouterWorker) AddInterface(data schema.RouterInterface) error
func (*RouterWorker) AddPrivate ¶
func (w *RouterWorker) AddPrivate(data string) error
func (*RouterWorker) AddRedirect ¶
func (w *RouterWorker) AddRedirect(value schema.RedirectRoute)
func (*RouterWorker) AddTunnel ¶
func (w *RouterWorker) AddTunnel(data schema.RouterTunnel) error
func (*RouterWorker) DelInterface ¶
func (w *RouterWorker) DelInterface(data schema.RouterInterface) error
func (*RouterWorker) DelPrivate ¶
func (w *RouterWorker) DelPrivate(data string) error
func (*RouterWorker) DelRedirect ¶
func (w *RouterWorker) DelRedirect(value schema.RedirectRoute)
func (*RouterWorker) DelTunnel ¶
func (w *RouterWorker) DelTunnel(data schema.RouterTunnel) error
func (*RouterWorker) Forward ¶
func (w *RouterWorker) Forward()
func (*RouterWorker) Initialize ¶
func (w *RouterWorker) Initialize()
func (*RouterWorker) Reload ¶
func (w *RouterWorker) Reload(v api.SwitchApi)
func (*RouterWorker) Start ¶
func (w *RouterWorker) Start(v api.SwitchApi)
func (*RouterWorker) Stop ¶
func (w *RouterWorker) Stop()
type Switch ¶
type Switch struct {
// contains filtered or unexported fields
}
func (*Switch) AddNetwork ¶
func (*Switch) DelNetwork ¶
func (*Switch) GetCert ¶
func (v *Switch) GetCert() (ce schema.VersionCert)
func (*Switch) Initialize ¶
func (v *Switch) Initialize()
func (*Switch) OffClient ¶
func (v *Switch) OffClient(client libol.SocketClient)
func (*Switch) ReadClient ¶
func (v *Switch) ReadClient(client libol.SocketClient, frame *libol.FrameMessage) error
func (*Switch) SaveNetwork ¶
func (*Switch) Server ¶
func (v *Switch) Server() libol.SocketServer
func (*Switch) UpdateCert ¶
func (v *Switch) UpdateCert(data schema.VersionCert)
type WorkerImpl ¶
type WorkerImpl struct {
// contains filtered or unexported fields
}
func NewWorkerApi ¶
func NewWorkerApi(c *co.Network) *WorkerImpl
func (*WorkerImpl) ACLer ¶
func (w *WorkerImpl) ACLer() api.ACLApi
func (*WorkerImpl) AddAddress ¶
func (w *WorkerImpl) AddAddress(value string)
func (*WorkerImpl) AddOutput ¶
func (w *WorkerImpl) AddOutput(data schema.Output)
func (*WorkerImpl) AddPhysical ¶
func (w *WorkerImpl) AddPhysical(bridge string, output string)
func (*WorkerImpl) AddRoute ¶
func (w *WorkerImpl) AddRoute(route *schema.PrefixRoute, v api.SwitchApi) error
func (*WorkerImpl) AddVPNClient ¶
func (w *WorkerImpl) AddVPNClient(name, address string) error
func (*WorkerImpl) Bridger ¶
func (w *WorkerImpl) Bridger() cn.Bridger
func (*WorkerImpl) Config ¶
func (w *WorkerImpl) Config() *co.Network
func (*WorkerImpl) DelAddress ¶
func (w *WorkerImpl) DelAddress()
func (*WorkerImpl) DelOutput ¶
func (w *WorkerImpl) DelOutput(data schema.Output)
func (*WorkerImpl) DelPhysical ¶
func (w *WorkerImpl) DelPhysical(bridge string, output string)
func (*WorkerImpl) DelRoute ¶
func (w *WorkerImpl) DelRoute(route *schema.PrefixRoute, v api.SwitchApi) error
func (*WorkerImpl) DelVPN ¶
func (w *WorkerImpl) DelVPN()
func (*WorkerImpl) DelVPNClient ¶
func (w *WorkerImpl) DelVPNClient(name string) error
func (*WorkerImpl) DisableZTrust ¶
func (w *WorkerImpl) DisableZTrust()
func (*WorkerImpl) EnableZTrust ¶
func (w *WorkerImpl) EnableZTrust()
func (*WorkerImpl) FindHoper ¶
func (w *WorkerImpl) FindHoper() api.FindHopApi
func (*WorkerImpl) ID ¶
func (w *WorkerImpl) ID() string
func (*WorkerImpl) IfAddr ¶
func (w *WorkerImpl) IfAddr() string
func (*WorkerImpl) Initialize ¶
func (w *WorkerImpl) Initialize()
func (*WorkerImpl) KillVPNClient ¶
func (w *WorkerImpl) KillVPNClient(name string) error
func (*WorkerImpl) ListClients ¶
func (w *WorkerImpl) ListClients(call func(name, local string))
func (*WorkerImpl) ListDnat ¶
func (w *WorkerImpl) ListDnat(call func(data schema.DNAT))
func (*WorkerImpl) ListRoute ¶
func (w *WorkerImpl) ListRoute(call func(obj schema.PrefixRoute))
func (*WorkerImpl) Provider ¶
func (w *WorkerImpl) Provider() string
func (*WorkerImpl) Qoser ¶
func (w *WorkerImpl) Qoser() api.QosApi
func (*WorkerImpl) Reload ¶
func (w *WorkerImpl) Reload(v api.SwitchApi)
func (*WorkerImpl) Router ¶
func (w *WorkerImpl) Router() api.RouteApi
func (*WorkerImpl) SaveOutput ¶
func (w *WorkerImpl) SaveOutput()
func (*WorkerImpl) SaveRoute ¶
func (w *WorkerImpl) SaveRoute()
func (*WorkerImpl) SetMss ¶
func (w *WorkerImpl) SetMss(mss int)
func (*WorkerImpl) SetSnat ¶
func (w *WorkerImpl) SetSnat(value string)
func (*WorkerImpl) Start ¶
func (w *WorkerImpl) Start(v api.SwitchApi)
func (*WorkerImpl) StartVPN ¶
func (w *WorkerImpl) StartVPN()
func (*WorkerImpl) Stop ¶
func (w *WorkerImpl) Stop()
func (*WorkerImpl) String ¶
func (w *WorkerImpl) String() string
func (*WorkerImpl) Subnet ¶
func (w *WorkerImpl) Subnet() *net.IPNet
func (*WorkerImpl) ZTruster ¶
func (w *WorkerImpl) ZTruster() api.ZTrustApi
Click to show internal directories.
Click to hide internal directories.