Documentation ¶
Index ¶
- func Copy(dst io.Writer, src io.Reader) (n int64, err error)
- func CopyConn(ctx context.Context, conn net.Conn, dest net.Conn) error
- func CopyExtended(dst N.ExtendedWriter, src N.ExtendedReader) (n int64, err error)
- func CopyExtendedBuffer(dst N.ExtendedWriter, src N.ExtendedReader, buffer *buf.Buffer) (n int64, err error)
- func CopyExtendedTimes(dst N.ExtendedWriter, src N.ExtendedReader, times int) (n int64, err error)
- func CopyExtendedWithPool(dst N.ExtendedWriter, src N.ExtendedReader) (n int64, err error)
- func CopyExtendedWithSrcBuffer(dst N.ExtendedWriter, src N.ThreadSafeReader) (n int64, err error)
- func CopyPacket(dst N.PacketWriter, src N.PacketReader) (n int64, err error)
- func CopyPacketConn(ctx context.Context, conn N.PacketConn, dest N.PacketConn) error
- func CopyPacketWithPool(dst N.PacketWriter, src N.PacketReader) (n int64, err error)
- func CopyPacketWithSrcBuffer(dst N.PacketWriter, src N.ThreadSafePacketReader) (n int64, err error)
- func CopyTimes(dst io.Writer, src io.Reader, times int) (n int64, err error)
- func CreateVectorisedPacketWriter(writer any) (N.VectorisedPacketWriter, bool)
- func CreateVectorisedWriter(writer any) (N.VectorisedWriter, bool)
- func NewExtendedConn(conn net.Conn) N.ExtendedConn
- func NewExtendedReader(reader io.Reader) N.ExtendedReader
- func NewExtendedWriter(writer io.Writer) N.ExtendedWriter
- func NewPacketConn(conn net.PacketConn) N.NetPacketConn
- func NewReadOnlyConn(reader io.Reader) net.Conn
- 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)
- func ReadFrom0(readerFrom ReadFromWriter, reader io.Reader) (n int64, err error)
- func ReadFromN(readerFrom ReadFromWriter, reader io.Reader, times int) (n int64, err error)
- func ReadPacket(reader N.PacketReader, buffer *buf.Buffer) (n int, addr net.Addr, err error)
- 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 WriteTo0(writerTo WriteToReader, writer io.Writer) (n int64, err error)
- func WriteToN(writerTo WriteToReader, writer io.Writer, times int) (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 BufferedReader
- 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) ReadCachedPacket() (destination M.Socksaddr, buffer *buf.Buffer)
- 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 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
- func (r *ExtendedReaderWrapper) ReadBuffer(buffer *buf.Buffer) error
- func (r *ExtendedReaderWrapper) ReaderReplaceable() bool
- func (r *ExtendedReaderWrapper) Upstream() any
- func (r *ExtendedReaderWrapper) WriteTo(w io.Writer) (n int64, err error)
- func (w *ExtendedReaderWrapper) WriterReplaceable() bool
- type ExtendedUDPConn
- type ExtendedWriterWrapper
- type NetVectorisedWriterWrapper
- type RaceWriter
- type ReadFromWriter
- 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 SerialVectorisedWriter
- type SyscallVectorisedPacketWriter
- type SyscallVectorisedWriter
- type UnbindPacketConn
- 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 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)
- type WriteToReader
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func CopyExtended ¶
func CopyExtended(dst N.ExtendedWriter, src N.ExtendedReader) (n int64, err error)
func CopyExtendedBuffer ¶
func CopyExtendedBuffer(dst N.ExtendedWriter, src N.ExtendedReader, buffer *buf.Buffer) (n int64, err error)
func CopyExtendedTimes ¶
func CopyExtendedTimes(dst N.ExtendedWriter, src N.ExtendedReader, times int) (n int64, err error)
func CopyExtendedWithPool ¶
func CopyExtendedWithPool(dst N.ExtendedWriter, src N.ExtendedReader) (n int64, err error)
func CopyExtendedWithSrcBuffer ¶
func CopyExtendedWithSrcBuffer(dst N.ExtendedWriter, src N.ThreadSafeReader) (n int64, err error)
func CopyPacket ¶
func CopyPacket(dst N.PacketWriter, src N.PacketReader) (n int64, err error)
func CopyPacketConn ¶
func CopyPacketConn(ctx context.Context, conn N.PacketConn, dest N.PacketConn) error
func CopyPacketWithPool ¶
func CopyPacketWithPool(dst N.PacketWriter, src N.PacketReader) (n int64, err error)
func CopyPacketWithSrcBuffer ¶
func CopyPacketWithSrcBuffer(dst N.PacketWriter, src N.ThreadSafePacketReader) (n int64, err error)
func CreateVectorisedPacketWriter ¶
func CreateVectorisedPacketWriter(writer any) (N.VectorisedPacketWriter, bool)
func CreateVectorisedWriter ¶
func CreateVectorisedWriter(writer any) (N.VectorisedWriter, bool)
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 NewPacketConn ¶
func NewPacketConn(conn net.PacketConn) N.NetPacketConn
func NewVectorisedWriter ¶
func NewVectorisedWriter(writer io.Writer) N.VectorisedWriter
func ReadBuffer ¶
func ReadPacket ¶
func WriteBuffer ¶
func WritePacket ¶
func WritePacketBuffer ¶
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 struct { net.PacketConn Addr net.Addr }
func (*BindPacketConn) RemoteAddr ¶
func (c *BindPacketConn) RemoteAddr() net.Addr
func (*BindPacketConn) Upstream ¶
func (c *BindPacketConn) Upstream() any
type BufferedReader ¶
type BufferedReader struct {
// contains filtered or unexported fields
}
func NewBufferedReader ¶
func NewBufferedReader(upstream io.Reader, buffer *buf.Buffer) *BufferedReader
func (*BufferedReader) ReadBuffer ¶
func (r *BufferedReader) ReadBuffer(buffer *buf.Buffer) error
func (*BufferedReader) Upstream ¶
func (r *BufferedReader) Upstream() any
type BufferedWriter ¶
type BufferedWriter struct {
// contains filtered or unexported fields
}
func NewBufferedWriter ¶
func NewBufferedWriter(upstream io.Writer, buffer *buf.Buffer) *BufferedWriter
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) ReadCachedPacket ¶
func (c *CachedPacketConn) ReadCachedPacket() (destination M.Socksaddr, buffer *buf.Buffer)
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
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 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
func (*ExtendedReaderWrapper) WriteTo ¶
func (r *ExtendedReaderWrapper) WriteTo(w io.Writer) (n int64, err error)
func (*ExtendedReaderWrapper) WriterReplaceable ¶
func (w *ExtendedReaderWrapper) WriterReplaceable() bool
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
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 ReadFromWriter ¶
type ReadFromWriter interface { io.ReaderFrom io.Writer }
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 SerialVectorisedWriter ¶
type SerialVectorisedWriter struct {
// contains filtered or unexported fields
}
func (*SerialVectorisedWriter) Upstream ¶
func (w *SerialVectorisedWriter) Upstream() any
func (*SerialVectorisedWriter) WriteVectorised ¶
func (w *SerialVectorisedWriter) WriteVectorised(buffers []*buf.Buffer) error
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 Addr M.Socksaddr }
func NewUnbindPacketConn ¶
func NewUnbindPacketConn(conn net.Conn) *UnbindPacketConn
func (*UnbindPacketConn) ReadPacket ¶
func (*UnbindPacketConn) Upstream ¶
func (c *UnbindPacketConn) Upstream() any
func (*UnbindPacketConn) WritePacket ¶
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
Click to show internal directories.
Click to hide internal directories.