From cf20f2d1f9d9d286f65b78c2ce30bd2cb811dd82 Mon Sep 17 00:00:00 2001 From: fengweihao Date: Tue, 6 Feb 2024 18:04:42 +0800 Subject: [PATCH] =?UTF-8?q?TSG-19337=20Proxy=E7=9A=84Manipulate=E6=97=A5?= =?UTF-8?q?=E5=BF=97=E4=B8=AD=E5=A2=9E=E5=8A=A0P=20Protocol=E5=AD=97?= =?UTF-8?q?=E6=AE=B5?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- plugin/business/doh/src/logger.cpp | 2 ++ plugin/business/tsg-http/src/tsg_logger.cpp | 1 + 2 files changed, 3 insertions(+) diff --git a/plugin/business/doh/src/logger.cpp b/plugin/business/doh/src/logger.cpp index 8381e26..8dad40c 100644 --- a/plugin/business/doh/src/logger.cpp +++ b/plugin/business/doh/src/logger.cpp @@ -398,6 +398,8 @@ int doh_send_log(struct doh_conf *handle, const struct tfe_http_session *http, c tfe_stream_info_get(stream, INFO_FROM_DOWNSTREAM_RX_OFFSET, &c2s_byte_num, sizeof(c2s_byte_num)); tfe_stream_info_get(stream, INFO_FROM_UPSTREAM_RX_OFFSET, &s2c_byte_num, sizeof(s2c_byte_num)); + cJSON_AddStringToObject(common_obj, "decoded_as", "HTTP"); + cJSON_AddStringToObject(common_obj, "ip_protocol", "TCP"); cJSON_AddNumberToObject(common_obj, "out_link_id", 0); cJSON_AddNumberToObject(common_obj, "in_link_id", 0); cJSON_AddStringToObject(common_obj, "sled_ip", handle->kafka_logger->local_ip_str); diff --git a/plugin/business/tsg-http/src/tsg_logger.cpp b/plugin/business/tsg-http/src/tsg_logger.cpp index 13952ac..6673d83 100644 --- a/plugin/business/tsg-http/src/tsg_logger.cpp +++ b/plugin/business/tsg-http/src/tsg_logger.cpp @@ -253,6 +253,7 @@ int proxy_send_log(struct proxy_logger* handle, const struct proxy_log* log_msg) cJSON_AddStringToObject(common_obj, "http_version", app_proto[http->major_version]); cJSON_AddStringToObject(common_obj, "decoded_as", "HTTP"); + cJSON_AddStringToObject(common_obj, "ip_protocol", "TCP"); cJSON_AddNumberToObject(common_obj, "out_link_id", 0); cJSON_AddNumberToObject(common_obj, "in_link_id", 0); cJSON_AddStringToObject(common_obj, "sled_ip", handle->kafka_logger->local_ip_str);