Movatterモバイル変換


[0]ホーム

URL:


proxymap

package
v1.92.3Latest Latest
Warning

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

Go to latest
Published: Dec 16, 2025 License:BSD-3-ClauseImports:6Imported by:2

Details

Repository

github.com/tailscale/tailscale

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

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

func (m *Mapper) RegisterIPPortIdentity(protostring, ipportnetip.AddrPort, tsIPnetip.Addr)error

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)Stringadded inv1.74.0

func (m *Mapper) String()string

String returns a human-readable representation of the current mappings.

func (*Mapper)UnregisterIPPortIdentity

func (m *Mapper) UnregisterIPPortIdentity(protostring, ipportnetip.AddrPort)

UnregisterIPPortIdentity removes a temporary IP:port registrationmade previously by RegisterIPPortIdentity.

func (*Mapper)WhoIsIPPort

func (m *Mapper) WhoIsIPPort(protostring, ipportnetip.AddrPort) (tsIPnetip.Addr, okbool)

WhoIsIPPort looks up an IP:port in the temporary registrations,and returns a matching Tailscale IP, if it exists.

Source Files

View all Source files

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f orF : Jump to
y orY : Canonical URL
go.dev uses cookies from Google to deliver and enhance the quality of its services and to analyze traffic.Learn more.

[8]ページ先頭

©2009-2025 Movatter.jp