Documentation ¶
Index ¶
- Constants
- type APIConfig
- type Client
- type Config
- type InboundConn
- type MySQLConfig
- type OutboundConn
- 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"` }
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) Metadata ¶
func (c *InboundConn) Metadata() *tunnel.Metadata
type MySQLConfig ¶
type MySQLConfig struct {
Enabled bool `json:"enabled" yaml:"enabled"`
}
type OutboundConn ¶
func (*OutboundConn) Close ¶
func (c *OutboundConn) Close() error
func (*OutboundConn) Metadata ¶
func (c *OutboundConn) Metadata() *tunnel.Metadata
func (*OutboundConn) WriteHeader ¶
func (c *OutboundConn) WriteHeader(payload []byte) (bool, 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.