From abfd73f569e7205f46e2f9d88d5e0f3bab3a1bd1 Mon Sep 17 00:00:00 2001 From: David Anderson Date: Wed, 24 Feb 2021 20:06:15 -0800 Subject: [PATCH] ipn: print currently selected exit route in Prefs.String(). Signed-off-by: David Anderson --- ipn/prefs.go | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/ipn/prefs.go b/ipn/prefs.go index 7b4a5562c..ced33f23f 100644 --- a/ipn/prefs.go +++ b/ipn/prefs.go @@ -168,6 +168,11 @@ func (p *Prefs) pretty(goos string) string { if p.ShieldsUp { sb.WriteString("shields=true ") } + if !p.ExitNodeIP.IsZero() { + fmt.Fprintf(&sb, "exit=%v ", p.ExitNodeIP) + } else if !p.ExitNodeID.IsZero() { + fmt.Fprintf(&sb, "exit=%v ", p.ExitNodeID) + } if len(p.AdvertiseRoutes) > 0 || goos == "linux" { fmt.Fprintf(&sb, "routes=%v ", p.AdvertiseRoutes) }