Documentation ¶
Index ¶
- Constants
- type Client
- type Config
- type PacketConn
- func (c *PacketConn) Close() error
- func (c *PacketConn) ReadFrom(p []byte) (n int, addr net.Addr, err error)
- func (c *PacketConn) ReadWithMetadata(p []byte) (int, *tunnel.Metadata, error)
- func (c *PacketConn) WriteTo(p []byte, addr net.Addr) (n int, err error)
- func (c *PacketConn) WriteWithMetadata(p []byte, m *tunnel.Metadata) (int, error)
- type RouterConfig
- type Tunnel
Constants ¶
View Source
const ( Block = 0 Bypass = 1 Proxy = 2 )
View Source
const ( AsIs = 0 IPIfNonMatch = 1 IPOnDemand = 2 )
View Source
const MaxPacketSize = 1024 * 8
View Source
const Name = "ROUTER"
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Client ¶
type Client struct {
// contains filtered or unexported fields
}
func (*Client) DialPacket ¶
type Config ¶
type Config struct {
Router RouterConfig `json:"router" yaml:"router"`
}
type PacketConn ¶
type PacketConn struct { net.PacketConn *Client // contains filtered or unexported fields }
func (*PacketConn) Close ¶
func (c *PacketConn) Close() error
func (*PacketConn) ReadWithMetadata ¶
func (*PacketConn) WriteWithMetadata ¶
type RouterConfig ¶
type RouterConfig struct { Enabled bool `json:"enabled" yaml:"enabled"` Bypass []string `json:"bypass" yaml:"bypass"` Proxy []string `json:"proxy" yaml:"proxy"` Block []string `json:"block" yaml:"block"` DomainStrategy string `json:"domain_strategy" yaml:"domain-strategy"` DefaultPolicy string `json:"default_policy" yaml:"default-policy"` GeoIPFilename string `json:"geoip" yaml:"geoip"` GeoSiteFilename string `json:"geosite" yaml:"geosite"` }
Click to show internal directories.
Click to hide internal directories.