Documentation ¶
Index ¶
- Constants
- func MakeDialer(p Protector) *net.Dialer
- func MakeListenConfig(p Protector) *net.ListenConfig
- func MakeNsDialer(who string, c Controller) *net.Dialer
- func MakeNsListenConfigExt(who string, ctl Controller, ext []ControlFn) *net.ListenConfig
- func MakeNsListener(who string, c Controller) *net.ListenConfig
- func NeverResolve(hostname string) bool
- type Conn
- type ControlFn
- type Controller
- type Listener
- type PacketConn
- type Protector
- type RDial
- func (d *RDial) Accept(network, local string) (Listener, error)
- func (d *RDial) AcceptTCP(network string, local string) (*net.TCPListener, error)
- func (d *RDial) Announce(network, local string) (PacketConn, error)
- func (d *RDial) AnnounceUDP(network, local string) (*net.UDPConn, error)
- func (d *RDial) Dial(network, addr string) (net.Conn, error)
- func (d *RDial) DialContext(_ context.Context, network, addr string) (net.Conn, error)
- func (d *RDial) DialTCP(network string, laddr, raddr *net.TCPAddr) (*net.TCPConn, error)
- func (d *RDial) DialUDP(network string, laddr, raddr *net.UDPAddr) (*net.UDPConn, error)
- type RDialer
Constants ¶
See: ipmap.LookupNetIP; UidSelf -> dnsx.Default; UidSystem -> dnsx.System
Variables ¶
This section is empty.
Functions ¶
func MakeDialer ¶
unused: Creates a dialer that binds to a particular ip.
func MakeListenConfig ¶
func MakeListenConfig(p Protector) *net.ListenConfig
unused: Creates a listener that binds to a particular ip.
func MakeNsDialer ¶
func MakeNsDialer(who string, c Controller) *net.Dialer
Creates a net.Dialer that can bind to any active interface.
func MakeNsListenConfigExt ¶
func MakeNsListenConfigExt(who string, ctl Controller, ext []ControlFn) *net.ListenConfig
Creates a listener that can bind to any active interface, with additional control fns.
func MakeNsListener ¶
func MakeNsListener(who string, c Controller) *net.ListenConfig
Creates a listener that can bind to any active interface.
func NeverResolve ¶
never resolve system/default resolver; expected to have seeded ips
Types ¶
type Controller ¶
type Controller = b.Controller
type PacketConn ¶
type PacketConn = net.PacketConn
type RDial ¶
type RDial struct { Owner string // owner tag Dialer proxy.Dialer // may be nil Listen *net.ListenConfig // may be nil RDialer RDialer // may be nil }
RDial discards local-addresses
func MakeNsRDial ¶
func MakeNsRDial(who string, c Controller) *RDial
Creates a RDial that can bind to any active interface.
func (*RDial) AcceptTCP ¶
AcceptTCP creates a listener on the local address. network must be "tcp" or "tcp4" or "tcp6".
func (*RDial) AnnounceUDP ¶
AnnounceUDP announces the local address. network must be "udp" or "udp4" or "udp6".
func (*RDial) DialContext ¶
type RDialer ¶
type RDialer interface { // Dial creates a connection to the given address, // the resulting net.Conn must be a *net.TCPConn if // network is "tcp" or "tcp4" or "tcp6" and must be // a *net.UDPConn if network is "udp" or "udp4" or "udp6". Dial(network, addr string) (Conn, error) // Announce announces the local address. network must be // packet-oriented ("udp" or "udp4" or "udp6"). Announce(network, local string) (PacketConn, error) // Accept creates a listener on the local address. network // must be stream-oriented ("tcp" or "tcp4" or "tcp6"). Accept(network, local string) (Listener, error) }