TSG-4427 将 DoH 的重定向纳入 Proxy Redredict 计数,DoH_hijack 计数保留

This commit is contained in:
luwenpeng
2021-02-23 09:33:27 +08:00
committed by 卢文朋
parent 24401b0771
commit 62dde9ea6e
2 changed files with 10 additions and 2 deletions

View File

@@ -196,6 +196,11 @@ static void pangu_http_stat_init(struct pangu_rt * pangu_runtime)
return;
}
void increase_redirect_policy_hit_num(void)
{
ATOMIC_INC(&(g_pangu_rt->stat_val[STAT_ACTION_REDIRECT]));
}
void trusted_CA_update_start_cb(int update_type, void* u_para)
{
if(update_type==MAAT_RULE_UPDATE_TYPE_FULL)
@@ -1558,7 +1563,7 @@ static void http_redirect(const struct tfe_http_session * session, enum tfe_http
ATOMIC_INC(&(g_pangu_rt->stat_val[STAT_ACTION_REDIRECT]));
response = tfe_http_session_response_create(to_write, resp_code);
response = tfe_http_session_response_create(to_write, resp_code);
tfe_http_std_field_write(response, TFE_HTTP_LOCATION, rd_url);
tfe_http_std_field_write(response, TFE_HTTP_CONT_LENGTH, "0");
tfe_http_half_append_body(response, NULL, 0, 0);