common

package
v0.0.2 Latest Latest
Warning

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

Go to latest
Published: Dec 11, 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 Dialer

type Dialer interface {
	DialContext(ctx context.Context, network string, address SocksAddr) (net.Conn, error)
	ListenPacket(ctx context.Context, address SocksAddr) (net.PacketConn, error)
}

type DomainUDPAddr

type DomainUDPAddr struct {
	// contains filtered or unexported fields
}

func (*DomainUDPAddr) Network

func (d *DomainUDPAddr) Network() string

func (*DomainUDPAddr) String

func (d *DomainUDPAddr) String() string

type SocksAddr

type SocksAddr struct {
	// contains filtered or unexported fields
}

func NewSocksAddrFromAddrPort

func NewSocksAddrFromAddrPort(addr netip.AddrPort) *SocksAddr

func NewSocksAddrFromString

func NewSocksAddrFromString(address string) (*SocksAddr, error)

func NewSocksAddrFromStringWithDefaultPort

func NewSocksAddrFromStringWithDefaultPort(address string, defaultPort uint16) (*SocksAddr, error)

func NewSocksDomainPort

func NewSocksDomainPort(domain string, port uint16) *SocksAddr

func NewSocksIPPort

func NewSocksIPPort(ip netip.Addr, port uint16) *SocksAddr

func (*SocksAddr) Domain

func (s *SocksAddr) Domain() string

func (*SocksAddr) IP

func (s *SocksAddr) IP() netip.Addr

func (*SocksAddr) IsDomain

func (s *SocksAddr) IsDomain() bool

func (*SocksAddr) IsIP

func (s *SocksAddr) IsIP() bool

func (*SocksAddr) IsIPv4

func (s *SocksAddr) IsIPv4() bool

func (*SocksAddr) IsIPv6

func (s *SocksAddr) IsIPv6() bool

func (*SocksAddr) Port

func (s *SocksAddr) Port() uint16

func (*SocksAddr) String

func (s *SocksAddr) String() string

func (*SocksAddr) UDPAddr

func (s *SocksAddr) UDPAddr() net.Addr

Jump to

Keyboard shortcuts

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