diff options
author | Jason A. Donenfeld <Jason@zx2c4.com> | 2021-06-17 22:54:59 +0200 |
---|---|---|
committer | Jason A. Donenfeld <Jason@zx2c4.com> | 2021-06-18 11:39:38 +0200 |
commit | 96e5d80a3e8c2b874b321bc5918971f8ea63d2c6 (patch) | |
tree | 71ca822435f2f0941b9969a9583cd1d07320f6a3 /ui/confview.go | |
parent | global: go fmt for 1.17 build tags (diff) | |
download | wireguard-windows-96e5d80a3e8c2b874b321bc5918971f8ea63d2c6.tar.xz wireguard-windows-96e5d80a3e8c2b874b321bc5918971f8ea63d2c6.zip |
tunnel: support turning off automatic routing table
This supports the familiar "Table = off" syntax as on Linux, and then
interprets other valid values as simply "on".
Signed-off-by: Jason A. Donenfeld <Jason@zx2c4.com>
Diffstat (limited to 'ui/confview.go')
-rw-r--r-- | ui/confview.go | 8 |
1 files changed, 8 insertions, 0 deletions
diff --git a/ui/confview.go b/ui/confview.go index cc3bcad9..3d16f38f 100644 --- a/ui/confview.go +++ b/ui/confview.go @@ -51,6 +51,7 @@ type interfaceView struct { addresses *labelTextLine dns *labelTextLine scripts *labelTextLine + table *labelTextLine toggleActive *toggleActiveLine lines []widgetsLine } @@ -307,6 +308,7 @@ func newInterfaceView(parent walk.Container) (*interfaceView, error) { {l18n.Sprintf("Addresses:"), &iv.addresses}, {l18n.Sprintf("DNS servers:"), &iv.dns}, {l18n.Sprintf("Scripts:"), &iv.scripts}, + {l18n.Sprintf("Table:"), &iv.table}, } if iv.lines, err = createLabelTextLines(items, parent, &disposables); err != nil { return nil, err @@ -427,6 +429,12 @@ func (iv *interfaceView) apply(c *conf.Interface) { } else { iv.scripts.hide() } + + if c.TableOff { + iv.table.show(l18n.Sprintf("off")) + } else { + iv.table.hide() + } } func (pv *peerView) widgetsLines() []widgetsLine { |