改进流量限制

This commit is contained in:
刘祥超
2021-11-10 14:39:13 +08:00
parent fd4dbb6fe6
commit 698d1b697c
3 changed files with 29 additions and 12 deletions

View File

@@ -363,3 +363,8 @@ func (this *ServerConfig) FindAndCheckReverseProxy(dataType string) (*ReversePro
return nil, errors.New("invalid data type:'" + dataType + "'")
}
}
// ShouldCheckTrafficLimit 检查是否需要检查流量限制
func (this *ServerConfig) ShouldCheckTrafficLimit() bool {
return this.TrafficLimit != nil && !this.TrafficLimit.IsEmpty()
}