From a06382cebc913093eded9d6174adc7ebcae53ccb Mon Sep 17 00:00:00 2001 From: "Maze.tsz" Date: Mon, 27 Dec 2021 06:44:17 +0800 Subject: [PATCH] [test] --- config/config.go | 2 +- listener/tun/dev/dev.go | 2 ++ 2 files changed, 3 insertions(+), 1 deletion(-) diff --git a/config/config.go b/config/config.go index d9dcf9fe..92d5e0b0 100644 --- a/config/config.go +++ b/config/config.go @@ -208,7 +208,7 @@ func UnmarshalRawConfig(buf []byte) (*RawConfig, error) { ProxyGroup: []map[string]interface{}{}, Tun: Tun{ Enable: false, - Stack: "lwip", + Stack: "gvisor", DNSListen: "0.0.0.0:53", AutoRoute: true, }, diff --git a/listener/tun/dev/dev.go b/listener/tun/dev/dev.go index 13dca8d5..4df41cba 100644 --- a/listener/tun/dev/dev.go +++ b/listener/tun/dev/dev.go @@ -21,6 +21,7 @@ type TunDevice interface { func SetLinuxAutoRoute() { log.Infoln("Tun adapter auto setting global route") + addLinuxSystemRoute("0") addLinuxSystemRoute("1") addLinuxSystemRoute("2/7") addLinuxSystemRoute("4/6") @@ -34,6 +35,7 @@ func SetLinuxAutoRoute() { func RemoveLinuxAutoRoute() { log.Infoln("Tun adapter removing global route") + delLinuxSystemRoute("0") delLinuxSystemRoute("1") delLinuxSystemRoute("2/7") delLinuxSystemRoute("4/6")