Documentation ¶
Index ¶
- Constants
- Variables
- func ClientHandshake(conn net.Conn, key [KeyLength]byte, destination M.Socksaddr, payload []byte) error
- func ClientHandshakeBuffer(conn net.Conn, key [KeyLength]byte, destination M.Socksaddr, ...) error
- func ClientHandshakePacket(conn net.Conn, key [KeyLength]byte, destination M.Socksaddr, ...) error
- func ClientHandshakeRaw(conn net.Conn, key [KeyLength]byte, command byte, destination M.Socksaddr, ...) error
- func Key(password string) [KeyLength]byte
- func ReadPacket(conn net.Conn, buffer *buf.Buffer) (M.Socksaddr, error)
- func WritePacket(conn net.Conn, buffer *buf.Buffer, destination M.Socksaddr) error
- type ClientConn
- type ClientPacketConn
- func (c *ClientPacketConn) ReadFrom(p []byte) (n int, addr net.Addr, err error)
- func (c *ClientPacketConn) ReadPacket(buffer *buf.Buffer) (M.Socksaddr, error)
- func (c *ClientPacketConn) WritePacket(buffer *buf.Buffer, destination M.Socksaddr) error
- func (c *ClientPacketConn) WriteTo(p []byte, addr net.Addr) (n int, err error)
- type Error
- type Handler
- type PacketConn
- type Service
Constants ¶
View Source
const ( KeyLength = 56 CommandTCP = 1 CommandUDP = 3 )
Variables ¶
View Source
var CRLF = []byte{'\r', '\n'}
View Source
var ErrUserExists = E.New("user already exists")
Functions ¶
func ClientHandshake ¶
func ClientHandshakeBuffer ¶
func ClientHandshakePacket ¶
func ClientHandshakeRaw ¶
Types ¶
type ClientConn ¶
func NewClientConn ¶
func (*ClientConn) WriteBuffer ¶
func (c *ClientConn) WriteBuffer(buffer *buf.Buffer) error
type ClientPacketConn ¶
func NewClientPacketConn ¶
func NewClientPacketConn(conn net.Conn, key [KeyLength]byte) *ClientPacketConn
func (*ClientPacketConn) ReadPacket ¶
func (*ClientPacketConn) WritePacket ¶
type Handler ¶
type Handler interface { N.TCPConnectionHandler N.UDPConnectionHandler }
type Service ¶
type Service[K comparable] struct { // contains filtered or unexported fields }
func NewService ¶
func NewService[K comparable](handler Handler) Service[K]
func (*Service[K]) NewConnection ¶
func (*Service[K]) RemoveUser ¶
func (*Service[K]) ResetUsers ¶
func (s *Service[K]) ResetUsers()
Click to show internal directories.
Click to hide internal directories.