Documentation
¶
Index ¶
- Constants
- Variables
- type AuthData
- type Conn
- type Dialer
- type IProtocol
- type PacketConn
- func (c *PacketConn) InnerCipher() *ciphers.StreamCipher
- func (c *PacketConn) Read(b []byte) (n int, err error)
- func (c *PacketConn) ReadFrom(b []byte) (n int, from netip.AddrPort, err error)
- func (c *PacketConn) Write(b []byte) (n int, err error)
- func (c *PacketConn) WriteTo(b []byte, to string) (n int, err error)
- type ServerInfo
Constants ¶
View Source
const ObfsHMACSHA1Len = 10
Variables ¶
View Source
var ( ErrAuthSHA1v4CRC32Error = errors.New("auth_sha1_v4 post decrypt data crc32 error") ErrAuthSHA1v4DataLengthError = errors.New("auth_sha1_v4 post decrypt data length error") ErrAuthSHA1v4IncorrectChecksum = errors.New("auth_sha1_v4 post decrypt incorrect checksum") ErrAuthAES128IncorrectHMAC = errors.New("auth_aes128_* post decrypt incorrect hmac") ErrAuthAES128DataLengthError = errors.New("auth_aes128_* post decrypt length mismatch") ErrAuthChainDataLengthError = errors.New("auth_chain_* post decrypt length mismatch") ErrAuthChainIncorrectHMAC = errors.New("auth_chain_* post decrypt incorrect hmac") ErrAuthAES128IncorrectChecksum = errors.New("auth_aes128_* post decrypt incorrect checksum") ErrAuthAES128PosOutOfRange = errors.New("auth_aes128_* post decrypt pos out of range") ErrTLS12TicketAuthTooShortData = errors.New("tls1.2_ticket_auth too short data") ErrTLS12TicketAuthHMACError = errors.New("tls1.2_ticket_auth hmac verifying failed") ErrTLS12TicketAuthIncorrectMagicNumber = errors.New("tls1.2_ticket_auth incorrect magic number") )
Functions ¶
This section is empty.
Types ¶
type Dialer ¶
type IProtocol ¶
type IProtocol interface { InitWithServerInfo(s *ServerInfo) Encode(data []byte) ([]byte, error) Decode(data []byte) ([]byte, int, error) EncodePkt(buf *bytes.Buffer) error DecodePkt(data []byte) (pool.Bytes, error) SetData(data interface{}) GetData() interface{} GetOverhead() int }
func NewAuthAES128MD5 ¶
func NewAuthAES128MD5() IProtocol
func NewAuthAES128SHA1 ¶
func NewAuthAES128SHA1() IProtocol
func NewAuthChainA ¶
func NewAuthChainA() IProtocol
func NewAuthChainB ¶
func NewAuthChainB() IProtocol
func NewAuthSHA1v4 ¶
func NewAuthSHA1v4() IProtocol
func NewProtocol ¶
type PacketConn ¶
type PacketConn struct { netproxy.PacketConn Protocol IProtocol // contains filtered or unexported fields }
func NewPacketConn ¶
func NewPacketConn(c netproxy.PacketConn, proto IProtocol, tgt string) (*PacketConn, error)
func (*PacketConn) InnerCipher ¶
func (c *PacketConn) InnerCipher() *ciphers.StreamCipher
Click to show internal directories.
Click to hide internal directories.