proxymap
packageThis package is not in the latest version of its module.
Details
Validgo.mod file
The Go module system was introduced in Go 1.11 and is the official dependency management solution for Go.
Redistributable license
Redistributable licenses place minimal restrictions on how software can be used, modified, and redistributed.
Tagged version
Modules with tagged versions give importers more predictable builds.
Stable version
When a project reaches major version v1 it is considered stable.
- Learn more about best practices
Repository
Links
Documentation¶
Overview¶
Package proxymap contains a mapping table for ephemeral localhost ports usedby tailscaled on behalf of remote Tailscale IPs for proxied connections.
Index¶
- type Mapper
- func (m *Mapper) RegisterIPPortIdentity(proto string, ipport netip.AddrPort, tsIP netip.Addr) error
- func (m *Mapper) String() string
- func (m *Mapper) UnregisterIPPortIdentity(proto string, ipport netip.AddrPort)
- func (m *Mapper) WhoIsIPPort(proto string, ipport netip.AddrPort) (tsIP netip.Addr, ok bool)
Constants¶
This section is empty.
Variables¶
This section is empty.
Functions¶
This section is empty.
Types¶
typeMapper¶
type Mapper struct {// contains filtered or unexported fields}Mapper tracks which localhost ip:ports correspond to which remote TailscaleIPs for connections proxied by tailscaled.
This is then used (via the WhoIsIPPort method) by localhost applications toask tailscaled (via the LocalAPI WhoIs method) the Tailscale identity that agiven localhost:port corresponds to.
func (*Mapper)RegisterIPPortIdentity¶
RegisterIPPortIdentity registers a given node (identified by itsTailscale IP) as temporarily having the given IP:port for whois lookups.
The IP:port is generally a localhost IP and an ephemeral port, usedwhile proxying connections to localhost when tailscaled is runningin netstack mode.
The proto is the network protocol that is being proxied; it must be "tcp" or"udp" (not e.g. "tcp4", "udp6", etc.)
func (*Mapper)String¶added inv1.74.0
String returns a human-readable representation of the current mappings.
func (*Mapper)UnregisterIPPortIdentity¶
UnregisterIPPortIdentity removes a temporary IP:port registrationmade previously by RegisterIPPortIdentity.