Documentation
¶
Index ¶
- func Copy(dst, src net.Conn)
- func GetPublicIP() string
- func Main()
- type Config
- type DHCP
- type DHCPConfig
- type Forward
- func (forward *Forward) Add(cip string, conn net.Conn)
- func (forward *Forward) Broadcast(sndqueue chan *GtunClientContext, buff []byte)
- func (forward *Forward) Del(cip string)
- func (forward *Forward) Get(cip string) (conn net.Conn)
- func (forward *Forward) Peer(sndqueue chan *GtunClientContext, dst string, buff []byte) error
- type Frame
- type GtunClientContext
- type Interface
- type InterfaceConfig
- type Packet
- type Registry
- type RegistryConfig
- type Reverse
- type ReverseConfig
- type ReversePolicy
- type Server
- type ServerConfig
- type Service
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func GetPublicIP ¶
func GetPublicIP() string
Types ¶
type Config ¶
type Config struct { Name string `toml:"name"` ServerConfig *ServerConfig `toml:"server"` DHCPConfig *DHCPConfig `toml:"dhcp"` InterfaceConfig *InterfaceConfig `toml:"interface"` RegistryConfig *RegistryConfig `toml:"registry"` ReverseConfig *ReverseConfig `toml:"reverse"` }
func ParseConfig ¶
type DHCPConfig ¶
type Forward ¶
type Forward struct {
// contains filtered or unexported fields
}
func NewForward ¶
func NewForward() *Forward
func (*Forward) Broadcast ¶
func (forward *Forward) Broadcast(sndqueue chan *GtunClientContext, buff []byte)
type GtunClientContext ¶
type GtunClientContext struct {
// contains filtered or unexported fields
}
type Interface ¶
func NewInterface ¶
func NewInterface(cfg *InterfaceConfig, ip, cidr string) (*Interface, error)
type InterfaceConfig ¶
type InterfaceConfig struct {
IsTap bool `toml:"istap"`
}
type Registry ¶
type Registry struct {
// contains filtered or unexported fields
}
func NewRegistry ¶
func NewRegistry(cfg *RegistryConfig, service *Service) *Registry
type RegistryConfig ¶
type Reverse ¶
type Reverse struct {
// contains filtered or unexported fields
}
func NewReverse ¶
func NewReverse(cfg *ReverseConfig) *Reverse
func (*Reverse) LoadPolicy ¶
func (r *Reverse) LoadPolicy(path string) ([]*ReversePolicy, error)
type ReverseConfig ¶
type ReverseConfig struct {
Rule string `toml:"rule"`
}
type ReversePolicy ¶
type ServerConfig ¶
Click to show internal directories.
Click to hide internal directories.