Documentation ¶
Index ¶
- func Copy(destination io.Writer, source io.Reader) (n int64, err error)
- func CopyConn(ctx context.Context, source net.Conn, destination net.Conn) error
- func CopyConnContextList(contextList []context.Context, source net.Conn, destination net.Conn) error
- func CopyExtended(originSource io.Reader, destination N.ExtendedWriter, source N.ExtendedReader, ...) (n int64, err error)
- func CopyExtendedBuffer(originSource io.Writer, destination N.ExtendedWriter, source N.ExtendedReader, ...) (n int64, err error)
- func CopyExtendedWithPool(originSource io.Reader, destination N.ExtendedWriter, source N.ExtendedReader, ...) (n int64, err error)
- func CopyPacket(destinationConn N.PacketWriter, source N.PacketReader) (n int64, err error)
- func CopyPacketConn(ctx context.Context, source N.PacketConn, destination N.PacketConn) error
- func CopyPacketConnContextList(contextList []context.Context, source N.PacketConn, destination N.PacketConn) error
- func CopyPacketWithPool(originSource N.PacketReader, destinationConn N.PacketWriter, ...) (n int64, err error)
- func CreatePacketReadWaiter(reader N.PacketReader) (N.PacketReadWaiter, bool)
- func CreateReadWaiter(reader io.Reader) (N.ReadWaiter, bool)
- func CreateVectorisedPacketWriter(writer any) (N.VectorisedPacketWriter, bool)
- func CreateVectorisedWriter(writer any) (N.VectorisedWriter, bool)
- func NewAppendConn(conn N.ExtendedConn, reader N.ExtendedReader, writer N.ExtendedWriter) N.ExtendedConn
- func NewExtendedConn(conn net.Conn) N.ExtendedConn
- func NewExtendedReader(reader io.Reader) N.ExtendedReader
- func NewExtendedWriter(writer io.Writer) N.ExtendedWriter
- func NewNetPacketConn(conn N.PacketConn) N.NetPacketConn
- func NewNetPacketWriter(writer N.PacketWriter) N.NetPacketWriter
- func NewPacketConn(conn net.PacketConn) N.NetPacketConn
- func NewReadOnlyConn(reader io.Reader) net.Conn
- func NewUnbindPacketConn(conn net.Conn) N.NetPacketConn
- func NewUnbindPacketConnWithAddr(conn net.Conn, addr M.Socksaddr) N.NetPacketConn
- func NewVectorisedWriter(writer io.Writer) N.VectorisedWriter
- func NewWriteOnlyConn(writer io.Writer) net.Conn
- func ReadBuffer(reader N.ExtendedReader, buffer *buf.Buffer) (n int, err error)deprecated
- func ReadPacket(reader N.PacketReader, buffer *buf.Buffer) (n int, addr net.Addr, err error)deprecated
- func ToSockaddr(destination netip.AddrPort) (name unsafe.Pointer, nameLen uint32)
- func Write(writer io.Writer, data []byte) (n int, err error)
- func WriteBuffer(writer N.ExtendedWriter, buffer *buf.Buffer) (n int, err error)
- func WritePacket(writer N.NetPacketWriter, data []byte, addr net.Addr) (n int, err error)
- func WritePacketBuffer(writer N.PacketWriter, buffer *buf.Buffer, destination M.Socksaddr) (n int, err error)
- func WritePacketWithPool(originSource N.PacketReader, destinationConn N.PacketWriter, ...) (n int64, err error)
- func WriteVectorised(writer N.VectorisedWriter, data [][]byte) (n int, err error)
- func WriteVectorisedPacket(writer N.VectorisedPacketWriter, data [][]byte, destination M.Socksaddr) (n int, err error)
- type AddrConn
- func (c *AddrConn) LocalAddr() net.Addr
- func (c *AddrConn) ReadFrom(r io.Reader) (n int64, err error)
- func (c *AddrConn) ReaderReplaceable() bool
- func (c *AddrConn) RemoteAddr() net.Addr
- func (c *AddrConn) Upstream() any
- func (c *AddrConn) WriteTo(w io.Writer) (n int64, err error)
- func (c *AddrConn) WriterReplaceable() bool
- type BindPacketConn
- type BindPacketReadWaiter
- type BufferedVectorisedWriter
- type BufferedWriter
- type CachedConn
- func (c *CachedConn) Close() error
- func (c *CachedConn) Read(p []byte) (n int, err error)
- func (c *CachedConn) ReadCached() *buf.Buffer
- func (c *CachedConn) ReadFrom(r io.Reader) (n int64, err error)
- func (c *CachedConn) ReaderReplaceable() bool
- func (c *CachedConn) SetReadDeadline(t time.Time) error
- func (c *CachedConn) Upstream() any
- func (c *CachedConn) WriteTo(w io.Writer) (n int64, err error)
- func (c *CachedConn) WriterReplaceable() bool
- type CachedPacketConn
- func (c *CachedPacketConn) Close() error
- func (c *CachedPacketConn) ReadCachedPacket() *N.PacketBuffer
- func (c *CachedPacketConn) ReadPacket(buffer *buf.Buffer) (destination M.Socksaddr, err error)
- func (c *CachedPacketConn) ReaderReplaceable() bool
- func (c *CachedPacketConn) Upstream() any
- func (c *CachedPacketConn) WriterReplaceable() bool
- type CachedReader
- type ChunkReader
- type ChunkWriter
- type CounterConn
- func (c *CounterConn) Read(p []byte) (n int, err error)
- func (c *CounterConn) ReadBuffer(buffer *buf.Buffer) error
- func (c *CounterConn) UnwrapReader() (io.Reader, []N.CountFunc)
- func (c *CounterConn) UnwrapWriter() (io.Writer, []N.CountFunc)
- func (c *CounterConn) Upstream() any
- func (c *CounterConn) Write(p []byte) (n int, err error)
- func (c *CounterConn) WriteBuffer(buffer *buf.Buffer) error
- type CounterPacketConn
- func (c *CounterPacketConn) ReadPacket(buffer *buf.Buffer) (destination M.Socksaddr, err error)
- func (c *CounterPacketConn) UnwrapPacketReader() (N.PacketReader, []N.CountFunc)
- func (c *CounterPacketConn) UnwrapPacketWriter() (N.PacketWriter, []N.CountFunc)
- func (c *CounterPacketConn) Upstream() any
- func (c *CounterPacketConn) WritePacket(buffer *buf.Buffer, destination M.Socksaddr) error
- type ExtendedConnWrapper
- func (w *ExtendedConnWrapper) ReadBuffer(buffer *buf.Buffer) error
- func (w *ExtendedConnWrapper) ReadFrom(r io.Reader) (n int64, err error)
- func (w *ExtendedConnWrapper) ReaderReplaceable() bool
- func (w *ExtendedConnWrapper) Upstream() any
- func (w *ExtendedConnWrapper) UpstreamReader() any
- func (w *ExtendedConnWrapper) UpstreamWriter() any
- func (w *ExtendedConnWrapper) WriteBuffer(buffer *buf.Buffer) error
- func (r *ExtendedConnWrapper) WriteTo(w io.Writer) (n int64, err error)
- func (w *ExtendedConnWrapper) WriterReplaceable() bool
- type ExtendedPacketConn
- type ExtendedReaderWrapper
- type ExtendedUDPConn
- type ExtendedWriterWrapper
- type FallbackPacketConn
- func (c *FallbackPacketConn) ReadFrom(p []byte) (n int, addr net.Addr, err error)
- func (c *FallbackPacketConn) ReaderReplaceable() bool
- func (c *FallbackPacketConn) Upstream() any
- func (c *FallbackPacketConn) UpstreamWriter() any
- func (c *FallbackPacketConn) WriteTo(p []byte, addr net.Addr) (n int, err error)
- func (c *FallbackPacketConn) WriterReplaceable() bool
- type FallbackPacketWriter
- type NATPacketConn
- type NetVectorisedWriterWrapper
- type RaceWriter
- type ReadOnlyConn
- func (c *ReadOnlyConn) Close() error
- func (c *ReadOnlyConn) LocalAddr() net.Addr
- func (c *ReadOnlyConn) Read(b []byte) (n int, err error)
- func (c *ReadOnlyConn) RemoteAddr() net.Addr
- func (c *ReadOnlyConn) SetDeadline(t time.Time) error
- func (c *ReadOnlyConn) SetReadDeadline(t time.Time) error
- func (c *ReadOnlyConn) SetWriteDeadline(t time.Time) error
- func (c *ReadOnlyConn) Upstream() any
- func (c *ReadOnlyConn) Write(b []byte) (n int, err error)
- type SyscallVectorisedPacketWriter
- type SyscallVectorisedWriter
- type UnbindPacketConn
- func (c *UnbindPacketConn) CreateReadWaiter() (N.PacketReadWaiter, bool)
- func (c *UnbindPacketConn) ReadFrom(p []byte) (n int, addr net.Addr, err error)
- func (c *UnbindPacketConn) ReadPacket(buffer *buf.Buffer) (destination M.Socksaddr, err error)
- func (c *UnbindPacketConn) Upstream() any
- func (c *UnbindPacketConn) WritePacket(buffer *buf.Buffer, _ M.Socksaddr) error
- func (c *UnbindPacketConn) WriteTo(p []byte, _ net.Addr) (n int, err error)
- type UnbindPacketReadWaiter
- type UnbindVectorisedPacketWriter
- type WriteOnlyConn
- func (c *WriteOnlyConn) Close() error
- func (c *WriteOnlyConn) LocalAddr() net.Addr
- func (c *WriteOnlyConn) Read(b []byte) (n int, err error)
- func (c *WriteOnlyConn) RemoteAddr() net.Addr
- func (c *WriteOnlyConn) SetDeadline(t time.Time) error
- func (c *WriteOnlyConn) SetReadDeadline(t time.Time) error
- func (c *WriteOnlyConn) SetWriteDeadline(t time.Time) error
- func (c *WriteOnlyConn) Upstream() any
- func (c *WriteOnlyConn) Write(b []byte) (n int, err error)
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func CopyConnContextList ¶ added in v0.2.3
func CopyExtended ¶
func CopyExtendedBuffer ¶
func CopyExtendedWithPool ¶
func CopyPacket ¶
func CopyPacket(destinationConn N.PacketWriter, source N.PacketReader) (n int64, err error)
func CopyPacketConn ¶
func CopyPacketConn(ctx context.Context, source N.PacketConn, destination N.PacketConn) error
func CopyPacketConnContextList ¶ added in v0.2.3
func CopyPacketConnContextList(contextList []context.Context, source N.PacketConn, destination N.PacketConn) error
func CopyPacketWithPool ¶
func CopyPacketWithPool(originSource N.PacketReader, destinationConn N.PacketWriter, source N.PacketReader, readCounters []N.CountFunc, writeCounters []N.CountFunc, notFirstTime bool) (n int64, err error)
func CreatePacketReadWaiter ¶ added in v0.2.5
func CreatePacketReadWaiter(reader N.PacketReader) (N.PacketReadWaiter, bool)
func CreateReadWaiter ¶ added in v0.2.5
func CreateReadWaiter(reader io.Reader) (N.ReadWaiter, bool)
func CreateVectorisedPacketWriter ¶
func CreateVectorisedPacketWriter(writer any) (N.VectorisedPacketWriter, bool)
func CreateVectorisedWriter ¶
func CreateVectorisedWriter(writer any) (N.VectorisedWriter, bool)
func NewAppendConn ¶ added in v0.1.8
func NewAppendConn(conn N.ExtendedConn, reader N.ExtendedReader, writer N.ExtendedWriter) N.ExtendedConn
func NewExtendedConn ¶
func NewExtendedConn(conn net.Conn) N.ExtendedConn
func NewExtendedReader ¶
func NewExtendedReader(reader io.Reader) N.ExtendedReader
func NewExtendedWriter ¶
func NewExtendedWriter(writer io.Writer) N.ExtendedWriter
func NewNetPacketConn ¶ added in v0.2.2
func NewNetPacketConn(conn N.PacketConn) N.NetPacketConn
func NewNetPacketWriter ¶ added in v0.2.19
func NewNetPacketWriter(writer N.PacketWriter) N.NetPacketWriter
func NewPacketConn ¶
func NewPacketConn(conn net.PacketConn) N.NetPacketConn
func NewUnbindPacketConn ¶
func NewUnbindPacketConn(conn net.Conn) N.NetPacketConn
func NewUnbindPacketConnWithAddr ¶ added in v0.3.0
func NewVectorisedWriter ¶
func NewVectorisedWriter(writer io.Writer) N.VectorisedWriter
func ReadBuffer
deprecated
func ReadPacket
deprecated
func ToSockaddr ¶ added in v0.3.0
func WriteBuffer ¶
func WritePacket ¶
func WritePacketBuffer ¶
func WritePacketWithPool ¶ added in v0.2.5
func WritePacketWithPool(originSource N.PacketReader, destinationConn N.PacketWriter, packetBuffers []*N.PacketBuffer) (n int64, err error)
func WriteVectorised ¶
func WriteVectorised(writer N.VectorisedWriter, data [][]byte) (n int, err error)
func WriteVectorisedPacket ¶
Types ¶
type AddrConn ¶
func (*AddrConn) ReaderReplaceable ¶
func (*AddrConn) RemoteAddr ¶
func (*AddrConn) WriterReplaceable ¶
type BindPacketConn ¶
type BindPacketConn interface { N.NetPacketConn net.Conn }
func NewBindPacketConn ¶ added in v0.2.2
func NewBindPacketConn(conn net.PacketConn, addr net.Addr) BindPacketConn
type BindPacketReadWaiter ¶ added in v0.3.0
type BindPacketReadWaiter struct {
// contains filtered or unexported fields
}
func (*BindPacketReadWaiter) InitializeReadWaiter ¶ added in v0.3.0
func (w *BindPacketReadWaiter) InitializeReadWaiter(options N.ReadWaitOptions) (needCopy bool)
func (*BindPacketReadWaiter) WaitReadBuffer ¶ added in v0.3.0
func (w *BindPacketReadWaiter) WaitReadBuffer() (buffer *buf.Buffer, err error)
type BufferedVectorisedWriter ¶ added in v0.1.8
type BufferedVectorisedWriter struct {
// contains filtered or unexported fields
}
func (*BufferedVectorisedWriter) Upstream ¶ added in v0.1.8
func (w *BufferedVectorisedWriter) Upstream() any
func (*BufferedVectorisedWriter) WriteVectorised ¶ added in v0.1.8
func (w *BufferedVectorisedWriter) WriteVectorised(buffers []*buf.Buffer) error
type BufferedWriter ¶
type BufferedWriter struct {
// contains filtered or unexported fields
}
func NewBufferedWriter ¶
func NewBufferedWriter(upstream io.Writer, buffer *buf.Buffer) *BufferedWriter
func (*BufferedWriter) Fallthrough ¶ added in v0.1.7
func (w *BufferedWriter) Fallthrough() error
func (*BufferedWriter) WriterReplaceable ¶ added in v0.1.7
func (w *BufferedWriter) WriterReplaceable() bool
type CachedConn ¶
func NewCachedConn ¶
func NewCachedConn(conn net.Conn, buffer *buf.Buffer) *CachedConn
func (*CachedConn) Close ¶
func (c *CachedConn) Close() error
func (*CachedConn) ReadCached ¶
func (c *CachedConn) ReadCached() *buf.Buffer
func (*CachedConn) ReaderReplaceable ¶
func (c *CachedConn) ReaderReplaceable() bool
func (*CachedConn) SetReadDeadline ¶
func (c *CachedConn) SetReadDeadline(t time.Time) error
func (*CachedConn) Upstream ¶
func (c *CachedConn) Upstream() any
func (*CachedConn) WriterReplaceable ¶
func (c *CachedConn) WriterReplaceable() bool
type CachedPacketConn ¶
type CachedPacketConn struct { N.PacketConn // contains filtered or unexported fields }
func NewCachedPacketConn ¶
func NewCachedPacketConn(conn N.PacketConn, buffer *buf.Buffer, destination M.Socksaddr) *CachedPacketConn
func (*CachedPacketConn) Close ¶ added in v0.1.8
func (c *CachedPacketConn) Close() error
func (*CachedPacketConn) ReadCachedPacket ¶
func (c *CachedPacketConn) ReadCachedPacket() *N.PacketBuffer
func (*CachedPacketConn) ReadPacket ¶
func (*CachedPacketConn) ReaderReplaceable ¶
func (c *CachedPacketConn) ReaderReplaceable() bool
func (*CachedPacketConn) Upstream ¶
func (c *CachedPacketConn) Upstream() any
func (*CachedPacketConn) WriterReplaceable ¶
func (c *CachedPacketConn) WriterReplaceable() bool
type CachedReader ¶
type CachedReader struct {
// contains filtered or unexported fields
}
func NewCachedReader ¶
func NewCachedReader(upstream io.Reader, buffer *buf.Buffer) *CachedReader
func (*CachedReader) Close ¶
func (r *CachedReader) Close() error
func (*CachedReader) ReadCached ¶
func (r *CachedReader) ReadCached() *buf.Buffer
func (*CachedReader) ReaderReplaceable ¶
func (r *CachedReader) ReaderReplaceable() bool
func (*CachedReader) Upstream ¶
func (r *CachedReader) Upstream() any
type ChunkReader ¶
type ChunkReader struct {
// contains filtered or unexported fields
}
func NewChunkReader ¶
func NewChunkReader(upstream io.Reader, maxChunkSize int) *ChunkReader
func (*ChunkReader) MTU ¶
func (c *ChunkReader) MTU() int
func (*ChunkReader) ReadBuffer ¶
func (c *ChunkReader) ReadBuffer(buffer *buf.Buffer) error
func (*ChunkReader) ReadByte ¶ added in v0.2.5
func (c *ChunkReader) ReadByte() (byte, error)
type ChunkWriter ¶
type ChunkWriter struct {
// contains filtered or unexported fields
}
func NewChunkWriter ¶
func NewChunkWriter(writer io.Writer, maxChunkSize int) *ChunkWriter
func (*ChunkWriter) MTU ¶
func (w *ChunkWriter) MTU() int
func (*ChunkWriter) Upstream ¶
func (w *ChunkWriter) Upstream() any
func (*ChunkWriter) WriteBuffer ¶
func (w *ChunkWriter) WriteBuffer(buffer *buf.Buffer) error
type CounterConn ¶ added in v0.2.5
type CounterConn struct { N.ExtendedConn // contains filtered or unexported fields }
func NewCounterConn ¶ added in v0.2.5
func NewInt64CounterConn ¶ added in v0.2.5
func (*CounterConn) ReadBuffer ¶ added in v0.2.5
func (c *CounterConn) ReadBuffer(buffer *buf.Buffer) error
func (*CounterConn) UnwrapReader ¶ added in v0.2.5
func (c *CounterConn) UnwrapReader() (io.Reader, []N.CountFunc)
func (*CounterConn) UnwrapWriter ¶ added in v0.2.5
func (c *CounterConn) UnwrapWriter() (io.Writer, []N.CountFunc)
func (*CounterConn) Upstream ¶ added in v0.2.5
func (c *CounterConn) Upstream() any
func (*CounterConn) Write ¶ added in v0.2.5
func (c *CounterConn) Write(p []byte) (n int, err error)
func (*CounterConn) WriteBuffer ¶ added in v0.2.5
func (c *CounterConn) WriteBuffer(buffer *buf.Buffer) error
type CounterPacketConn ¶ added in v0.2.5
type CounterPacketConn struct { N.PacketConn // contains filtered or unexported fields }
func NewCounterPacketConn ¶ added in v0.2.5
func NewCounterPacketConn(conn N.PacketConn, readCounter []N.CountFunc, writeCounter []N.CountFunc) *CounterPacketConn
func NewInt64CounterPacketConn ¶ added in v0.2.5
func NewInt64CounterPacketConn(conn N.PacketConn, readCounter []*atomic.Int64, writeCounter []*atomic.Int64) *CounterPacketConn
func (*CounterPacketConn) ReadPacket ¶ added in v0.2.5
func (*CounterPacketConn) UnwrapPacketReader ¶ added in v0.2.5
func (c *CounterPacketConn) UnwrapPacketReader() (N.PacketReader, []N.CountFunc)
func (*CounterPacketConn) UnwrapPacketWriter ¶ added in v0.2.5
func (c *CounterPacketConn) UnwrapPacketWriter() (N.PacketWriter, []N.CountFunc)
func (*CounterPacketConn) Upstream ¶ added in v0.2.5
func (c *CounterPacketConn) Upstream() any
func (*CounterPacketConn) WritePacket ¶ added in v0.2.5
type ExtendedConnWrapper ¶
func (*ExtendedConnWrapper) ReadBuffer ¶
func (w *ExtendedConnWrapper) ReadBuffer(buffer *buf.Buffer) error
func (*ExtendedConnWrapper) ReadFrom ¶
func (w *ExtendedConnWrapper) ReadFrom(r io.Reader) (n int64, err error)
func (*ExtendedConnWrapper) ReaderReplaceable ¶
func (w *ExtendedConnWrapper) ReaderReplaceable() bool
func (*ExtendedConnWrapper) Upstream ¶
func (w *ExtendedConnWrapper) Upstream() any
func (*ExtendedConnWrapper) UpstreamReader ¶
func (w *ExtendedConnWrapper) UpstreamReader() any
func (*ExtendedConnWrapper) UpstreamWriter ¶
func (w *ExtendedConnWrapper) UpstreamWriter() any
func (*ExtendedConnWrapper) WriteBuffer ¶
func (w *ExtendedConnWrapper) WriteBuffer(buffer *buf.Buffer) error
func (*ExtendedConnWrapper) WriteTo ¶
func (r *ExtendedConnWrapper) WriteTo(w io.Writer) (n int64, err error)
func (*ExtendedConnWrapper) WriterReplaceable ¶
func (w *ExtendedConnWrapper) WriterReplaceable() bool
type ExtendedPacketConn ¶
type ExtendedPacketConn struct {
net.PacketConn
}
func (*ExtendedPacketConn) ReadPacket ¶
func (*ExtendedPacketConn) Upstream ¶
func (w *ExtendedPacketConn) Upstream() any
func (*ExtendedPacketConn) WritePacket ¶
type ExtendedReaderWrapper ¶
func (*ExtendedReaderWrapper) ReadBuffer ¶
func (r *ExtendedReaderWrapper) ReadBuffer(buffer *buf.Buffer) error
func (*ExtendedReaderWrapper) ReaderReplaceable ¶
func (r *ExtendedReaderWrapper) ReaderReplaceable() bool
func (*ExtendedReaderWrapper) Upstream ¶
func (r *ExtendedReaderWrapper) Upstream() any
type ExtendedUDPConn ¶
func (*ExtendedUDPConn) ReadPacket ¶
func (*ExtendedUDPConn) Upstream ¶
func (w *ExtendedUDPConn) Upstream() any
func (*ExtendedUDPConn) WritePacket ¶
type ExtendedWriterWrapper ¶
func (*ExtendedWriterWrapper) ReadFrom ¶
func (w *ExtendedWriterWrapper) ReadFrom(r io.Reader) (n int64, err error)
func (*ExtendedWriterWrapper) Upstream ¶
func (w *ExtendedWriterWrapper) Upstream() any
func (*ExtendedWriterWrapper) WriteBuffer ¶
func (w *ExtendedWriterWrapper) WriteBuffer(buffer *buf.Buffer) error
func (*ExtendedWriterWrapper) WriterReplaceable ¶ added in v0.2.5
func (w *ExtendedWriterWrapper) WriterReplaceable() bool
type FallbackPacketConn ¶ added in v0.2.2
type FallbackPacketConn struct { N.PacketConn // contains filtered or unexported fields }
func (*FallbackPacketConn) ReaderReplaceable ¶ added in v0.2.3
func (c *FallbackPacketConn) ReaderReplaceable() bool
func (*FallbackPacketConn) Upstream ¶ added in v0.2.3
func (c *FallbackPacketConn) Upstream() any
func (*FallbackPacketConn) UpstreamWriter ¶ added in v0.2.19
func (c *FallbackPacketConn) UpstreamWriter() any
func (*FallbackPacketConn) WriterReplaceable ¶ added in v0.2.3
func (c *FallbackPacketConn) WriterReplaceable() bool
type FallbackPacketWriter ¶ added in v0.2.19
type FallbackPacketWriter struct { N.PacketWriter // contains filtered or unexported fields }
func (*FallbackPacketWriter) Upstream ¶ added in v0.2.19
func (c *FallbackPacketWriter) Upstream() any
func (*FallbackPacketWriter) WriterReplaceable ¶ added in v0.2.19
func (c *FallbackPacketWriter) WriterReplaceable() bool
type NATPacketConn ¶ added in v0.2.2
type NATPacketConn interface { N.NetPacketConn UpdateDestination(destinationAddress netip.Addr) }
func NewNATPacketConn ¶ added in v0.2.2
func NewNATPacketConn(conn N.NetPacketConn, origin M.Socksaddr, destination M.Socksaddr) NATPacketConn
func NewUnidirectionalNATPacketConn ¶ added in v0.2.18
func NewUnidirectionalNATPacketConn(conn N.NetPacketConn, origin M.Socksaddr, destination M.Socksaddr) NATPacketConn
type NetVectorisedWriterWrapper ¶
type NetVectorisedWriterWrapper struct {
// contains filtered or unexported fields
}
func (*NetVectorisedWriterWrapper) Upstream ¶
func (w *NetVectorisedWriterWrapper) Upstream() any
func (*NetVectorisedWriterWrapper) WriteVectorised ¶
func (w *NetVectorisedWriterWrapper) WriteVectorised(buffers []*buf.Buffer) error
func (*NetVectorisedWriterWrapper) WriterReplaceable ¶
func (w *NetVectorisedWriterWrapper) WriterReplaceable() bool
type RaceWriter ¶
type RaceWriter struct {
// contains filtered or unexported fields
}
func NewRaceWriter ¶
func NewRaceWriter(writer io.Writer) *RaceWriter
func (*RaceWriter) Upstream ¶
func (w *RaceWriter) Upstream() any
func (*RaceWriter) WriteBuffer ¶
func (w *RaceWriter) WriteBuffer(buffer *buf.Buffer) error
type ReadOnlyConn ¶
type ReadOnlyConn struct {
// contains filtered or unexported fields
}
func (*ReadOnlyConn) Close ¶
func (c *ReadOnlyConn) Close() error
func (*ReadOnlyConn) LocalAddr ¶
func (c *ReadOnlyConn) LocalAddr() net.Addr
func (*ReadOnlyConn) RemoteAddr ¶
func (c *ReadOnlyConn) RemoteAddr() net.Addr
func (*ReadOnlyConn) SetDeadline ¶
func (c *ReadOnlyConn) SetDeadline(t time.Time) error
func (*ReadOnlyConn) SetReadDeadline ¶
func (c *ReadOnlyConn) SetReadDeadline(t time.Time) error
func (*ReadOnlyConn) SetWriteDeadline ¶
func (c *ReadOnlyConn) SetWriteDeadline(t time.Time) error
func (*ReadOnlyConn) Upstream ¶
func (c *ReadOnlyConn) Upstream() any
type SyscallVectorisedPacketWriter ¶
type SyscallVectorisedPacketWriter struct {
// contains filtered or unexported fields
}
func (*SyscallVectorisedPacketWriter) Upstream ¶
func (w *SyscallVectorisedPacketWriter) Upstream() any
func (*SyscallVectorisedPacketWriter) WriteVectorisedPacket ¶
type SyscallVectorisedWriter ¶
type SyscallVectorisedWriter struct {
// contains filtered or unexported fields
}
func (*SyscallVectorisedWriter) Upstream ¶
func (w *SyscallVectorisedWriter) Upstream() any
func (*SyscallVectorisedWriter) WriteVectorised ¶
func (w *SyscallVectorisedWriter) WriteVectorised(buffers []*buf.Buffer) error
func (*SyscallVectorisedWriter) WriterReplaceable ¶
func (w *SyscallVectorisedWriter) WriterReplaceable() bool
type UnbindPacketConn ¶
type UnbindPacketConn struct { N.ExtendedConn // contains filtered or unexported fields }
func (*UnbindPacketConn) CreateReadWaiter ¶ added in v0.3.0
func (c *UnbindPacketConn) CreateReadWaiter() (N.PacketReadWaiter, bool)
func (*UnbindPacketConn) ReadPacket ¶
func (*UnbindPacketConn) Upstream ¶
func (c *UnbindPacketConn) Upstream() any
func (*UnbindPacketConn) WritePacket ¶
type UnbindPacketReadWaiter ¶ added in v0.3.0
type UnbindPacketReadWaiter struct {
// contains filtered or unexported fields
}
func (*UnbindPacketReadWaiter) InitializeReadWaiter ¶ added in v0.3.0
func (w *UnbindPacketReadWaiter) InitializeReadWaiter(options N.ReadWaitOptions) (needCopy bool)
func (*UnbindPacketReadWaiter) WaitReadPacket ¶ added in v0.3.0
type UnbindVectorisedPacketWriter ¶
type UnbindVectorisedPacketWriter struct {
N.VectorisedWriter
}
func (*UnbindVectorisedPacketWriter) WriteVectorisedPacket ¶
type WriteOnlyConn ¶
type WriteOnlyConn struct {
// contains filtered or unexported fields
}
func (*WriteOnlyConn) Close ¶
func (c *WriteOnlyConn) Close() error
func (*WriteOnlyConn) LocalAddr ¶
func (c *WriteOnlyConn) LocalAddr() net.Addr
func (*WriteOnlyConn) RemoteAddr ¶
func (c *WriteOnlyConn) RemoteAddr() net.Addr
func (*WriteOnlyConn) SetDeadline ¶
func (c *WriteOnlyConn) SetDeadline(t time.Time) error
func (*WriteOnlyConn) SetReadDeadline ¶
func (c *WriteOnlyConn) SetReadDeadline(t time.Time) error
func (*WriteOnlyConn) SetWriteDeadline ¶
func (c *WriteOnlyConn) SetWriteDeadline(t time.Time) error
func (*WriteOnlyConn) Upstream ¶
func (c *WriteOnlyConn) Upstream() any
Source Files ¶
Click to show internal directories.
Click to hide internal directories.