Documentation ¶
Index ¶
- Constants
- func ReadPacket(r io.Reader, payload []byte) (addr *net.UDPAddr, n int, remain int, err error)
- func WritePacket(w io.Writer, socks5Addr, payload []byte) (n int, err error)
- type Command
- type HTTPOptions
- type Option
- type PacketConn
- type Trojan
- func (t *Trojan) PacketConn(conn net.Conn) net.PacketConn
- func (t *Trojan) StreamConn(conn net.Conn) (net.Conn, error)
- func (t *Trojan) StreamH2Conn(conn net.Conn, h2Option *HTTPOptions) (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 ¶
func ReadPacket ¶
Types ¶
type HTTPOptions ¶
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) StreamH2Conn ¶
func (*Trojan) StreamWebsocketConn ¶
Click to show internal directories.
Click to hide internal directories.