Documentation ¶
Index ¶
- Constants
- type Client
- type Config
- type Conn
- func (c *Conn) Epoch() time.Time
- func (c *Conn) Metadata() *tunnel.Metadata
- func (c *Conn) Name() string
- func (c *Conn) Read(p []byte) (int, error)
- func (c *Conn) Recv() uint64
- func (c *Conn) Sent() uint64
- func (c *Conn) Tunnels() *tunnel.Tunnels
- func (c *Conn) User() statistic.User
- func (c *Conn) Write(p []byte) (int, error)
- type DynamicConfig
- type Server
- type Source
- type SourceConfig
- type SourceRule
- type SourceRuleConfig
- type SourceRules
- type TransportPluginConfig
- type Tunnel
Constants ¶
View Source
const ( AsIs = 0 IPIfNonMatch = 1 IPOnDemand = 2 )
View Source
const Name = "TRANSPORT"
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Client ¶
type Client struct {
// contains filtered or unexported fields
}
Client implements tunnel.Client
func (*Client) DialConn ¶
func (c *Client) DialConn(address *tunnel.Address, user statistic.User, metadata *tunnel.Metadata, _ tunnel.Tunnel) (tunnel.Conn, error)
DialConn implements tunnel.Client. It will ignore the params and directly dial to the remote server
func (*Client) DialPacket ¶
type Config ¶
type Config struct { LocalHost string `json:"local_addr" yaml:"local-addr"` LocalPort int `json:"local_port" yaml:"local-port"` RemoteHost string `json:"remote_addr" yaml:"remote-addr"` RemotePort int `json:"remote_port" yaml:"remote-port"` TransportPlugin TransportPluginConfig `json:"transport_plugin" yaml:"transport-plugin"` }
type DynamicConfig ¶
type DynamicConfig struct {
Source SourceConfig `json: "source"`
}
func (*DynamicConfig) Init ¶
func (dconfig *DynamicConfig) Init() (err error)
func (*DynamicConfig) Priority ¶
func (dconfig *DynamicConfig) Priority() int
type Server ¶
type Server struct {
// contains filtered or unexported fields
}
Server is a server of transport layer
func (*Server) AcceptPacket ¶
type SourceConfig ¶
type SourceConfig struct { Rules []SourceRule `json:"rules" yaml:"rules"` SourceRule Source // contains filtered or unexported fields }
type SourceRule ¶
type SourceRule struct { Name string `json:"name" yaml:"name"` SourceHost string `json:"source_addr" yaml:"source-addr"` SourcePort int `json:"source_port" yaml:"source-port"` SourceRule []SourceRuleConfig `json:"source_rule" yaml:"source-rule"` DomainStrategy string `json:"domain_strategy" yaml:"domain-strategy"` }
type SourceRuleConfig ¶
type SourceRules ¶
type SourceRules struct {
// contains filtered or unexported fields
}
type TransportPluginConfig ¶
Click to show internal directories.
Click to hide internal directories.