Documentation ¶
Index ¶
- Variables
- func ClientHandshake4(conn io.ReadWriter, command byte, destination M.Socksaddr, username string) (socks4.Response, error)
- func ClientHandshake5(conn io.ReadWriter, command byte, destination M.Socksaddr, username string, ...) (socks5.Response, error)
- func HandleConnection(ctx context.Context, conn net.Conn, authenticator *auth.Authenticator, ...) errordeprecated
- func HandleConnection0(ctx context.Context, conn net.Conn, reader *std_bufio.Reader, ...) errordeprecated
- func HandleConnectionEx(ctx context.Context, conn net.Conn, reader *std_bufio.Reader, ...) error
- type AssociatePacketConn
- func (c *AssociatePacketConn) Close() error
- func (c *AssociatePacketConn) CreateReadWaiter() (N.PacketReadWaiter, bool)
- func (c *AssociatePacketConn) FrontHeadroom() int
- func (c *AssociatePacketConn) Read(b []byte) (n int, err error)
- func (c *AssociatePacketConn) ReadFrom(p []byte) (n int, addr net.Addr, err error)
- func (c *AssociatePacketConn) ReadPacket(buffer *buf.Buffer) (destination M.Socksaddr, err error)
- func (c *AssociatePacketConn) RemoteAddr() net.Addr
- func (c *AssociatePacketConn) Upstream() any
- func (c *AssociatePacketConn) Write(b []byte) (n int, err error)
- func (c *AssociatePacketConn) WritePacket(buffer *buf.Buffer, destination M.Socksaddr) error
- func (c *AssociatePacketConn) WriteTo(p []byte, addr net.Addr) (n int, err error)
- type AssociatePacketReadWaiter
- type Client
- type Handlerdeprecated
- type HandlerEx
- type LazyAssociatePacketConn
- func (c *LazyAssociatePacketConn) HandshakeFailure(err error) error
- func (c *LazyAssociatePacketConn) HandshakeSuccess() error
- func (c *LazyAssociatePacketConn) Read(p []byte) (n int, err error)
- func (c *LazyAssociatePacketConn) ReadFrom(p []byte) (n int, addr net.Addr, err error)
- func (c *LazyAssociatePacketConn) ReadPacket(buffer *buf.Buffer) (destination M.Socksaddr, err error)
- func (c *LazyAssociatePacketConn) ReaderReplaceable() bool
- func (c *LazyAssociatePacketConn) Upstream() any
- func (c *LazyAssociatePacketConn) Write(p []byte) (n int, err error)
- func (c *LazyAssociatePacketConn) WritePacket(buffer *buf.Buffer, destination M.Socksaddr) error
- func (c *LazyAssociatePacketConn) WriteTo(p []byte, addr net.Addr) (n int, err error)
- func (c *LazyAssociatePacketConn) WriterReplaceable() bool
- type LazyConn
- func (c *LazyConn) ConnHandshakeSuccess(conn net.Conn) error
- func (c *LazyConn) HandshakeFailure(err error) error
- func (c *LazyConn) Read(p []byte) (n int, err error)
- func (c *LazyConn) ReaderReplaceable() bool
- func (c *LazyConn) Upstream() any
- func (c *LazyConn) Write(p []byte) (n int, err error)
- func (c *LazyConn) WriterReplaceable() bool
- type VectorisedAssociatePacketConn
- type Version
Constants ¶
This section is empty.
Variables ¶
View Source
var ErrInvalidPacket = E.New("socks5: invalid packet")
Functions ¶
func ClientHandshake4 ¶
func ClientHandshake5 ¶
Types ¶
type AssociatePacketConn ¶
type AssociatePacketConn struct { N.AbstractConn // contains filtered or unexported fields }
func NewAssociatePacketConn ¶
func (*AssociatePacketConn) Close ¶
func (c *AssociatePacketConn) Close() error
func (*AssociatePacketConn) CreateReadWaiter ¶ added in v0.3.0
func (c *AssociatePacketConn) CreateReadWaiter() (N.PacketReadWaiter, bool)
func (*AssociatePacketConn) FrontHeadroom ¶
func (c *AssociatePacketConn) FrontHeadroom() int
func (*AssociatePacketConn) ReadPacket ¶
func (*AssociatePacketConn) RemoteAddr ¶
func (c *AssociatePacketConn) RemoteAddr() net.Addr
func (*AssociatePacketConn) Upstream ¶
func (c *AssociatePacketConn) Upstream() any
func (*AssociatePacketConn) Write ¶
func (c *AssociatePacketConn) Write(b []byte) (n int, err error)
func (*AssociatePacketConn) WritePacket ¶
type AssociatePacketReadWaiter ¶ added in v0.3.0
type AssociatePacketReadWaiter struct {
// contains filtered or unexported fields
}
func (*AssociatePacketReadWaiter) InitializeReadWaiter ¶ added in v0.3.0
func (w *AssociatePacketReadWaiter) InitializeReadWaiter(options N.ReadWaitOptions) (needCopy bool)
func (*AssociatePacketReadWaiter) WaitReadPacket ¶ added in v0.3.0
type Client ¶
type Client struct {
// contains filtered or unexported fields
}
func (*Client) BindContext ¶
func (*Client) DialContext ¶
func (*Client) ListenPacket ¶
type Handler
deprecated
type Handler interface { N.TCPConnectionHandler N.UDPConnectionHandler }
Deprecated: Use HandlerEx instead.
type HandlerEx ¶
type HandlerEx interface { N.TCPConnectionHandlerEx N.UDPConnectionHandlerEx }
type LazyAssociatePacketConn ¶
type LazyAssociatePacketConn struct { AssociatePacketConn // contains filtered or unexported fields }
func (*LazyAssociatePacketConn) HandshakeFailure ¶
func (c *LazyAssociatePacketConn) HandshakeFailure(err error) error
func (*LazyAssociatePacketConn) HandshakeSuccess ¶
func (c *LazyAssociatePacketConn) HandshakeSuccess() error
func (*LazyAssociatePacketConn) Read ¶
func (c *LazyAssociatePacketConn) Read(p []byte) (n int, err error)
func (*LazyAssociatePacketConn) ReadPacket ¶
func (*LazyAssociatePacketConn) ReaderReplaceable ¶
func (c *LazyAssociatePacketConn) ReaderReplaceable() bool
func (*LazyAssociatePacketConn) Upstream ¶
func (c *LazyAssociatePacketConn) Upstream() any
func (*LazyAssociatePacketConn) Write ¶
func (c *LazyAssociatePacketConn) Write(p []byte) (n int, err error)
func (*LazyAssociatePacketConn) WritePacket ¶
func (*LazyAssociatePacketConn) WriterReplaceable ¶
func (c *LazyAssociatePacketConn) WriterReplaceable() bool
type LazyConn ¶
func (*LazyConn) ConnHandshakeSuccess ¶
func (*LazyConn) HandshakeFailure ¶
func (*LazyConn) ReaderReplaceable ¶
func (*LazyConn) WriterReplaceable ¶
type VectorisedAssociatePacketConn ¶
type VectorisedAssociatePacketConn struct { AssociatePacketConn N.VectorisedPacketWriter }
func NewVectorisedAssociateConn ¶
func NewVectorisedAssociateConn(conn net.Conn, writer N.VectorisedWriter, remoteAddr M.Socksaddr, underlying net.Conn) *VectorisedAssociatePacketConn
func (*VectorisedAssociatePacketConn) FrontHeadroom ¶
func (c *VectorisedAssociatePacketConn) FrontHeadroom() int
func (*VectorisedAssociatePacketConn) WriteVectorisedPacket ¶
Source Files ¶
Click to show internal directories.
Click to hide internal directories.