From 8c1daeb75faca711bcbeee70925a505ed0f67b6b Mon Sep 17 00:00:00 2001 From: e1732a364fed <75717694+e1732a364fed@users.noreply.github.com> Date: Sat, 1 Jan 2000 00:00:00 +0000 Subject: [PATCH] =?UTF-8?q?=E4=BF=AE=E6=AD=A3=E4=BB=A3=E7=A0=81?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- proxy/tun/route_windows.go | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/proxy/tun/route_windows.go b/proxy/tun/route_windows.go index 4934d05..6980116 100644 --- a/proxy/tun/route_windows.go +++ b/proxy/tun/route_windows.go @@ -25,12 +25,12 @@ func init() { lines := strings.Split(string(out), "\n") for i, l := range lines { if strings.HasPrefix(l, "IPv4 Route Table") { - if i < len(lines)-3 && strings.HasPrefix(lines[i+1], "Network") { + if i < len(lines)-3 && strings.HasPrefix(lines[i+3], "Network") { str := utils.StandardizeSpaces(lines[i+4]) fields := strings.Split(str, " ") if len(fields) > 3 { - routerIP := fields[3] + routerIP := fields[2] if ce := utils.CanLogInfo("auto route: Your router's ip should be"); ce != nil { ce.Write(zap.String("ip", routerIP)) }