diff --git a/plugin/business/pangu-http/src/pangu_http.cpp b/plugin/business/pangu-http/src/pangu_http.cpp index a9f77e2..5dda782 100644 --- a/plugin/business/pangu-http/src/pangu_http.cpp +++ b/plugin/business/pangu-http/src/pangu_http.cpp @@ -57,6 +57,7 @@ enum scan_table { PXY_CTRL_IP, PXY_CTRL_HTTP_URL, + PXY_CTRL_HTTP_FQDN, PXY_CTRL_HTTP_REQ_HDR, PXY_CTRL_HTTP_REQ_BODY, PXY_CTRL_HTTP_RES_HDR, @@ -788,6 +789,7 @@ int pangu_policy_init(const char* profile_path, const char* static_section, cons const char * table_name[__SCAN_TABLE_MAX]; table_name[PXY_CTRL_IP] = "PXY_CTRL_IP"; table_name[PXY_CTRL_HTTP_URL] = "PXY_CTRL_HTTP_URL"; + table_name[PXY_CTRL_HTTP_FQDN] = "TSG_OBJ_FQDN"; table_name[PXY_CTRL_HTTP_REQ_HDR] = "PXY_CTRL_HTTP_REQ_HDR"; table_name[PXY_CTRL_HTTP_REQ_BODY] = "TSG_OBJ_CONTENT"; table_name[PXY_CTRL_HTTP_RES_HDR] = "PXY_CTRL_HTTP_RES_HDR"; @@ -1857,7 +1859,7 @@ enum pangu_action http_scan(const struct tfe_http_session * session, enum tfe_ht const char *str_host = session->req->req_spec.host; int str_host_length = (int) (strlen(session->req->req_spec.host)); - scan_ret = Maat_full_scan_string(g_pangu_rt->maat, g_pangu_rt->scan_table_id[PXY_CTRL_HTTP_URL], + scan_ret = Maat_full_scan_string(g_pangu_rt->maat, g_pangu_rt->scan_table_id[PXY_CTRL_HTTP_FQDN], CHARSET_UTF8, str_host, str_host_length, result, NULL, MAX_SCAN_RESULT, &(ctx->scan_mid), ctx->thread_id); if (scan_ret > 0) { diff --git a/resource/pangu/table_info.conf b/resource/pangu/table_info.conf index 98224b9..b7080f7 100644 --- a/resource/pangu/table_info.conf +++ b/resource/pangu/table_info.conf @@ -22,22 +22,23 @@ 2 TSG_OBJ_IP_ADDR ip_plus --- 3 PXY_CTRL_HTTP_URL expr UTF8 GBK/UNICODE/UTF8/url_encode_gb2312/url_encode_utf8 yes 0 quickoff 3 TSG_OBJ_URL expr UTF8 GBK/UNICODE/UTF8/url_encode_gb2312/url_encode_utf8 yes 0 quickoff -4 PXY_CTRL_HTTP_REQ_HDR expr_plus UTF8 UTF8 yes 0 quickoff -4 TSG_OBJ_REQ_HDR expr_plus UTF8 UTF8 yes 0 quickoff -5 PXY_CTRL_HTTP_REQ_BODY expr UTF8 GBK/UNICODE/UTF8 yes 128 quickoff -6 PXY_CTRL_HTTP_RES_HDR expr_plus UTF8 UTF8 UTF8 yes 0 quickoff -6 TSG_OBJ_RES_HDR expr_plus UTF8 UTF8 yes 0 quickoff -7 PXY_CTRL_HTTP_RES_BODY expr UTF8 GBK/UNICODE/UTF8 yes 128 quickoff -7 TSG_OBJ_CONTENT expr UTF8 GBK/UNICODE/UTF8 yes 128 quickoff -8 PXY_CTRL_SUBSCRIBE_ID expr UTF8 UTF8 yes 0 quickon -9 PXY_CACHE_COMPILE compile escape -- -10 PXY_CACHE_GROUP group -- -11 PXY_CACHE_HTTP_URL expr UTF8 UTF8 yes 0 quickoff -12 PXY_CACHE_HTTP_COOKIE expr UTF8 UTF8 yes 0 quickoff -13 PXY_PROFILE_TRUSTED_CA_CERT plugin {"key":1,"valid":4,"foreign":"3"} -14 PXY_OBJ_TRUSTED_CA_CRL plugin {"valid":4,"foreign":"3"} -15 PXY_PROFILE_RESPONSE_PAGES plugin {"key":1,"foreign":"4","valid":5} -16 PXY_PROFILE_HIJACK_FILES plugin {"key":1,"foreign":"5","valid":6} -17 PXY_PROFILE_INSERT_SCRIPTS plugin {"key":1,"foreign":"4","valid":5} -18 PXY_INTERCEPT_COMPILE plugin {"key":1,"valid":8} -19 PXY_PROFILE_TRAFFIC_MIRROR plugin {"key":1,"valid":4} +4 TSG_OBJ_FQDN expr UTF8 GBK/UNICODE/UTF8/url_encode_gb2312/url_encode_utf8 yes 0 quickoff +5 PXY_CTRL_HTTP_REQ_HDR expr_plus UTF8 UTF8 yes 0 quickoff +5 TSG_OBJ_REQ_HDR expr_plus UTF8 UTF8 yes 0 quickoff +6 PXY_CTRL_HTTP_REQ_BODY expr UTF8 GBK/UNICODE/UTF8 yes 128 quickoff +7 PXY_CTRL_HTTP_RES_HDR expr_plus UTF8 UTF8 yes 0 quickoff +7 TSG_OBJ_RES_HDR expr_plus UTF8 UTF8 yes 0 quickoff +8 PXY_CTRL_HTTP_RES_BODY expr UTF8 GBK/UNICODE/UTF8 yes 128 quickoff +8 TSG_OBJ_CONTENT expr UTF8 GBK/UNICODE/UTF8 yes 128 quickoff +9 PXY_CTRL_SUBSCRIBE_ID expr UTF8 UTF8 yes 0 quickon +10 PXY_CACHE_COMPILE compile escape -- +11 PXY_CACHE_GROUP group -- +12 PXY_CACHE_HTTP_URL expr UTF8 UTF8 yes 0 quickoff +13 PXY_CACHE_HTTP_COOKIE expr UTF8 UTF8 yes 0 quickoff +14 PXY_PROFILE_TRUSTED_CA_CERT plugin {"key":1,"valid":4,"foreign":"3"} +15 PXY_OBJ_TRUSTED_CA_CRL plugin {"valid":4,"foreign":"3"} +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":5} +19 PXY_INTERCEPT_COMPILE plugin {"key":1,"valid":8} +20 PXY_PROFILE_TRAFFIC_MIRROR plugin {"key":1,"valid":4}