From 0de0aec22652f4958680476adfb103b3f315afcf Mon Sep 17 00:00:00 2001 From: GoEdgeLab Date: Wed, 26 Oct 2022 10:42:16 +0800 Subject: [PATCH] =?UTF-8?q?=E8=8A=82=E7=82=B9=E8=AE=BE=E7=BD=AE=E4=B8=AD?= =?UTF-8?q?=E5=A2=9E=E5=8A=A0=E2=80=9C=E9=80=9A=E8=BF=87IP=E5=90=8D?= =?UTF-8?q?=E5=8D=95=E2=80=9D=E9=80=89=E9=A1=B9?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- internal/iplibrary/manager_ip_list.go | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/internal/iplibrary/manager_ip_list.go b/internal/iplibrary/manager_ip_list.go index 1fe8a3e..eb68097 100644 --- a/internal/iplibrary/manager_ip_list.go +++ b/internal/iplibrary/manager_ip_list.go @@ -1,6 +1,7 @@ package iplibrary import ( + "github.com/TeaOSLab/EdgeCommon/pkg/nodeconfigs" "github.com/TeaOSLab/EdgeCommon/pkg/rpc/pb" teaconst "github.com/TeaOSLab/EdgeNode/internal/const" "github.com/TeaOSLab/EdgeNode/internal/events" @@ -141,6 +142,12 @@ func (this *IPListManager) init() { } func (this *IPListManager) loop() error { + // 是否同步IP名单 + nodeConfig, _ := nodeconfigs.SharedNodeConfig() + if nodeConfig != nil && !nodeConfig.EnableIPLists { + return nil + } + for { hasNext, err := this.fetch() if err != nil {