Documentation ¶
Index ¶
- Constants
- Variables
- func NewConn(conn net.Conn, ciph Cipher) net.Conn
- func NewDuplexConn(conn net.Conn) *duplexConn
- func NewPacketConn(pc net.PacketConn, ciph Cipher) net.PacketConn
- func Pack(dst, pkt []byte, ciph Cipher) ([]byte, error)
- func ParseUrl(s string) (server, cipher, password string, err error)
- func Unpack(dst, pkt []byte, ciph Cipher) ([]byte, error)
- type Cipher
- type Conn
- type DuplexConn
- type Handler
- type PacketConn
Constants ¶
View Source
const MaxPacketSize = 16384
View Source
const MaxUDPPacketSize = 16384 // Max 65536
Variables ¶
View Source
var ErrShortPacket = errors.New("short packet")
Functions ¶
func NewDuplexConn ¶
func NewPacketConn ¶
func NewPacketConn(pc net.PacketConn, ciph Cipher) net.PacketConn
Types ¶
type Conn ¶
func (*Conn) CloseWrite ¶
type Handler ¶
type Handler struct { Cipher // contains filtered or unexported fields }
func (*Handler) HandlePacket ¶
func (h *Handler) HandlePacket(conn utils.PacketConn) error
Click to show internal directories.
Click to hide internal directories.