增加城市/ISP查询接口;WAF增加国家/地区、省份、城市、ISP等参数

This commit is contained in:
GoEdgeLab
2022-01-06 16:24:33 +08:00
parent bf650cc383
commit fe46041dbb
12 changed files with 1174 additions and 91 deletions

View File

@@ -174,7 +174,7 @@ var AllCheckpoints = []*HTTPFirewallCheckpointDefinition{
{
Name: "所有Header信息",
Prefix: "headers",
Description: "使用\n隔开的Header信息字符串",
Description: "使用\\n隔开的Header信息字符串",
IsRequest: true,
},
{
@@ -184,6 +184,34 @@ var AllCheckpoints = []*HTTPFirewallCheckpointDefinition{
IsRequest: true,
HasParams: true,
},
{
Name: "国家/地区名称",
Prefix: "geoCountryName",
Description: "国家/地区名称",
IsRequest: true,
HasParams: false,
},
{
Name: "省份名称",
Prefix: "geoProvinceName",
Description: "中国省份名称",
IsRequest: true,
HasParams: false,
},
{
Name: "城市名称",
Prefix: "geoCityName",
Description: "中国城市名称",
IsRequest: true,
HasParams: false,
},
{
Name: "ISP名称",
Prefix: "ispName",
Description: "ISP名称",
IsRequest: true,
HasParams: false,
},
{
Name: "CC统计",
Prefix: "cc2",
@@ -306,7 +334,7 @@ var AllCheckpoints = []*HTTPFirewallCheckpointDefinition{
},
}
// 查找Checkpoint定义
// FindCheckpointDefinition 查找Checkpoint定义
func FindCheckpointDefinition(prefix string) *HTTPFirewallCheckpointDefinition {
for _, checkpoint := range AllCheckpoints {
if checkpoint.Prefix == prefix {
@@ -316,7 +344,7 @@ func FindCheckpointDefinition(prefix string) *HTTPFirewallCheckpointDefinition {
return nil
}
// 判断Checkpoint是否为组合的
// CheckCheckpointIsComposed 判断Checkpoint是否为组合的
func CheckCheckpointIsComposed(prefix string) bool {
for _, checkpoint := range AllCheckpoints {
if checkpoint.Prefix == prefix {