Documentation ¶
Index ¶
- Constants
- func ReadPacket(r io.Reader, payload []byte) (net.Addr, int, int, error)
- func WritePacket(w io.Writer, socks5Addr, payload []byte) (int, error)
- type Command
- type Option
- type PacketConn
- type Trojan
- func (t *Trojan) PacketConn(conn net.Conn) net.PacketConn
- func (t *Trojan) PresetXTLSConn(conn net.Conn) (net.Conn, error)
- func (t *Trojan) StreamConn(conn net.Conn) (net.Conn, error)
- func (t *Trojan) StreamWebsocketConn(conn net.Conn, wsOptions *WebsocketOption) (net.Conn, error)
- func (t *Trojan) WriteHeader(w io.Writer, command Command, socks5Addr []byte) error
- type WebsocketOption
Constants ¶
View Source
const ( CommandTCP byte = 1 CommandUDP byte = 3 )
Variables ¶
This section is empty.
Functions ¶
Types ¶
type PacketConn ¶
type Trojan ¶
type Trojan struct {
// contains filtered or unexported fields
}
func (*Trojan) PacketConn ¶
func (t *Trojan) PacketConn(conn net.Conn) net.PacketConn
func (*Trojan) StreamWebsocketConn ¶
Click to show internal directories.
Click to hide internal directories.