Documentation
¶
Index ¶
- Constants
- func HalfClose(conn net.Conn) error
- func NewAES128GCM(psk []byte) shadowaead.Cipher
- func NewChacha20Poly1305(psk []byte) shadowaead.Cipher
- func PacketConn(conn net.Conn) net.PacketConn
- func ReadPacket(r io.Reader, payload []byte) (net.Addr, int, error)
- func UdpRequestHeaderLength(socks5Addr []byte) int
- func WriteHeader(conn net.Conn, host string, port uint, version int) error
- func WriteHeaderWithReuse(conn net.Conn, host string, port uint, version int, reuse bool) error
- func WritePacket(w io.Writer, socks5Addr, payload []byte) (int, error)
- func WritePacketResponse(w io.Writer, addr net.Addr, payload []byte) (int, error)
- func WriteUDPHeader(conn net.Conn, version int) error
- type Pool
- type PoolConn
- type Snell
- type UDPRequest
Constants ¶
View Source
const ( Version1 = 1 Version2 = 2 Version3 = 3 Version4 = 4 Version5 = 5 DefaultSnellVersion = Version1 )
Variables ¶
This section is empty.
Functions ¶
func NewAES128GCM ¶
func NewAES128GCM(psk []byte) shadowaead.Cipher
func NewChacha20Poly1305 ¶
func NewChacha20Poly1305(psk []byte) shadowaead.Cipher
func PacketConn ¶
func PacketConn(conn net.Conn) net.PacketConn
func UdpRequestHeaderLength ¶ added in v1.19.26
func WriteHeaderWithReuse ¶ added in v1.19.26
func WritePacketResponse ¶ added in v1.19.26
Types ¶
type PoolConn ¶
type PoolConn struct {
*Snell
// contains filtered or unexported fields
}
func (*PoolConn) CloseWrite ¶ added in v1.19.26
func (*PoolConn) MarkReusable ¶ added in v1.19.28
func (pc *PoolConn) MarkReusable()
MarkReusable allows Close to return this request to the pool after the request header is committed.
type Snell ¶
func ServerStreamConn ¶ added in v1.19.26
type UDPRequest ¶ added in v1.19.26
func ParseUDPRequest ¶ added in v1.19.26
func ParseUDPRequest(packet []byte) (UDPRequest, error)
Click to show internal directories.
Click to hide internal directories.