proxy intercept ip功能完成
http\dns\ssl\mail dolog添加
This commit is contained in:
@@ -63,12 +63,10 @@ $(function(){
|
||||
$("select[name$='portPattern']").on("change",function(){
|
||||
switchIpInfo(this);
|
||||
});
|
||||
|
||||
switchAction($("input[name='action']:checked").val());
|
||||
//DNS REJECT 时选择dnsStrategyId
|
||||
$("input[name='action']").on('change',function(){
|
||||
var action=$(this).val();
|
||||
switchAction(action);
|
||||
});
|
||||
setInterceptDefaultInfo($("input[name='cfgId']").val());
|
||||
|
||||
$(".glyphicon-plus").on("click",function(){
|
||||
var obj=$(this).parents(".form-section").next(".container-fluid").clone();
|
||||
var len=$(this).parents("div").find(".container-fluid:visible").size();
|
||||
@@ -360,6 +358,23 @@ $(function(){
|
||||
}
|
||||
});
|
||||
$(".action").on("change", function() {
|
||||
//DNS REJECT 时选择dnsStrategyId
|
||||
var action=$("input[name='action']:checked").val();
|
||||
switchAction(action);
|
||||
|
||||
//拦截根据action切换动作部分
|
||||
setInterceptDefaultInfo("");
|
||||
|
||||
//dolog 白名单默认不显示,不记录日志
|
||||
if(action == 128 || action == 32){
|
||||
$(".doLog").addClass("hidden");
|
||||
$("input[name='doLog'][value=0]").prop("checked",true);
|
||||
}else{
|
||||
$(".doLog").removeClass("hidden");
|
||||
$("input[name='doLog'][value=2]").prop("checked",true);
|
||||
|
||||
}
|
||||
|
||||
$("#serviceId").val($(this).attr("serviceId"));
|
||||
$("#protocolId").val($(this).attr("protocolId"));
|
||||
var actionCode=$(this).val();
|
||||
@@ -641,7 +656,83 @@ window.onload=function(){
|
||||
});
|
||||
|
||||
}
|
||||
|
||||
var setInterceptDefaultInfo=function(cfgId){
|
||||
var action=$("input[name='action']:checked").val();
|
||||
var interceptRatelimitIp="";
|
||||
var interceptReplacePktBin="";
|
||||
var protocolNamePrefix="";
|
||||
//查找当前业务中的serviceRegionType,是否存在intercept_ratelimit_ip
|
||||
$("input[name$='configServiceType']").each(function(){
|
||||
//替换动作非tcp
|
||||
var serviceRegionTypeValue=$(this).val();
|
||||
var serviceRegionTypeName=$(this).attr("name");
|
||||
if(serviceRegionTypeName.indexOf(".") >-1){
|
||||
serviceRegionTypeName=serviceRegionTypeName.substring(0,serviceRegionTypeName.indexOf(".")+1);
|
||||
}else{
|
||||
serviceRegionTypeName="";
|
||||
}
|
||||
if(serviceRegionTypeValue == 'intercept_ratelimit_ip'){
|
||||
interceptRatelimitIp=serviceRegionTypeValue;
|
||||
protocolNamePrefix=serviceRegionTypeName;
|
||||
}
|
||||
if(serviceRegionTypeValue == 'intercept_replace_pkt_bin'){
|
||||
interceptReplacePktBin=serviceRegionTypeValue;
|
||||
}
|
||||
});
|
||||
|
||||
if(action==1){
|
||||
//监测
|
||||
$(".monitAction").removeClass("hidden");
|
||||
$(".ratelimitAction").addClass("hidden");
|
||||
$(".replaceAction").addClass("hidden");
|
||||
if(interceptRatelimitIp == 'intercept_ratelimit_ip'){
|
||||
//TODO隐藏不可选IP 协议
|
||||
}
|
||||
if(interceptReplacePktBin == 'intercept_replace_pkt_bin'){
|
||||
$("."+interceptReplacePktBin).addClass("hidden");
|
||||
$("."+interceptReplacePktBin+"_div").addClass("hidden");
|
||||
}
|
||||
}else if(action==64){
|
||||
//限速
|
||||
$(".monitAction").addClass("hidden");
|
||||
$(".ratelimitAction").removeClass("hidden");
|
||||
$(".replaceAction").addClass("hidden");
|
||||
if(interceptRatelimitIp == 'intercept_ratelimit_ip'){
|
||||
//TODO隐藏不可选IP 协议
|
||||
}
|
||||
if(interceptReplacePktBin == 'intercept_replace_pkt_bin'){
|
||||
$("."+interceptReplacePktBin).addClass("hidden");
|
||||
$("."+interceptReplacePktBin+"_div").addClass("hidden");
|
||||
}
|
||||
}else if(action==80){
|
||||
//替换
|
||||
$(".monitAction").addClass("hidden");
|
||||
$(".ratelimitAction").addClass("hidden");
|
||||
$(".replaceAction").removeClass("hidden");
|
||||
if(interceptRatelimitIp == 'intercept_ratelimit_ip'){
|
||||
//TODO隐藏不可选IP 协议
|
||||
}
|
||||
if(interceptReplacePktBin == 'intercept_replace_pkt_bin' && cfgId == ""){
|
||||
$("."+interceptReplacePktBin).removeClass("hidden");
|
||||
$("."+interceptReplacePktBin).find("span").removeClass("hidden");
|
||||
}
|
||||
|
||||
|
||||
}else {
|
||||
//白名单
|
||||
$(".monitAction").addClass("hidden");
|
||||
$(".ratelimitAction").addClass("hidden");
|
||||
$(".replaceAction").addClass("hidden");
|
||||
if(interceptRatelimitIp == 'intercept_ratelimit'){
|
||||
//TODO隐藏不可选IP 协议
|
||||
}
|
||||
if(interceptReplacePktBin == 'intercept_replace_pkt_bin'){
|
||||
$("."+interceptReplacePktBin).addClass("hidden");
|
||||
$("."+interceptReplacePktBin+"_div").addClass("hidden");
|
||||
}
|
||||
}
|
||||
|
||||
}
|
||||
//0 非十六进制 大小不敏感 1 十六进制,大小写不敏感 2非十六进制 大小写敏感
|
||||
var setIsHexBin=function(obj){
|
||||
var profix="";
|
||||
|
||||
Reference in New Issue
Block a user