trackerconn

package
v1.2.5 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Apr 21, 2023 License: GPL-2.0 Imports: 6 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Conn

type Conn struct {
	N.ExtendedConn
	// contains filtered or unexported fields
}

func New

func New(conn net.Conn, readCounter []*atomic.Int64, writeCounter []*atomic.Int64) *Conn

func (*Conn) Read

func (c *Conn) Read(p []byte) (n int, err error)

func (*Conn) ReadBuffer

func (c *Conn) ReadBuffer(buffer *buf.Buffer) error

func (*Conn) Upstream

func (c *Conn) Upstream() any

func (*Conn) Write

func (c *Conn) Write(p []byte) (n int, err error)

func (*Conn) WriteBuffer

func (c *Conn) WriteBuffer(buffer *buf.Buffer) error

type HookConn

type HookConn struct {
	N.ExtendedConn
	// contains filtered or unexported fields
}

func NewHook

func NewHook(conn net.Conn, readCounter func(n int64), writeCounter func(n int64)) *HookConn

func (*HookConn) Read

func (c *HookConn) Read(p []byte) (n int, err error)

func (*HookConn) ReadBuffer

func (c *HookConn) ReadBuffer(buffer *buf.Buffer) error

func (*HookConn) Upstream

func (c *HookConn) Upstream() any

func (*HookConn) Write

func (c *HookConn) Write(p []byte) (n int, err error)

func (*HookConn) WriteBuffer

func (c *HookConn) WriteBuffer(buffer *buf.Buffer) error

type HookPacketConn

type HookPacketConn struct {
	N.PacketConn
	// contains filtered or unexported fields
}

func NewHookPacket

func NewHookPacket(conn N.PacketConn, readCounter func(n int64), writeCounter func(n int64)) *HookPacketConn

func (*HookPacketConn) ReadPacket

func (c *HookPacketConn) ReadPacket(buffer *buf.Buffer) (destination M.Socksaddr, err error)

func (*HookPacketConn) Upstream

func (c *HookPacketConn) Upstream() any

func (*HookPacketConn) WritePacket

func (c *HookPacketConn) WritePacket(buffer *buf.Buffer, destination M.Socksaddr) error

type PacketConn

type PacketConn struct {
	N.PacketConn
	// contains filtered or unexported fields
}

func NewPacket

func NewPacket(conn N.PacketConn, readCounter []*atomic.Int64, writeCounter []*atomic.Int64) *PacketConn

func (*PacketConn) ReadPacket

func (c *PacketConn) ReadPacket(buffer *buf.Buffer) (destination M.Socksaddr, err error)

func (*PacketConn) Upstream

func (c *PacketConn) Upstream() any

func (*PacketConn) WritePacket

func (c *PacketConn) WritePacket(buffer *buf.Buffer, destination M.Socksaddr) error

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL