mirror of
https://github.com/TeaOSLab/EdgeNode.git
synced 2025-12-28 08:26:35 +08:00
实现网络数据包相关统计(商业版本)
This commit is contained in:
@@ -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++
|
||||
|
||||
|
||||
@@ -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名单
|
||||
|
||||
@@ -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
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user