Skip to main content

linux_address

Function linux_address 

Source
fn linux_address(out: &str) -> Option<String>
Expand description

A Linux machine’s own IPv4 address, from /proc/net/route followed 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 on lo, which this skips.