From c7a890f8c817daef8f753d3c47efdfd5521a4f8f Mon Sep 17 00:00:00 2001 From: "zhiqiang.wang" Date: Tue, 21 Jun 2022 11:11:02 +0800 Subject: [PATCH] fix: https://github.com/cppla/ServerStatus/issues/176#issuecomment-1161143160 --- client/base.go | 4 ++-- client/client.go | 2 +- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/client/base.go b/client/base.go index a38fa5a..cb26ae1 100644 --- a/client/base.go +++ b/client/base.go @@ -81,7 +81,6 @@ func (c *Client) getTraffic(ret *update) { var inters = []string{ "lo", - "eth", "tun", "docker", "veth", @@ -93,7 +92,8 @@ func (c *Client) getTraffic(ret *update) { for _, info := range items { for _, v := range inters { - if !strings.Contains(info.Name, v) { + if strings.Contains(info.Name, v) { + continue } diff --git a/client/client.go b/client/client.go index 0f3b1e0..818d923 100644 --- a/client/client.go +++ b/client/client.go @@ -12,7 +12,7 @@ import ( "time" ) -const Version = 0.13 +const Version = 0.14 const DefaultServer = "127.0.0.1" const DefaultPort = 35601 const DefaultInterval = 1