Documentation ¶
Index ¶
- Variables
- 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) 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 ¶
This section is empty.
Variables ¶
View Source
var ( CommandTCP byte = 1 CommandUDP byte = 3 )
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 ¶ added in v1.8.0
Click to show internal directories.
Click to hide internal directories.