实现网络数据包相关统计(商业版本)

This commit is contained in:
GoEdgeLab
2023-10-26 17:18:42 +08:00
parent 616136cb19
commit 7b1b7a9f58
4 changed files with 30 additions and 7 deletions

View File

@@ -146,12 +146,12 @@ func (this *Node) Start() {
remotelogs.Println("NODE", "init config ...")
err = this.syncConfig(0)
if err != nil {
_, err := nodeconfigs.SharedNodeConfig()
_, err = nodeconfigs.SharedNodeConfig()
if err != nil {
// 无本地数据时,会尝试多次读取
tryTimes := 0
for {
err := this.syncConfig(0)
err = this.syncConfig(0)
if err != nil {
tryTimes++

View File

@@ -97,6 +97,8 @@ func (this *Node) execTask(rpcClient *rpc.RPCClient, task *pb.NodeTask) error {
err = this.notifyPlusChange()
case "toaChanged":
err = this.execTOAChangedTask()
case "networkSecurityPolicyChanged":
err = this.execNetworkSecurityPolicyChangedTask(rpcClient)
default:
// 特殊任务
if strings.HasPrefix(task.Type, "ipListDeleted") { // 删除IP名单

View File

@@ -29,3 +29,8 @@ func (this *Node) execHTTPPagesPolicyChangedTask(rpcClient *rpc.RPCClient) error
// stub
return nil
}
func (this *Node) execNetworkSecurityPolicyChangedTask(rpcClient *rpc.RPCClient) error {
// stub
return nil
}