mirror of
https://github.com/tailscale/tailscale.git
synced 2025-10-10 00:51:07 +00:00
client, cmd/hello, ipn, wgengine: fix whois for netstack-forwarded connections
Updates #504 Updates #707 Signed-off-by: Naman Sood <mail@nsood.in>
This commit is contained in:
@@ -137,4 +137,17 @@ type Engine interface {
|
||||
// Ping is a request to start a discovery ping with the peer handling
|
||||
// the given IP and then call cb with its ping latency & method.
|
||||
Ping(ip netaddr.IP, cb func(*ipnstate.PingResult))
|
||||
|
||||
// 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.
|
||||
RegisterIPPortIdentity(netaddr.IPPort, netaddr.IP)
|
||||
|
||||
// UnregisterIPPortIdentity removes a temporary IP:port registration.
|
||||
UnregisterIPPortIdentity(netaddr.IPPort)
|
||||
|
||||
// WhoIsIPPort looks up an IP:port in the temporary registrations,
|
||||
// and returns a matching Tailscale IP, if it exists.
|
||||
WhoIsIPPort(netaddr.IPPort) (netaddr.IP, bool)
|
||||
}
|
||||
|
Reference in New Issue
Block a user