Optimize:使用Utarray存储library命中路径, 优化Tunnel命中路径的合并, 增加测试用例的CI构建
This commit is contained in:
101
test/resource/VerifyPolicyManipulation.json
Normal file
101
test/resource/VerifyPolicyManipulation.json
Normal file
@@ -0,0 +1,101 @@
|
||||
{
|
||||
"compile_table": "PXY_CTRL_COMPILE",
|
||||
"group2compile_table": "GROUP_PXY_CTRL_COMPILE_RELATION",
|
||||
"group2group_table": "GROUP_GROUP_RELATION",
|
||||
"rules": [
|
||||
{
|
||||
"compile_id": 1021,
|
||||
"service": 1,
|
||||
"action": 48,
|
||||
"do_blacklist": 1,
|
||||
"do_log": 1,
|
||||
"effective_range": 0,
|
||||
"tags":"anything",
|
||||
"user_region": "anything",
|
||||
"is_valid": "yes",
|
||||
"groups": [
|
||||
{
|
||||
"not_flag": 0,
|
||||
"group_id": 101,
|
||||
"group_name":"IPv4TCPSoureVeiryPolicy01",
|
||||
"virtual_table": "ATTR_SOURCE_IP",
|
||||
"regions": [
|
||||
{
|
||||
"table_type": "ip",
|
||||
"table_name": "TSG_OBJ_IP_ADDR",
|
||||
"table_content": {
|
||||
"addr_type": "ipv4",
|
||||
"addr_format": "range",
|
||||
"ip1": "192.168.0.1",
|
||||
"ip2": "192.168.0.1"
|
||||
}
|
||||
}
|
||||
]
|
||||
}
|
||||
]
|
||||
},
|
||||
{
|
||||
"compile_id": 1022,
|
||||
"service": 1,
|
||||
"action": 48,
|
||||
"do_blacklist": 1,
|
||||
"do_log": 1,
|
||||
"effective_range": 0,
|
||||
"tags":"anything",
|
||||
"user_region": "anything",
|
||||
"is_valid": "yes",
|
||||
"groups": [
|
||||
{
|
||||
"group_id": 11,
|
||||
"group_name": "IPv4TCPSoureEntry.11",
|
||||
"virtual_table": "ATTR_SOURCE_IP"
|
||||
},
|
||||
{
|
||||
"group_id": 12,
|
||||
"group_name": "IPv4TCPSoureEntry.12",
|
||||
"virtual_table": "ATTR_INTERNAL_IP"
|
||||
},
|
||||
{
|
||||
"group_id": 1,
|
||||
"group_name": "FQDNEntry.1",
|
||||
"virtual_table": "ATTR_SERVER_FQDN"
|
||||
}
|
||||
]
|
||||
}
|
||||
],
|
||||
"plugin_table": [
|
||||
{
|
||||
"table_name": "FQDN_ENTRY",
|
||||
"table_content": [
|
||||
"1\t1\twww.126.com\t1\t1",
|
||||
"2\t2,3\twww.baidu.com\t1\t1",
|
||||
"4\t4,5,6\twww.qq.com\t1\t1"
|
||||
]
|
||||
},
|
||||
{
|
||||
"table_name": "IP_ADDR_ENTRY",
|
||||
"table_content": [
|
||||
"1\t11\t4\tsingle\t192.168.1.1\t192.168.1.1\t1",
|
||||
"2\t12,13\t4\tsingle\t192.168.1.2\t192.168.1.2\t1",
|
||||
"4\t14,15,16\t4\trange\t192.168.1.3\t192.168.1.3\t1"
|
||||
]
|
||||
},
|
||||
{
|
||||
"table_name": "LIBRARY_TAG",
|
||||
"table_content": [
|
||||
"1\tnone\twebsite_category\tfqdn1\tsearch\\bengines\t1",
|
||||
"2\tnone\twebsite_category\tfqdn2\tRecreation\band\bHobbies\t1",
|
||||
"3\tnone\twebsite_category\tfqdn3\tbusiness\t1",
|
||||
"4\tnone\twebsite_category\tfqdn4\tsearch bengines\t1",
|
||||
"5\tnone\twebsite_category\tfqdn5\tsearch\\bengines\t1",
|
||||
"6\tnone\twebsite_category\tfqdn6\tsearch\\bengines\t1",
|
||||
"11\tnone\tgeoip\tadministrative_area\tColombia.Departamento\bdel\bVaupes\t1",
|
||||
"12\tnone\tgeoip\tadministrative_area\tColombia.Departamento\bdel\bVaupes.Mitú\t1",
|
||||
"13\tnone\tgeoip\tadministrative_area\tColombia.Antioquia.Marinilla\t1",
|
||||
"14\tnone\tgeoip\tsuper_administrative_area\tColombia.Departamento\bdel\bVaupes\t1",
|
||||
"15\tnone\tgeoip\tadministrative_area\tGermany.Bavaria.Mauern\t1",
|
||||
"16\tnone\tgeoip\tadministrative_area\tGermany.Bavaria.Mellrichstadt\t1"
|
||||
]
|
||||
}
|
||||
]
|
||||
}
|
||||
Reference in New Issue
Block a user