Documentation ¶
Index ¶
- Constants
- func DialParallel(ctx context.Context, dialer Dialer, network string, destination M.Socksaddr, ...) (net.Conn, error)
- func DialSerial(ctx context.Context, dialer Dialer, network string, destination M.Socksaddr, ...) (net.Conn, error)
- func IsPublicAddr(addr netip.Addr) bool
- func ListenSerial(ctx context.Context, dialer Dialer, destination M.Socksaddr, ...) (net.PacketConn, error)
- func LocalAddrs() ([]netip.Addr, error)
- func LocalPublicAddrs() ([]netip.Addr, error)
- func UnwrapReader(reader io.Reader) io.Reader
- func UnwrapWriter(writer io.Writer) io.Writer
- type BindPacketConn
- type CachedReader
- type DefaultDialer
- type Dialer
- type ExtendedConn
- type ExtendedReader
- type ExtendedWriter
- type NetPacketConn
- type PacketConn
- type PacketReader
- type PacketWriter
- type ReaderWithUpstream
- type TCPConnectionHandler
- type ThreadSafePacketReader
- type ThreadSafeReader
- type ThreadUnsafeWriter
- type TimeoutPacketReader
- type UDPConnectionHandler
- type UDPHandler
- type WriterWithUpstream
Constants ¶
View Source
const DefaultFallbackDelay = 300 * time.Millisecond
Variables ¶
This section is empty.
Functions ¶
func DialParallel ¶
func DialSerial ¶
func IsPublicAddr ¶
func ListenSerial ¶
func LocalAddrs ¶
func LocalPublicAddrs ¶
Types ¶
type BindPacketConn ¶
type BindPacketConn interface { NetPacketConn net.Conn }
type CachedReader ¶
type DefaultDialer ¶
type DefaultDialer struct { net.Dialer net.ListenConfig }
func (*DefaultDialer) DialContext ¶
func (*DefaultDialer) ListenPacket ¶
func (d *DefaultDialer) ListenPacket(ctx context.Context, destination M.Socksaddr) (net.PacketConn, error)
type Dialer ¶
type Dialer interface { DialContext(ctx context.Context, network string, destination M.Socksaddr) (net.Conn, error) ListenPacket(ctx context.Context, destination M.Socksaddr) (net.PacketConn, error) }
var SystemDialer Dialer = &DefaultDialer{}
type ExtendedConn ¶
type ExtendedConn interface { ExtendedReader ExtendedWriter net.Conn }
type ExtendedReader ¶
type ExtendedWriter ¶
type NetPacketConn ¶
type NetPacketConn interface { net.PacketConn PacketConn }
type PacketConn ¶
type PacketReader ¶
type PacketWriter ¶
type ReaderWithUpstream ¶
type ReaderWithUpstream interface { common.WithUpstream ReaderReplaceable() bool }
type TCPConnectionHandler ¶
type ThreadSafePacketReader ¶
type ThreadSafeReader ¶
type ThreadUnsafeWriter ¶
type ThreadUnsafeWriter interface {
WriteIsThreadUnsafe()
}
type TimeoutPacketReader ¶
type TimeoutPacketReader interface { PacketReader SetReadDeadline(t time.Time) error }
type UDPConnectionHandler ¶
type UDPHandler ¶
type WriterWithUpstream ¶
type WriterWithUpstream interface { common.WithUpstream WriterReplaceable() bool }
Click to show internal directories.
Click to hide internal directories.