Documentation ¶
Index ¶
- Constants
- func NewServer(ctx context.Context, underlay tunnel.Server) (tunnel.Server, error)
- type Config
- type Conn
- func (c *Conn) Epoch() time.Time
- func (c *Conn) Metadata() *tunnel.Metadata
- func (c *Conn) Name() string
- func (c *Conn) Read(p []byte) (int, error)
- func (c *Conn) Recv() uint64
- func (c *Conn) Root() tunnel.Conn
- func (c *Conn) Sent() uint64
- func (c *Conn) Tunnels() *tunnel.Tunnels
- func (c *Conn) User() statistic.User
- func (c *Conn) Write(p []byte) (int, error)
- type PacketConn
- func (c *PacketConn) Close() error
- func (c *PacketConn) Epoch() time.Time
- func (c *PacketConn) Name() string
- func (c *PacketConn) ReadFrom(p []byte) (n int, addr net.Addr, err error)
- func (c *PacketConn) ReadWithMetadata(p []byte) (int, *tunnel.Metadata, error)
- func (c *PacketConn) Recv() uint64
- func (c *PacketConn) Sent() uint64
- func (c *PacketConn) Tunnels() *tunnel.Tunnels
- func (c *PacketConn) User() statistic.User
- func (c *PacketConn) WriteTo(p []byte, addr net.Addr) (n int, err error)
- func (c *PacketConn) WriteWithMetadata(p []byte, m *tunnel.Metadata) (int, error)
- type Server
- type Tunnel
Constants ¶
View Source
const ( Connect tunnel.Command = 1 Associate tunnel.Command = 3 )
View Source
const (
MaxPacketSize = 1024 * 8
)
View Source
const Name = "SOCKS"
Variables ¶
This section is empty.
Functions ¶
Types ¶
type PacketConn ¶
type PacketConn struct { net.PacketConn // contains filtered or unexported fields }
func (*PacketConn) Close ¶
func (c *PacketConn) Close() error
func (*PacketConn) Epoch ¶
func (c *PacketConn) Epoch() time.Time
func (*PacketConn) Name ¶
func (c *PacketConn) Name() string
func (*PacketConn) ReadWithMetadata ¶
func (*PacketConn) Recv ¶
func (c *PacketConn) Recv() uint64
func (*PacketConn) Sent ¶
func (c *PacketConn) Sent() uint64
func (*PacketConn) Tunnels ¶
func (c *PacketConn) Tunnels() *tunnel.Tunnels
func (*PacketConn) User ¶
func (c *PacketConn) User() statistic.User
func (*PacketConn) WriteWithMetadata ¶
type Server ¶
type Server struct {
// contains filtered or unexported fields
}
func (*Server) AcceptPacket ¶
Click to show internal directories.
Click to hide internal directories.