Expand description
Which machine a remote pane is connected to, by name and address, for its
stats badge tooltip (blockstats.detail).
- SSH:
ssh -Gsays which host a destination really names (the user’s ssh config applies: an alias’sHostName,Include,Match), and a DNS lookup gives its address. Through aProxyJumpthe address is what this computer resolves the name to, which may be none. - WSL: the distribution’s address on the interface its default route
uses, from
/proc/net/routeand/proc/net/fib_trie, which every distribution has (BusyBox’shostnamehas no-I).
Answers are kept for TTL, failures too, so a tooltip that asks every
few seconds runs ssh or wsl.exe at most once in that time.
Structs§
- Remote
Address - A remote pane’s machine. Either part is
Nonewhen it couldn’t be found.
Constants§
- STEP_
TIMEOUT 🔒 - How long
ssh -G,wsl.exeor a DNS lookup may take. - TTL 🔒
- How long an answer is kept.
Functions§
- linux_
address 🔒 - A Linux machine’s own IPv4 address, from
/proc/net/routefollowed by/proc/net/fib_trie: of its local addresses, the one in a network on the interface the default route uses, else the first that isn’t loopback. WSL also puts its DNS proxy’s address onlo, which this skips. - of
RemoteAddressfor a remote connection, from the cache when it is fresh;Nonefor a local one.- parse_
ssh_ 🔒g hostnameandportfromssh -G’s output.- resolve 🔒
host’s address: itself when it is one, else the first a lookup gives, IPv4 first.- ssh 🔒
- wsl_
address 🔒
Type Aliases§
- Slot 🔒