diff options
| author | fengweihao <[email protected]> | 2024-01-03 17:26:20 +0800 |
|---|---|---|
| committer | fengweihao <[email protected]> | 2024-01-03 17:26:20 +0800 |
| commit | 058a5e6e6674cdc243ca4e32b3d726c9ff5c0266 (patch) | |
| tree | b57aa4d82a84ede10636049beb9de700b9658157 /plugin | |
| parent | cbd98507a21d59ceab7e66cf6dfb3a851571d7aa (diff) | |
TSG-18177 Proxy删除关于FQDN Category的配置加载和扫描, Proxy适配maat_scan_group函数变更v4.8.57-20230103
Diffstat (limited to 'plugin')
| -rw-r--r-- | plugin/business/doh/src/doh.cpp | 7 | ||||
| -rw-r--r-- | plugin/business/doh/src/pub.h | 1 | ||||
| -rw-r--r-- | plugin/business/tsg-http/src/tsg_http.cpp | 7 | ||||
| -rw-r--r-- | plugin/business/tsg-http/src/tsg_logger.cpp | 27 |
4 files changed, 0 insertions, 42 deletions
diff --git a/plugin/business/doh/src/doh.cpp b/plugin/business/doh/src/doh.cpp index f8f854a..d14f8ab 100644 --- a/plugin/business/doh/src/doh.cpp +++ b/plugin/business/doh/src/doh.cpp @@ -313,12 +313,6 @@ static void doh_maat_scan(const struct tfe_stream *stream, const struct tfe_http { hit_cnt += n_hit_result; } - - scan_ret = tfe_scan_fqdn_cat(stream, result, ctx->scan_mid, hit_cnt, g_doh_conf->local_logger, g_doh_conf->tables[TYPE_HOST_CAT].id); - if( scan_ret > 0) - { - hit_cnt += scan_ret; - } } // scan addr @@ -387,7 +381,6 @@ static int doh_maat_init(const char *profile, const char *section) MESA_load_profile_string_def(profile, section, "table_dst_addr", g_doh_conf->tables[TYPE_DST_ADDR].name, TFE_STRING_MAX, "ATTR_DESTINATION_ADDR"); MESA_load_profile_string_def(profile, section, "table_qname", g_doh_conf->tables[TYPE_QNAME].name, TFE_STRING_MAX, "ATTR_DOH_QNAME"); MESA_load_profile_string_def(profile, section, "table_host", g_doh_conf->tables[TYPE_HOST].name, TFE_STRING_MAX, "ATTR_SERVER_FQDN"); - MESA_load_profile_string_def(profile, section, "table_host_cat", g_doh_conf->tables[TYPE_HOST_CAT].name, TFE_STRING_MAX, "ATTR_SERVER_FQDN_CAT"); MESA_load_profile_string_def(profile, section, "table_internal_addr", g_doh_conf->tables[TYPE_INTERNAL_ADDR].name, TFE_STRING_MAX, "ATTR_INTERNAL_ADDR"); MESA_load_profile_string_def(profile, section, "table_external_addr", g_doh_conf->tables[TYPE_EXTERNAL_ADDR].name, TFE_STRING_MAX, "ATTR_EXTERNAL_ADDR"); diff --git a/plugin/business/doh/src/pub.h b/plugin/business/doh/src/pub.h index 6f830a2..2ca5271 100644 --- a/plugin/business/doh/src/pub.h +++ b/plugin/business/doh/src/pub.h @@ -35,7 +35,6 @@ enum table_type TYPE_APPID, TYPE_QNAME, TYPE_HOST, - TYPE_HOST_CAT, TYPE_INTERNAL_ADDR, TYPE_EXTERNAL_ADDR, TYPE_MAX diff --git a/plugin/business/tsg-http/src/tsg_http.cpp b/plugin/business/tsg-http/src/tsg_http.cpp index 8e34112..271bae2 100644 --- a/plugin/business/tsg-http/src/tsg_http.cpp +++ b/plugin/business/tsg-http/src/tsg_http.cpp @@ -66,7 +66,6 @@ enum scan_table PXY_CTRL_DESTINATION_ADDR, PXY_CTRL_HTTP_URL, PXY_CTRL_HTTP_FQDN, - PXY_CTRL_HTTP_FQDN_CAT, PXY_CTRL_HTTP_REQ_HDR, PXY_CTRL_HTTP_REQ_BODY, PXY_CTRL_HTTP_RES_HDR, @@ -1015,7 +1014,6 @@ int proxy_policy_init(const char* profile_path, const char* static_section, cons table_name[PXY_CTRL_DESTINATION_ADDR]="ATTR_DESTINATION_ADDR"; table_name[PXY_CTRL_HTTP_URL] = "ATTR_HTTP_URL"; table_name[PXY_CTRL_HTTP_FQDN] = "ATTR_SERVER_FQDN"; - table_name[PXY_CTRL_HTTP_FQDN_CAT] = "ATTR_SERVER_FQDN_CAT"; table_name[PXY_CTRL_HTTP_REQ_HDR] = "ATTR_HTTP_REQ_HDR"; table_name[PXY_CTRL_HTTP_REQ_BODY] = "ATTR_HTTP_REQ_BODY"; table_name[PXY_CTRL_HTTP_RES_HDR] = "ATTR_HTTP_RES_HDR"; @@ -2596,11 +2594,6 @@ enum proxy_action http_scan(const struct tfe_http_session * session, enum tfe_ht { hit_cnt += n_hit_result; } - scan_ret = tfe_scan_fqdn_cat(stream, result, ctx->scan_mid, hit_cnt, g_proxy_rt->local_logger, g_proxy_rt->scan_table_id[PXY_CTRL_HTTP_FQDN_CAT]); - if (scan_ret > 0) - { - hit_cnt += scan_ret; - } } const char * str_url = session->req->req_spec.url; diff --git a/plugin/business/tsg-http/src/tsg_logger.cpp b/plugin/business/tsg-http/src/tsg_logger.cpp index 2321306..8e35de2 100644 --- a/plugin/business/tsg-http/src/tsg_logger.cpp +++ b/plugin/business/tsg-http/src/tsg_logger.cpp @@ -109,7 +109,6 @@ size_t file_bucket_upload_once(struct proxy_logger* handle, char *uuid, struct e struct proxy_logger* proxy_log_handle_create(const char* profile, const char* section, void* local_logger) { - struct tango_cache_parameter *log_file_upload_para=NULL; struct proxy_logger* instance=ALLOC(struct proxy_logger,1); instance->local_logger=local_logger; @@ -138,26 +137,6 @@ error_out: return NULL; } -static unsigned int proxy_log_get_fqdn_cat(struct tfe_cmsg *cmsg, unsigned int *category_id_val, size_t sz_out_value_buf) -{ - int ret=0; - unsigned category_id_num=0; - uint16_t opt_out_size; - - ret = tfe_cmsg_get_value(cmsg, TFE_CMSG_FQDN_CAT_ID_NUM, (unsigned char *)&category_id_num, sizeof(category_id_num), &opt_out_size); - if (ret != 0 || category_id_num == 0) - { - return -1; - } - ret = tfe_cmsg_get_value(cmsg, TFE_CMSG_FQDN_CAT_ID_VAL, (unsigned char *)category_id_val, sz_out_value_buf, &opt_out_size); - if (ret != 0) - { - return -1; - } - - return category_id_num > 8 ? 8 : category_id_num; -} - int proxy_send_log(struct proxy_logger* handle, const struct proxy_log* log_msg) { const struct tfe_http_session* http=log_msg->http; @@ -200,7 +179,6 @@ int proxy_send_log(struct proxy_logger* handle, const struct proxy_log* log_msg) cJSON_AddNumberToObject(common_obj, "start_timestamp_ms", get_time_ms(http->start_time)); cJSON_AddNumberToObject(common_obj, "end_timestamp_ms", get_time_ms(cur_time)); - unsigned int category_id_val[64]={0}; char source_subscribe_id[64]={0}; char opt_val[24]={0}; uint16_t opt_out_size; struct tfe_cmsg * cmsg = tfe_stream_get0_cmsg(log_msg->stream); @@ -216,11 +194,6 @@ int proxy_send_log(struct proxy_logger* handle, const struct proxy_log* log_msg) { cJSON_AddStringToObject(common_obj, "subscriber_id", source_subscribe_id); } - ret = proxy_log_get_fqdn_cat(cmsg, category_id_val, sizeof(category_id_val)); - if (ret>0) - { - cJSON_AddItemToObject(common_obj, "fqdn_category_list", cJSON_CreateIntArray((const int*)category_id_val, ret)); - } } if (http->req) |
