summaryrefslogtreecommitdiff
path: root/platform/src/proxy.cpp
diff options
context:
space:
mode:
authorfengweihao <[email protected]>2024-01-15 15:50:58 +0800
committerfengweihao <[email protected]>2024-01-15 15:50:58 +0800
commitad21a6ac3d222751ef210a5736be67d0a5112151 (patch)
treeb389601f1242d85c34f076dcdabaf966c11dd26b /platform/src/proxy.cpp
parentb1f670c05da4a83df2ba68db62a0c1a91f614d93 (diff)
TSG-18596 修复Redirect-DoH策略无法命中v4.8.61-20230115
TSG-18558 Manipulation日志中,有字节数和包数均为0的日志存在
Diffstat (limited to 'platform/src/proxy.cpp')
-rw-r--r--platform/src/proxy.cpp13
1 files changed, 13 insertions, 0 deletions
diff --git a/platform/src/proxy.cpp b/platform/src/proxy.cpp
index fbb889c..ddfe5c4 100644
--- a/platform/src/proxy.cpp
+++ b/platform/src/proxy.cpp
@@ -61,6 +61,8 @@
/* Systemd */
#include <systemd/sd-daemon.h>
+#include <MESA/maat.h>
+
extern struct tcp_policy_enforcer *tcp_policy_enforcer_create(void *logger);
extern struct chaining_policy_enforcer *chaining_policy_enforcer_create(void *logger);
extern struct ssl_policy_enforcer *ssl_policy_enforcer_create(void *logger);
@@ -257,6 +259,11 @@ static void __dummy_event_handler(evutil_socket_t fd, short what, void * arg)
static void __signal_handler_cb(evutil_socket_t fd, short what, void * arg)
{
tfe_proxy * ctx = (tfe_proxy *) arg;
+
+ struct maat *maat=NULL;
+ const char *profile_path = "./conf/tfe/tfe.conf";
+ int log_level=LOG_LEVEL_FATAL;
+
switch (fd)
{
case SIGTERM:
@@ -264,6 +271,12 @@ static void __signal_handler_cb(evutil_socket_t fd, short what, void * arg)
case SIGHUP:
TFE_LOG_ERROR(ctx->logger, "recv SIGHUP, reload zlog.conf");
MESA_handle_runtime_log_reconstruction(NULL);
+ MESA_load_profile_int_def(profile_path, "maat", "log_level", &(log_level), LOG_LEVEL_FATAL);
+ maat = (struct maat *)tfe_bussiness_resouce_get(STATIC_MAAT);
+ if(maat)
+ {
+ maat_reload_log_level(maat, (enum log_level)log_level);
+ }
break;
case SIGUSR1:
// enable work thread sleep