Documentation ¶
Index ¶
- Constants
- type APIConfig
- type Client
- type Config
- type InboundConn
- func (c *InboundConn) Auth() error
- func (c *InboundConn) Close() error
- func (c *InboundConn) Epoch() time.Time
- func (c *InboundConn) Metadata() *tunnel.Metadata
- func (c *InboundConn) Name() string
- func (c *InboundConn) Read(p []byte) (int, error)
- func (c *InboundConn) Recv() uint64
- func (c *InboundConn) Sent() uint64
- func (c *InboundConn) Tunnels() *tunnel.Tunnels
- func (c *InboundConn) User() statistic.User
- func (c *InboundConn) Write(p []byte) (int, error)
- type MySQLConfig
- type OutboundConn
- func (c *OutboundConn) Close() error
- func (c *OutboundConn) Epoch() time.Time
- func (c *OutboundConn) Metadata() *tunnel.Metadata
- func (c *OutboundConn) Name() string
- func (c *OutboundConn) Read(p []byte) (int, error)
- func (c *OutboundConn) Recv() uint64
- func (c *OutboundConn) Sent() uint64
- func (c *OutboundConn) Tunnels() *tunnel.Tunnels
- func (c *OutboundConn) User() statistic.User
- func (c *OutboundConn) Write(p []byte) (int, error)
- func (c *OutboundConn) WriteHeader(payload []byte) error
- type PacketConn
- func (c *PacketConn) ReadFrom(payload []byte) (int, net.Addr, error)
- func (c *PacketConn) ReadWithMetadata(payload []byte) (int, *tunnel.Metadata, error)
- func (c *PacketConn) WriteTo(payload []byte, addr net.Addr) (int, error)
- func (c *PacketConn) WriteWithMetadata(payload []byte, metadata *tunnel.Metadata) (int, error)
- type Server
- type Tunnel
Constants ¶
View Source
const ( Connect tunnel.Command = 1 Associate tunnel.Command = 3 Mux tunnel.Command = 0x7f )
View Source
const (
MaxPacketSize = 1024 * 8
)
View Source
const Name = "TROJAN"
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 { 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"` DisableHTTPCheck bool `json:"disable_http_check" yaml:"disable-http-check"` MySQL MySQLConfig `json:"mysql" yaml:"mysql"` API APIConfig `json:"api" yaml:"api"` UserPassThrough bool `json:"user_pass_through yaml:"user-pass-through"` }
type InboundConn ¶
InboundConn is a trojan inbound connection
func (*InboundConn) Auth ¶
func (c *InboundConn) Auth() error
func (*InboundConn) Close ¶
func (c *InboundConn) Close() error
func (*InboundConn) Epoch ¶
func (c *InboundConn) Epoch() time.Time
func (*InboundConn) Metadata ¶
func (c *InboundConn) Metadata() *tunnel.Metadata
func (*InboundConn) Name ¶
func (c *InboundConn) Name() string
func (*InboundConn) Recv ¶
func (c *InboundConn) Recv() uint64
func (*InboundConn) Sent ¶
func (c *InboundConn) Sent() uint64
func (*InboundConn) Tunnels ¶
func (c *InboundConn) Tunnels() *tunnel.Tunnels
func (*InboundConn) User ¶
func (c *InboundConn) User() statistic.User
type MySQLConfig ¶
type MySQLConfig struct {
Enabled bool `json:"enabled" yaml:"enabled"`
}
type OutboundConn ¶
func (*OutboundConn) Close ¶
func (c *OutboundConn) Close() error
func (*OutboundConn) Epoch ¶
func (c *OutboundConn) Epoch() time.Time
func (*OutboundConn) Metadata ¶
func (c *OutboundConn) Metadata() *tunnel.Metadata
func (*OutboundConn) Name ¶
func (c *OutboundConn) Name() string
func (*OutboundConn) Recv ¶
func (c *OutboundConn) Recv() uint64
func (*OutboundConn) Sent ¶
func (c *OutboundConn) Sent() uint64
func (*OutboundConn) Tunnels ¶
func (c *OutboundConn) Tunnels() *tunnel.Tunnels
func (*OutboundConn) User ¶
func (c *OutboundConn) User() statistic.User
func (*OutboundConn) WriteHeader ¶
func (c *OutboundConn) WriteHeader(payload []byte) error
type PacketConn ¶
func (*PacketConn) ReadWithMetadata ¶
func (*PacketConn) WriteWithMetadata ¶
type Server ¶
type Server struct {
// contains filtered or unexported fields
}
Server is a trojan tunnel server
func (*Server) AcceptConn ¶
func (*Server) AcceptPacket ¶
Click to show internal directories.
Click to hide internal directories.