修改拦截策略拦截动作时user_region表的json参数变更:
1)exclusions修正为dynamic_bypass; 2)pinning修正为cert_pinning; 3)client_cert_req修正为mutual_authentication; 4)cert_verify修正为certificate_checks; 5)fail_method修正为fail_action; 6)ssl_ver修正为protocol_version。
This commit is contained in:
@@ -97,22 +97,22 @@ void intercept_param_new_cb(int table_id, const char* key, const char* table_lin
|
||||
}
|
||||
}
|
||||
|
||||
exclusions=cJSON_GetObjectItem(json, "exclusions");
|
||||
exclusions=cJSON_GetObjectItem(json, "dynamic_bypass");
|
||||
if(exclusions)
|
||||
{
|
||||
item=cJSON_GetObjectItem(exclusions, "ev_cert");
|
||||
if(item && item->type==cJSON_Number) param->bypass_ev_cert=item->valueint;
|
||||
item=cJSON_GetObjectItem(exclusions, "cert_transparency");
|
||||
if(item && item->type==cJSON_Number) param->bypass_ct_cert=item->valueint;
|
||||
item=cJSON_GetObjectItem(exclusions, "client_cert_req");
|
||||
item=cJSON_GetObjectItem(exclusions, "mutual_authentication");
|
||||
if(item && item->type==cJSON_Number) param->bypass_mutual_auth=item->valueint;
|
||||
item=cJSON_GetObjectItem(exclusions, "pinning");
|
||||
item=cJSON_GetObjectItem(exclusions, "cert_pinning");
|
||||
if(item && item->type==cJSON_Number) param->bypass_pinning=item->valueint;
|
||||
item=cJSON_GetObjectItem(exclusions, "protocol_errors");
|
||||
if(item && item->type==cJSON_Number) param->bypass_protocol_errors=item->valueint;
|
||||
|
||||
}
|
||||
cert_verify=cJSON_GetObjectItem(json, "cert_verify");
|
||||
cert_verify=cJSON_GetObjectItem(json, "certificate_checks");
|
||||
if(cert_verify)
|
||||
{
|
||||
approach=cJSON_GetObjectItem(cert_verify, "approach");
|
||||
@@ -127,7 +127,7 @@ void intercept_param_new_cb(int table_id, const char* key, const char* table_lin
|
||||
item=cJSON_GetObjectItem(approach, "expiration");
|
||||
if(item && item->type==cJSON_Number && item->valueint==0) param->no_verify_expry_date=1;
|
||||
}
|
||||
item=cJSON_GetObjectItem(cert_verify, "fail_method");
|
||||
item=cJSON_GetObjectItem(cert_verify, "fail_action");
|
||||
if(item && item->type==cJSON_String)
|
||||
{
|
||||
if(0==strcasecmp(item->valuestring, "Fail-Close"))
|
||||
@@ -136,7 +136,7 @@ void intercept_param_new_cb(int table_id, const char* key, const char* table_lin
|
||||
}
|
||||
}
|
||||
}
|
||||
ssl_ver=cJSON_GetObjectItem(json, "ssl_ver");
|
||||
ssl_ver=cJSON_GetObjectItem(json, "protocol_version");
|
||||
if(ssl_ver)
|
||||
{
|
||||
item=cJSON_GetObjectItem(ssl_ver, "mirror_client");
|
||||
|
||||
Reference in New Issue
Block a user