Documentation ¶
Index ¶
- Variables
- type Address
- func ParseAddress(network, addr string) (ad Address, _ error)
- func ParseAddressSplit(network, addr string, por uint16) (ad Address)
- func ParseIPAddr(ad *net.IPAddr) Address
- func ParseSysAddr(ad net.Addr) (Address, error)
- func ParseTCPAddress(ad *net.TCPAddr) Address
- func ParseUDPAddr(ad *net.UDPAddr) Address
- func ParseUnixAddr(ad *net.UnixAddr) Address
- type DomainAddr
- func (d DomainAddr) Hostname() string
- func (d DomainAddr) IP() net.IP
- func (d DomainAddr) IPHost() string
- func (d DomainAddr) Network() string
- func (d DomainAddr) Port() Port
- func (d DomainAddr) String() string
- func (d DomainAddr) TCPAddr() *net.TCPAddr
- func (d DomainAddr) Type() Type
- func (d DomainAddr) UDPAddr() *net.UDPAddr
- func (d *DomainAddr) WithResolver(resolver dns.DNS)
- func (d DomainAddr) Zone() string
- type IPAddr
- type PacketProxy
- type Port
- type Proxy
- type StreamProxy
- type Type
Constants ¶
This section is empty.
Variables ¶
View Source
var EmptyAddr = &emptyAddr{}
Functions ¶
This section is empty.
Types ¶
type Address ¶
type Address interface { // Hostname return hostname of address, eg: www.example.com, 127.0.0.1, ff::ff Hostname() string // IP return net.IP, if address is ip else return nil IP() net.IP // Port return port of address Port() Port // Type return type of address, domain or ip Type() Type net.Addr WithResolver(dns.DNS) Zone() string // IPv6 scoped addressing zone UDPAddr() *net.UDPAddr TCPAddr() *net.TCPAddr // IPHost if address is ip, return host, else resolve domain to ip and return JoinHostPort(ip,port) IPHost() string }
func ParseAddress ¶
func ParseAddressSplit ¶
func ParseIPAddr ¶
func ParseTCPAddress ¶
func ParseUDPAddr ¶
func ParseUnixAddr ¶
type DomainAddr ¶
type DomainAddr struct {
// contains filtered or unexported fields
}
func (DomainAddr) Hostname ¶
func (d DomainAddr) Hostname() string
func (DomainAddr) IP ¶
func (d DomainAddr) IP() net.IP
func (DomainAddr) IPHost ¶
func (d DomainAddr) IPHost() string
func (DomainAddr) Network ¶
func (d DomainAddr) Network() string
func (DomainAddr) Port ¶
func (d DomainAddr) Port() Port
func (DomainAddr) String ¶
func (d DomainAddr) String() string
func (DomainAddr) TCPAddr ¶
func (d DomainAddr) TCPAddr() *net.TCPAddr
func (DomainAddr) Type ¶
func (d DomainAddr) Type() Type
func (DomainAddr) UDPAddr ¶
func (d DomainAddr) UDPAddr() *net.UDPAddr
func (*DomainAddr) WithResolver ¶
func (d *DomainAddr) WithResolver(resolver dns.DNS)
func (DomainAddr) Zone ¶
func (d DomainAddr) Zone() string
type PacketProxy ¶
type PacketProxy interface {
PacketConn(Address) (net.PacketConn, error)
}
Click to show internal directories.
Click to hide internal directories.