* 修改策略编译配置表名称
* 增加对用户自定域协议字段处理
* 修改配置文件,json文件
This commit is contained in:
fengweihao
2019-11-19 10:02:51 +08:00
parent 8cf9453980
commit ba3eb05957
8 changed files with 175 additions and 80 deletions

View File

@@ -9,7 +9,7 @@
"do_blacklist": 1,
"do_log": 1,
"effective_range": 0,
"user_region": "{\"method\":\"redirect\",\"code\":302,\"to\":\"https://www.baidu.com/index.html\"}",
"user_region": "{\"protocol\":\"http\",\"method\":\"redirect\",\"code\":302,\"to\":\"https://www.baidu.com/index.html\"}",
"is_valid": "yes",
"groups": [
{
@@ -35,7 +35,7 @@
"do_blacklist": 1,
"do_log": 1,
"effective_range": 0,
"user_region": "{\"method\":\"block\",\"code\":403,\"message\":\"error\",\"html_profile\":101}",
"user_region": "{\"protocol\":\"http\",\"method\":\"block\",\"code\":403,\"message\":\"error\",\"html_profile\":101}",
"is_valid": "yes",
"groups": [
{
@@ -61,7 +61,7 @@
"do_blacklist": 1,
"do_log": 1,
"effective_range": 0,
"user_region": "{\"method\":\"block\",\"code\":403,\"message\":\"error\",\"html_profile\":102}",
"user_region": "{\"protocol\":\"http\",\"method\":\"block\",\"code\":403,\"message\":\"error\",\"html_profile\":102}",
"is_valid": "yes",
"groups": [
{
@@ -87,7 +87,7 @@
"do_blacklist": 1,
"do_log": 1,
"effective_range": 0,
"user_region": "{\"method\":\"replace\",\"rules\":[{\"search_in\":\"http_resp_body\",\"find\":\"比特币\",\"replace_with\":\"硬币\"}]}",
"user_region": "{\"protocol\":\"http\",\"method\":\"replace\",\"rules\":[{\"search_in\":\"http_resp_body\",\"find\":\"比特币\",\"replace_with\":\"硬币\"}]}",
"is_valid": "yes",
"groups": [
{
@@ -113,7 +113,7 @@
"do_blacklist": 1,
"do_log": 1,
"effective_range": 0,
"user_region": "{\"method\":\"hijack\",\"hijack_profile\":201}",
"user_region": "{\"protocol\":\"http\",\"method\":\"hijack\",\"hijack_profile\":201}",
"is_valid": "yes",
"groups": [
{
@@ -139,7 +139,7 @@
"do_blacklist": 1,
"do_log": 1,
"effective_range": 0,
"user_region": "{\"method\":\"hijack\",\"hijack_profile\":201}",
"user_region": "{\"protocol\":\"http\",\"method\":\"hijack\",\"hijack_profile\":201}",
"is_valid": "yes",
"groups": [
{
@@ -165,7 +165,7 @@
"do_blacklist": 1,
"do_log": 1,
"effective_range": 0,
"user_region": "{\"method\":\"hijack\",\"hijack_profile\":202}",
"user_region": "{\"protocol\":\"http\",\"method\":\"hijack\",\"hijack_profile\":202}",
"is_valid": "yes",
"groups": [
{
@@ -191,7 +191,7 @@
"do_blacklist": 1,
"do_log": 1,
"effective_range": 0,
"user_region": "{\"method\":\"insert\",\"insert_profile\":302}",
"user_region": "{\"protocol\":\"http\",\"method\":\"insert\",\"insert_profile\":302}",
"is_valid": "yes",
"groups": [
{
@@ -217,7 +217,7 @@
"do_blacklist": 1,
"do_log": 1,
"effective_range": 0,
"user_region": "{\"method\":\"insert\",\"insert_profile\":303,\"position\":\"after-page-load\"}",
"user_region": "{\"protocol\":\"http\",\"method\":\"insert\",\"insert_profile\":303,\"position\":\"after-page-load\"}",
"is_valid": "yes",
"groups": [
{
@@ -243,7 +243,7 @@
"do_blacklist": 1,
"do_log": 1,
"effective_range": 0,
"user_region": "{\"method\":\"insert\",\"insert_profile\":303,\"position\":\"before-page-load\"}",
"user_region": "{\"protocol\":\"http\",\"method\":\"insert\",\"insert_profile\":303,\"position\":\"before-page-load\"}",
"is_valid": "yes",
"groups": [
{
@@ -269,7 +269,7 @@
"do_blacklist": 1,
"do_log": 1,
"effective_range": 0,
"user_region": "{\"method\":\"replace\",\"rules\":[{\"search_in\":\"http_req_uri\",\"find\":\"(?<=\\\\\\?|^|&)q=([^&|^#]*)(?=&|$)\",\"replace_with\":\"q=find\"},{\"search_in\":\"http_req_uri\",\"find\":\"(?<=\\\\\\?|^|&)ei=([^&|^#]*)(?=&|$)\",\"replace_with\":\"ei=chaxun\"}]}",
"user_region": "{\"protocol\":\"http\",\"method\":\"replace\",\"rules\":[{\"search_in\":\"http_req_uri\",\"find\":\"(?<=\\\\\\?|^|&)q=([^&|^#]*)(?=&|$)\",\"replace_with\":\"q=find\"},{\"search_in\":\"http_req_uri\",\"find\":\"(?<=\\\\\\?|^|&)ei=([^&|^#]*)(?=&|$)\",\"replace_with\":\"ei=chaxun\"}]}",
"is_valid": "yes",
"groups": [
{
@@ -300,23 +300,23 @@
{
"table_name": "PXY_PROFILE_HIJACK_FILES",
"table_content": [
"201\tchakanqi-947KB.exe\tapplication/x-msdos-program\t./resource/pangu/policy_file/chakanqi-947KB.exe\t1",
"202\tWPS8648-132M.exe\tapplication/x-msdos-program\t./resource/pangu/policy_file/WPS8648-132M.exe\t1"
"201\tchakanqi\tchakanqi-947KB.exe\tapplication/x-msdos-program\t./resource/pangu/policy_file/chakanqi-947KB.exe\t1",
"202\tWPS8648\tWPS8648-132M.exe\tapplication/x-msdos-program\t./resource/pangu/policy_file/WPS8648-132M.exe\t1"
]
},
{
"table_name": "PXY_PROFILE_INSERT_SCRIPTS",
"table_content": [
"301\ttime\tjs\t./resource/pangu/policy_file/time.js\t1",
"302\tu1\tcss\t./resource/pangu/policy_file/u1.css\t1",
"303\tu1\tjs\t./resource/pangu/policy_file/alert.js\t1"
"301\ttime\tjs\t./resource/pangu/policy_file/time.js\tbefore_page_load\t1",
"302\tu1\tcss\t./resource/pangu/policy_file/u1.css\tbefore_page_load\t1",
"303\tu1\tjs\t./resource/pangu/policy_file/alert.js\tbefore_page_load\t1"
]
},
{
"table_name": "PXY_INTERCEPT_COMPILE",
"table_name": "TSG_SECURITY_COMPILE",
"table_content": [
"0\t0\t2\t1\t1\t{}\t{\"keyring\":765,\"dynamic_bypass\":{\"ev_cert\":0,\"cert_transparency\":0,\"mutual_authentication\":1,\"cert_pinning\":1,\"protocol_errors\":1},\"certificate_checks\":{\"approach\":{\"cn\":1,\"issuer\":1,\"self-signed\":1,\"expiration\":0},\"fail_action\":\"pass-through\"},\"protocol_version\":{\"min\":\"ssl3\",\"max\":\"ssl3\",\"mirror_client\":1,\"allow_http2\":1},\"decrypt_mirror\":{\"enable\":0}}\t1\t2",
"1\t0\t2\t1\t1\t{}\t{\"keyring\":0,\"dynamic_bypass\":{\"ev_cert\":0,\"cert_transparency\":0,\"mutual_authentication\":1,\"cert_pinning\":1},\"certificate_checks\":{\"approach\":{\"cn\":1,\"issuer\":1,\"self-signed\":1,\"expiration\":1},\"fail_action\":\"pass-through\"},\"protocol_version\":{\"min\":\"ssl3\",\"max\":\"tls13\",\"mirror_client\":1},\"decrypt_mirror\":{\"enable\":1,\"mirror_profile\":4}}\t1\t2"
"0\t0\t2\t1\t1\t{}\t{\"protocol\":\"SSL/HTTP\",\"keyring\":765,\"dynamic_bypass\":{\"ev_cert\":0,\"cert_transparency\":0,\"mutual_authentication\":1,\"cert_pinning\":1,\"protocol_errors\":1},\"certificate_checks\":{\"approach\":{\"cn\":1,\"issuer\":1,\"self-signed\":1,\"expiration\":0},\"fail_action\":\"pass-through\"},\"protocol_version\":{\"min\":\"ssl3\",\"max\":\"ssl3\",\"mirror_client\":1,\"allow_http2\":1},\"decrypt_mirror\":{\"enable\":0}}\t1\t2",
"1\t0\t2\t1\t1\t{}\t{\"protocol\":\"SSL/HTTP\",\"keyring\":0,\"dynamic_bypass\":{\"ev_cert\":0,\"cert_transparency\":0,\"mutual_authentication\":1,\"cert_pinning\":1},\"certificate_checks\":{\"approach\":{\"cn\":1,\"issuer\":1,\"self-signed\":1,\"expiration\":1},\"fail_action\":\"pass-through\"},\"protocol_version\":{\"min\":\"ssl3\",\"max\":\"tls13\",\"mirror_client\":1},\"decrypt_mirror\":{\"enable\":1,\"mirror_profile\":4}}\t1\t2"
]
}
]

View File

@@ -42,5 +42,5 @@
16 PXY_PROFILE_RESPONSE_PAGES plugin {"key":1,"foreign":"4","valid":5}
17 PXY_PROFILE_HIJACK_FILES plugin {"key":1,"foreign":"5","valid":6}
18 PXY_PROFILE_INSERT_SCRIPTS plugin {"key":1,"foreign":"4","valid":6}
19 PXY_INTERCEPT_COMPILE plugin {"key":1,"valid":8}
19 TSG_SECURITY_COMPILE plugin {"key":1,"valid":8}
20 PXY_PROFILE_TRAFFIC_MIRROR plugin {"key":1,"valid":4}

View File

@@ -15,5 +15,5 @@
#
#For expr/expr_plus Table
#id name type src_charset dst_charset do_merge cross_cache quick_mode
0 PXY_INTERCEPT_COMPILE plugin {"key":1,"valid":8}
0 TSG_SECURITY_COMPILE plugin {"key":1,"valid":8}
1 PXY_PROFILE_TRAFFIC_MIRROR plugin {"key":1,"valid":4}