Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type ClientConfig ¶
type ClientConfig struct { UtunPeer string `json:"utun_peer"` UtunAddr string `json:"utun_vaddr"` Sudp *sudp.ClientConfig `json:"sudp"` }
func LoadClientConfig ¶
func LoadClientConfig(filePath string) (*ClientConfig, error)
func (*ClientConfig) DumpClientConfig ¶
func (c *ClientConfig) DumpClientConfig(filePath string) error
type RouteTable ¶
type RouteTable struct {
// contains filtered or unexported fields
}
func NewRouteTable ¶
func NewRouteTable() *RouteTable
func (*RouteTable) GetDestination ¶
func (r *RouteTable) GetDestination(ip net.IP) (uint16, bool)
func (*RouteTable) SetDestination ¶
func (r *RouteTable) SetDestination(ip net.IP, vaddr uint16)
type ServerConfig ¶
type ServerConfig struct { UtunAddr string `json:"utun_vaddr"` Mappings map[string]int `json:"mappings"` Sudp *sudp.ServerConfig `json:"sudp"` }
func LoadServerConfig ¶
func LoadServerConfig(filePath string) (*ServerConfig, error)
func NewServerConfig ¶
func (*ServerConfig) AddPeer ¶
func (s *ServerConfig) AddPeer() (*ClientConfig, error)
func (*ServerConfig) DumpServerConfig ¶
func (c *ServerConfig) DumpServerConfig(filePath string) error
type VnetClient ¶
func NewVnetClient ¶
func NewVnetClient(cird string, peer string, cfg *sudp.ClientConfig, peergw bool) (*VnetClient, error)
func (*VnetClient) Display ¶
func (c *VnetClient) Display()
func (*VnetClient) Run ¶
func (c *VnetClient) Run() error
type VnetSwitch ¶
func NewVnetSwitch ¶
func NewVnetSwitch(cird string, peer string, cfg *sudp.ServerConfig) (*VnetSwitch, error)
func (*VnetSwitch) Run ¶
func (v *VnetSwitch) Run() error
Click to show internal directories.
Click to hide internal directories.