wgengine/router_windows: support toggling local lan access when using

exit nodes.

Signed-off-by: Maisem Ali <maisem@tailscale.com>
This commit is contained in:
Maisem Ali
2021-06-16 08:53:08 -07:00
committed by David Crawshaw
parent c37713b927
commit ec52760a3d
3 changed files with 77 additions and 44 deletions

View File

@@ -2108,7 +2108,7 @@ func (b *LocalBackend) routerConfig(cfg *wgcfg.Config, prefs *ipn.Prefs) *router
if !default6 {
rs.Routes = append(rs.Routes, ipv6Default)
}
if runtime.GOOS == "linux" || runtime.GOOS == "darwin" {
if runtime.GOOS == "linux" || runtime.GOOS == "darwin" || runtime.GOOS == "windows" {
// Only allow local lan access on linux machines for now.
ips, _, err := interfaceRoutes()
if err != nil {