Documentation
¶
Index ¶
- Constants
- func DecodeUint32(uintByte []byte) uint32
- func DialTrojan(config *client.Config, metadata *Metadata) (outbound net.Conn, err error)
- func EncodeUint32(i uint32) []byte
- func PeekTrojan(bufr *bufio.Reader, conn net.Conn) (bool, error)
- func ReadByte(r io.Reader) (byte, error)
- func ReadUint32(r io.Reader) (uint32, error)
- type Address
- type AddressType
- type Codec
- type Metadata
- type PeekReader
- type Socks5
- type Trojan
Constants ¶
View Source
const ( Socks5Version = byte(0x05) NoAuth = byte(0x00) )
socks5 const
View Source
const (
SuccessReply uint8 = iota
)
send reply byte
Variables ¶
This section is empty.
Functions ¶
func DecodeUint32 ¶
func DialTrojan ¶
DialTrojan dial trojan remote
func EncodeUint32 ¶
func PeekTrojan ¶
PeekTrojan peek trojan protocol
Types ¶
type Address ¶
func NewAddressFromHostPort ¶
type AddressType ¶
type AddressType byte
const ( IPv4 AddressType = 1 DomainName AddressType = 3 IPv6 AddressType = 4 )
trojan AddressType
type Metadata ¶
type Metadata struct {
*Address
// contains filtered or unexported fields
}
Metadata struct
type PeekReader ¶
Click to show internal directories.
Click to hide internal directories.