Documentation ¶
Overview ¶
Package proxymap contains a mapping table for ephemeral localhost ports used by 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 ¶
type Mapper ¶
type Mapper struct {
// contains filtered or unexported fields
}
Mapper tracks which localhost ip:ports correspond to which remote Tailscale IPs for connections proxied by tailscaled.
This is then used (via the WhoIsIPPort method) by localhost applications to ask tailscaled (via the LocalAPI WhoIs method) the Tailscale identity that a given localhost:port corresponds to.
func (*Mapper) RegisterIPPortIdentity ¶
RegisterIPPortIdentity registers a given node (identified by its Tailscale IP) as temporarily having the given IP:port for whois lookups.
The IP:port is generally a localhost IP and an ephemeral port, used while proxying connections to localhost when tailscaled is running in 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 in v1.74.0
String returns a human-readable representation of the current mappings.
func (*Mapper) UnregisterIPPortIdentity ¶
UnregisterIPPortIdentity removes a temporary IP:port registration made previously by RegisterIPPortIdentity.