From 66c48a57776f905f2531d58744f09e8f1c81110d Mon Sep 17 00:00:00 2001 From: dyhkwong <50692134+dyhkwong@users.noreply.github.com> Date: Fri, 4 Nov 2022 20:14:41 +0800 Subject: [PATCH] move WFP manipulation to strict route --- tun_windows.go | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/tun_windows.go b/tun_windows.go index 7d2c23e..e73264d 100644 --- a/tun_windows.go +++ b/tun_windows.go @@ -154,7 +154,7 @@ func (t *NativeTun) configure() error { } } - if t.options.AutoRoute { + if t.options.AutoRoute && t.options.StrictRoute { var engine uintptr session := &winsys.FWPM_SESSION0{Flags: winsys.FWPM_SESSION_FLAG_DYNAMIC} err := winsys.FwpmEngineOpen0(nil, winsys.RPC_C_AUTHN_DEFAULT, nil, session, unsafe.Pointer(&engine))