2018-08-21 13:38:26 +08:00
|
|
|
|
<%@ page contentType="text/html;charset=UTF-8"%>
|
|
|
|
|
|
<%@ include file="/WEB-INF/include/taglib.jsp"%>
|
|
|
|
|
|
<html>
|
|
|
|
|
|
<head>
|
|
|
|
|
|
<title><spring:message code="${cfgName}"></spring:message></title>
|
|
|
|
|
|
|
|
|
|
|
|
<style type="text/css">
|
|
|
|
|
|
.boxSolid {
|
|
|
|
|
|
border: 1px solid #eeeeee
|
|
|
|
|
|
}
|
2019-05-21 19:50:54 +08:00
|
|
|
|
fieldset{padding:.35em .625em .75em;margin:0 2px;border:1px solid silver}
|
|
|
|
|
|
|
|
|
|
|
|
legend{padding:.5em;border:0;width:auto;font-family: "Open Sans", sans-serif;color: #333333;background: #e7ecf1;margin: 12px 0px 14px 0px;font-weight: 300;padding:5px}
|
|
|
|
|
|
.switch{
|
|
|
|
|
|
border-collapse: collapse;
|
|
|
|
|
|
}
|
2018-08-21 13:38:26 +08:00
|
|
|
|
</style>
|
|
|
|
|
|
<script type="text/javascript">
|
|
|
|
|
|
$(document)
|
|
|
|
|
|
.ready(
|
|
|
|
|
|
function() {
|
2019-05-21 19:50:54 +08:00
|
|
|
|
$(".switch").bootstrapSwitch({
|
|
|
|
|
|
/* onText:"<spring:message code='ON'/>",
|
|
|
|
|
|
offText:"<spring:message code='OFF'/>", */
|
|
|
|
|
|
onColor:"info",
|
|
|
|
|
|
offColor:"default",
|
|
|
|
|
|
size:"small",
|
|
|
|
|
|
onInit: function() {
|
|
|
|
|
|
if($(this).val()==''){
|
|
|
|
|
|
$(this).val(0);
|
|
|
|
|
|
}
|
|
|
|
|
|
},
|
|
|
|
|
|
onSwitchChange:function(event,state){
|
|
|
|
|
|
if(state==true){
|
|
|
|
|
|
$(this).val("1");
|
|
|
|
|
|
if($(this).attr("id")=="approach"){
|
|
|
|
|
|
$(".approach").removeClass("hidden");
|
|
|
|
|
|
}
|
|
|
|
|
|
if($(this).attr("id")=="mirror_client"){
|
|
|
|
|
|
$(".ssl_version").addClass("hidden");
|
|
|
|
|
|
}
|
|
|
|
|
|
if($(this).attr("id")=="enable"){
|
|
|
|
|
|
$(".mirror_profile").removeClass("hidden");
|
|
|
|
|
|
}
|
|
|
|
|
|
}else{
|
|
|
|
|
|
$(this).val("0");
|
|
|
|
|
|
if($(this).attr("id")=="approach"){
|
|
|
|
|
|
$(".approach").addClass("hidden");
|
|
|
|
|
|
}
|
|
|
|
|
|
if($(this).attr("id")=="mirror_client"){
|
|
|
|
|
|
$(".ssl_version").removeClass("hidden");
|
|
|
|
|
|
}
|
|
|
|
|
|
if($(this).attr("id")=="enable"){
|
|
|
|
|
|
$(".mirror_profile").addClass("hidden");
|
|
|
|
|
|
}
|
|
|
|
|
|
}
|
|
|
|
|
|
}
|
|
|
|
|
|
});
|
2018-08-27 16:31:42 +08:00
|
|
|
|
$(".action").on("change", function() {
|
2018-08-24 15:41:05 +08:00
|
|
|
|
switchAction($("input[name=action]:checked").val());
|
2018-08-23 10:01:28 +08:00
|
|
|
|
//拦截根据action切换动作部分
|
|
|
|
|
|
setInterceptDefaultInfo("");
|
|
|
|
|
|
$("#serviceId").val($(this).attr("serviceId"));
|
|
|
|
|
|
$("#protocolId").val($(this).attr("protocolId"));
|
2018-08-31 13:02:25 +08:00
|
|
|
|
openSingleBoxsolid();
|
|
|
|
|
|
|
2018-08-23 10:01:28 +08:00
|
|
|
|
});
|
2018-11-14 15:30:25 +08:00
|
|
|
|
setInterceptDefaultInfo($("input[name='cfgId']").val());
|
2018-08-31 13:02:25 +08:00
|
|
|
|
openSingleBoxsolid();
|
2018-08-21 13:38:26 +08:00
|
|
|
|
$("#serviceId").val($(".action:checked").attr("serviceId"));
|
|
|
|
|
|
$("#protocolId").val($(".action:checked").attr("protocolId"));
|
2018-08-29 10:50:40 +08:00
|
|
|
|
$(".ratelimitAction").find("input[name='userRegion1']").on("change",function(){
|
|
|
|
|
|
switchRateLimitType();
|
|
|
|
|
|
});
|
2019-05-21 19:50:54 +08:00
|
|
|
|
$(".monitAction").find("select[name='keyring']").on("change",function(){
|
2018-11-06 11:36:31 +08:00
|
|
|
|
selectCert(this);
|
|
|
|
|
|
});
|
|
|
|
|
|
selectCert();
|
2018-08-21 13:38:26 +08:00
|
|
|
|
$("#cfgFrom").validate(
|
|
|
|
|
|
{
|
|
|
|
|
|
errorPlacement : function(error, element) {
|
2018-11-08 19:50:04 +08:00
|
|
|
|
$(element).parents(".form-group").find(
|
|
|
|
|
|
"div[for='"
|
|
|
|
|
|
+ element.attr("name")
|
|
|
|
|
|
+ "']").html("");
|
2018-08-21 13:38:26 +08:00
|
|
|
|
$(element).parents(".form-group").find(
|
|
|
|
|
|
"div[for='"
|
|
|
|
|
|
+ element.attr("name")
|
|
|
|
|
|
+ "']").append(error);
|
|
|
|
|
|
},
|
|
|
|
|
|
submitHandler : function(form) {
|
|
|
|
|
|
var flag = true;
|
2018-10-11 15:52:11 +08:00
|
|
|
|
var actionValue=$("input[name=action]:checked").val();
|
2019-05-21 19:50:54 +08:00
|
|
|
|
//将拦截策略checkbox选中
|
|
|
|
|
|
/* $(".userregion:visible").find(":not(checked)").each(function(){
|
|
|
|
|
|
$(this).attr("checked",true);
|
|
|
|
|
|
}); */
|
2019-01-19 14:39:40 +06:00
|
|
|
|
|
2018-11-06 11:36:31 +08:00
|
|
|
|
|
2018-08-21 13:38:26 +08:00
|
|
|
|
//代表所有业务都隐藏了,提示必须增加一种业务数据
|
|
|
|
|
|
if($(".boxSolid").length ==$(".boxSolid.hidden").length){
|
|
|
|
|
|
top.$.jBox.tip("<spring:message code='one_more'/>", "<spring:message code='info'/>");
|
|
|
|
|
|
return;
|
2019-01-19 14:39:40 +06:00
|
|
|
|
}else{
|
|
|
|
|
|
$(".boxSolid").each(function(){
|
|
|
|
|
|
if($(this).hasClass("intercept_domain_div")){
|
|
|
|
|
|
var inputObj = $(this).find("input[name$='cfgRegionCode']");
|
|
|
|
|
|
flag=validDomain(actionValue,inputObj);
|
|
|
|
|
|
if(!flag){
|
|
|
|
|
|
return;
|
|
|
|
|
|
}
|
|
|
|
|
|
}
|
|
|
|
|
|
});
|
|
|
|
|
|
if(!flag){
|
|
|
|
|
|
return;
|
|
|
|
|
|
}
|
2018-08-21 13:38:26 +08:00
|
|
|
|
}
|
2018-10-11 15:52:11 +08:00
|
|
|
|
|
2018-08-21 13:38:26 +08:00
|
|
|
|
//代表所有区域都隐藏了,提示必须增加个区域信息
|
|
|
|
|
|
if($("input[name='isAreaEffective']:checked").val()==1 && $(".container-fluid:visible").size()==0){
|
|
|
|
|
|
if($("#areaIsp").hasClass("hidden")) $("#areaIp").find(".glyphicon-plus").click();
|
|
|
|
|
|
if($("#areaIp").hasClass("hidden")) $("#areaIsp").find(".glyphicon-plus").click();
|
|
|
|
|
|
top.$.jBox.tip("<spring:message code='one_more_area'/>", "<spring:message code='info'/>");
|
|
|
|
|
|
return;
|
|
|
|
|
|
}
|
2018-09-13 18:14:38 +08:00
|
|
|
|
//校验tagInput的空和十六进制
|
|
|
|
|
|
flag=validateTagInputKeyword();
|
2018-08-21 13:38:26 +08:00
|
|
|
|
var flag1=validateInvisibleCharTag();
|
|
|
|
|
|
if(flag){
|
|
|
|
|
|
flag=flag1;
|
|
|
|
|
|
}
|
|
|
|
|
|
if(flag){
|
|
|
|
|
|
//将disable属性的元素删除
|
|
|
|
|
|
$(".disabled").each(function(){
|
|
|
|
|
|
$(this).remove();
|
|
|
|
|
|
});
|
2019-05-21 19:50:54 +08:00
|
|
|
|
|
|
|
|
|
|
$("input[name$='exprType']").attr("disabled",false);
|
|
|
|
|
|
if(actionValue==1){ //监测
|
2018-08-28 17:16:49 +08:00
|
|
|
|
$(".ratelimitAction").find("input[name^='userRegion'],select[name^='userRegion']").attr("disabled",true);
|
|
|
|
|
|
$(".replaceAction").find("input[name^='userRegion'],select[name^='userRegion']").attr("disabled",true);
|
2018-11-14 15:30:25 +08:00
|
|
|
|
$(".whiteListAction").find("input[name^='userRegion'],select[name^='userRegion']").attr("disabled",true);
|
2018-12-17 00:21:27 +08:00
|
|
|
|
$(".spoofingAction").find("input[name^='userRegion'],select[name^='userRegion']").attr("disabled",true);
|
2019-05-21 19:50:54 +08:00
|
|
|
|
}else if(actionValue==64){//限速
|
2018-08-28 17:16:49 +08:00
|
|
|
|
$(".monitAction").find("input[name^='userRegion'],select[name^='userRegion']").attr("disabled",true);
|
|
|
|
|
|
$(".replaceAction").find("input[name^='userRegion'],select[name^='userRegion']").attr("disabled",true);
|
2018-11-14 15:30:25 +08:00
|
|
|
|
$(".whiteListAction").find("input[name^='userRegion'],select[name^='userRegion']").attr("disabled",true);
|
2018-12-17 00:21:27 +08:00
|
|
|
|
$(".spoofingAction").find("input[name^='userRegion'],select[name^='userRegion']").attr("disabled",true);
|
2018-08-29 10:50:40 +08:00
|
|
|
|
var rateLimitType=$("input[name='userRegion1']checked").val();
|
|
|
|
|
|
if(rateLimitType == 0){//丢包率
|
|
|
|
|
|
$(".bandwith").find("input[name='userRegion3']").attr("disabled",true);
|
|
|
|
|
|
}
|
|
|
|
|
|
if(rateLimitType == 1){//带宽
|
2018-10-17 10:06:08 +08:00
|
|
|
|
$(".droprate").find("select[name='userRegion2']").attr("disabled",true);
|
2018-08-29 10:50:40 +08:00
|
|
|
|
}
|
2019-05-21 19:50:54 +08:00
|
|
|
|
}else if(actionValue==80){//替换
|
2018-08-28 17:16:49 +08:00
|
|
|
|
$(".monitAction").find("input[name^='userRegion'],select[name^='userRegion']").attr("disabled",true);
|
|
|
|
|
|
$(".ratelimitAction").find("input[name^='userRegion'],select[name^='userRegion']").attr("disabled",true);
|
2018-11-14 15:30:25 +08:00
|
|
|
|
$(".whiteListAction").find("input[name^='userRegion'],select[name^='userRegion']").attr("disabled",true);
|
2018-12-17 00:21:27 +08:00
|
|
|
|
$(".spoofingAction").find("input[name^='userRegion'],select[name^='userRegion']").attr("disabled",true);
|
2019-05-21 19:50:54 +08:00
|
|
|
|
}else if(actionValue==48){//IP仿冒业务
|
2018-12-17 00:21:27 +08:00
|
|
|
|
$(".monitAction").find("input[name^='userRegion'],select[name^='userRegion']").attr("disabled",true);
|
|
|
|
|
|
$(".ratelimitAction").find("input[name^='userRegion'],select[name^='userRegion']").attr("disabled",true);
|
|
|
|
|
|
$(".whiteListAction").find("input[name^='userRegion'],select[name^='userRegion']").attr("disabled",true);
|
|
|
|
|
|
$(".replaceAction").find("input[name^='userRegion'],select[name^='userRegion']").attr("disabled",true);
|
2018-08-21 13:38:26 +08:00
|
|
|
|
}else {//白名单
|
2018-08-28 17:16:49 +08:00
|
|
|
|
$(".monitAction").find("input[name^='userRegion'],select[name^='userRegion']").attr("disabled",true);
|
|
|
|
|
|
$(".ratelimitAction").find("input[name^='userRegion'],select[name^='userRegion']").attr("disabled",true);
|
|
|
|
|
|
$(".replaceAction").find("input[name^='userRegion'],select[name^='userRegion']").attr("disabled",true);
|
2018-12-17 00:21:27 +08:00
|
|
|
|
$(".spoofingAction").find("input[name^='userRegion'],select[name^='userRegion']").attr("disabled",true);
|
2018-08-21 13:38:26 +08:00
|
|
|
|
}
|
2019-05-21 19:50:54 +08:00
|
|
|
|
//处理action parameter
|
|
|
|
|
|
/* $(".userRegion").each(function(){
|
|
|
|
|
|
$(this).attr("name","userRegion['"+$(this).attr("id")+"']");
|
|
|
|
|
|
if($(this).is(":checkbox") && $(this).hasClass("switch")){
|
|
|
|
|
|
$(this).attr("checked","checked");
|
|
|
|
|
|
}
|
|
|
|
|
|
}); */
|
2018-08-21 13:38:26 +08:00
|
|
|
|
loading('onloading...');
|
|
|
|
|
|
form.submit();
|
|
|
|
|
|
}else{
|
|
|
|
|
|
return;
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
},
|
|
|
|
|
|
errorContainer : "#messageBox",
|
|
|
|
|
|
});
|
|
|
|
|
|
//业务内容增加
|
|
|
|
|
|
/* $("span[title='add']").on("click", function() {
|
|
|
|
|
|
$(".ipPort0").removeClass("hidden");
|
|
|
|
|
|
}); */
|
|
|
|
|
|
});
|
2018-08-21 21:26:05 +08:00
|
|
|
|
|
2018-11-26 13:02:30 +08:00
|
|
|
|
//限流方式
|
|
|
|
|
|
var switchRateLimitType=function(){
|
|
|
|
|
|
//0 丢包率 1 带宽
|
|
|
|
|
|
var rateLimitType=$(".ratelimitAction").find("input[name='userRegion1']:checked").val();
|
|
|
|
|
|
if(rateLimitType == 0){
|
|
|
|
|
|
$(".droprate").removeClass("hidden");
|
|
|
|
|
|
$(".bandwith").addClass("hidden");
|
|
|
|
|
|
}
|
|
|
|
|
|
if(rateLimitType == 1){
|
|
|
|
|
|
$(".droprate").addClass("hidden");
|
|
|
|
|
|
$(".bandwith").removeClass("hidden");
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
}
|
2018-08-21 13:38:26 +08:00
|
|
|
|
//业务窗口打开
|
|
|
|
|
|
var addContent = function(obj, contentClassName) {
|
|
|
|
|
|
var showDiv = $(obj).parent().parent().next();
|
|
|
|
|
|
$(showDiv).removeClass("hidden").removeClass(
|
|
|
|
|
|
"disabled");
|
|
|
|
|
|
/* $("."+contentClassName+"0").find("input,select").each(function(){
|
|
|
|
|
|
$(this).removeAttr("disabled");
|
|
|
|
|
|
}); */
|
|
|
|
|
|
$(obj).addClass("hidden");
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
//业务窗口关闭
|
|
|
|
|
|
var delContent = function(contentClassName, addBtnClassName) {
|
|
|
|
|
|
$("." + contentClassName).addClass("hidden").addClass("disabled");
|
|
|
|
|
|
/* $("."+contentClassName).find("input,select").each(function(){
|
|
|
|
|
|
$(this).attr("disabled","true");
|
|
|
|
|
|
}); */
|
|
|
|
|
|
$("." + addBtnClassName).removeClass("hidden");
|
|
|
|
|
|
}
|
2018-08-31 13:02:25 +08:00
|
|
|
|
//单域默认展开且不可关闭
|
|
|
|
|
|
var openSingleBoxsolid = function() {
|
2018-10-11 15:52:11 +08:00
|
|
|
|
var boxsolidLenth=$(".boxSolid").not(".intercept_replace_pkt_bin_div").prev(".form-section:visible").length;
|
2018-08-31 13:02:25 +08:00
|
|
|
|
if(boxsolidLenth == 1){
|
2018-10-11 15:52:11 +08:00
|
|
|
|
$(".boxSolid").prev(".form-section:visible").eq(0).find("span[title=add]").click();
|
|
|
|
|
|
$(".boxSolid").prev(".form-section:visible").eq(0).next(".boxSolid").find("span[title=remove]").addClass("hidden");
|
2018-08-31 13:02:25 +08:00
|
|
|
|
}
|
|
|
|
|
|
}
|
2018-11-06 11:36:31 +08:00
|
|
|
|
//实体证书提示域名信息
|
|
|
|
|
|
var selectCert=function(){
|
2019-05-21 19:50:54 +08:00
|
|
|
|
var cert=$(".monitAction").find("select[name='keyring']").val();
|
|
|
|
|
|
var keyringType=$(".monitAction").find("select[name='keyring']").find("option[value='"+cert+"']").attr("keyringType");
|
2018-11-06 11:36:31 +08:00
|
|
|
|
if(cert != '' && keyringType == 'end-entity'){
|
2019-05-21 19:50:54 +08:00
|
|
|
|
var san=$(".monitAction").find("select[name='keyring']").find("option[value='"+cert+"']").attr("san");
|
|
|
|
|
|
var cn=$(".monitAction").find("select[name='keyring']").find("option[value='"+cert+"']").attr("cn");
|
2018-11-06 11:36:31 +08:00
|
|
|
|
if(san.indexOf(cn) > -1){
|
|
|
|
|
|
$("#certDomain").attr("title",san);
|
|
|
|
|
|
}else{
|
|
|
|
|
|
$("#certDomain").attr("title",san+""+cn);
|
|
|
|
|
|
}
|
|
|
|
|
|
$("#certDomain").removeClass("hidden");
|
|
|
|
|
|
}else{
|
|
|
|
|
|
$("#certDomain").addClass("hidden");
|
|
|
|
|
|
}
|
|
|
|
|
|
}
|
2019-01-19 14:39:40 +06:00
|
|
|
|
var validDomain=function(actionValue,inputObj){
|
2018-11-06 11:36:31 +08:00
|
|
|
|
var flag=false;
|
|
|
|
|
|
if(actionValue == 1){
|
2019-01-19 14:39:40 +06:00
|
|
|
|
var serviceType=$(inputObj).attr("serviceType");
|
|
|
|
|
|
var prefixName=$(inputObj).attr("name").split("cfgRegionCode")[0];
|
|
|
|
|
|
//var matchMethod=$("select[name='"+prefixName+"matchMethod']").val();
|
2019-05-21 19:50:54 +08:00
|
|
|
|
var cert=$(".monitAction").find("select[name='keyring']").val();
|
|
|
|
|
|
var keyringType=$(".monitAction").find("select[name='keyring']").find("option[value='"+cert+"']").attr("keyringType");
|
2019-01-19 14:39:40 +06:00
|
|
|
|
|
2018-11-06 11:36:31 +08:00
|
|
|
|
if(cert != '' && keyringType == 'end-entity'){
|
2019-01-19 14:39:40 +06:00
|
|
|
|
var domainDiv = $(inputObj).parent(".intercept_domain_div").is(':hidden');
|
|
|
|
|
|
if(domainDiv){
|
|
|
|
|
|
top.$.jBox.tip("<spring:message code='intercep_domain_required_tip'/>", "<spring:message code='info'/>");
|
|
|
|
|
|
return false;
|
|
|
|
|
|
}
|
2019-05-21 19:50:54 +08:00
|
|
|
|
var cn=$(".monitAction").find("select[name='keyring']").find("option[value='"+cert+"']").attr("cn");
|
2018-11-14 15:30:25 +08:00
|
|
|
|
if(cn !='' && cn != null){
|
|
|
|
|
|
var cnReg = new RegExp('^(?=^.{3,255}$)[a-zA-Z0-9][-a-zA-Z0-9]{0,62}(\\'+cn.replace("*","")+')+$');
|
2019-05-21 19:50:54 +08:00
|
|
|
|
var san=$(".monitAction").find("select[name='keyring']").find("option[value='"+cert+"']").attr("san");
|
2018-11-14 15:30:25 +08:00
|
|
|
|
if(san != null && san !=''){
|
2019-01-19 14:39:40 +06:00
|
|
|
|
//$(".intercept_domain_div").each(function(){
|
2018-11-14 15:30:25 +08:00
|
|
|
|
if(serviceType == "intercept_domain"){
|
|
|
|
|
|
var domain=$("input[name='"+prefixName+"cfgKeywords']").val();
|
|
|
|
|
|
var domain=domain.trim();
|
|
|
|
|
|
if(!flag){
|
|
|
|
|
|
for (var i=0;i<san.split(",").length;i++) {
|
|
|
|
|
|
if(san.split(",")[i] != null && san.split(",")[i] != '' && san.split(",")[i].trim() !=''){
|
|
|
|
|
|
if(flag){
|
|
|
|
|
|
break;
|
|
|
|
|
|
}
|
|
|
|
|
|
var sanStr=san.split(",")[i].trim();
|
2019-01-19 14:39:40 +06:00
|
|
|
|
if(sanStr.indexOf("*") >-1){//如证书域名包含*,则用该域名与配置进行后缀匹配
|
2018-11-14 15:30:25 +08:00
|
|
|
|
var sanReg= new RegExp('^(?=^.{3,255}$)[a-zA-Z0-9][-a-zA-Z0-9]{0,62}(\\'+sanStr.replace("*","")+')+$');
|
|
|
|
|
|
if(sanReg.exec(domain) != null){
|
|
|
|
|
|
flag=true;
|
|
|
|
|
|
}
|
2019-01-19 14:39:40 +06:00
|
|
|
|
}else{//证书域名不包含*,则该域名与配置完全匹配
|
2018-11-14 15:30:25 +08:00
|
|
|
|
if(sanStr == domain){ //完全匹配
|
|
|
|
|
|
flag=true;
|
|
|
|
|
|
}
|
|
|
|
|
|
}
|
2019-01-19 14:39:40 +06:00
|
|
|
|
|
2018-11-06 11:36:31 +08:00
|
|
|
|
}
|
2018-11-14 15:30:25 +08:00
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
if(!flag){
|
2019-01-19 14:39:40 +06:00
|
|
|
|
if(cn.indexOf("*") > -1){//如证书域名包含*,则用该域名与配置进行后缀匹配
|
2018-11-14 15:30:25 +08:00
|
|
|
|
if(cnReg.exec(domain) != null){
|
2018-11-06 11:36:31 +08:00
|
|
|
|
flag=true;
|
|
|
|
|
|
}
|
2019-01-19 14:39:40 +06:00
|
|
|
|
}else{//证书域名不包含*,则该域名与配置完全匹配
|
2018-11-14 15:30:25 +08:00
|
|
|
|
if(cn == domain){ //完全匹配
|
2018-11-06 11:36:31 +08:00
|
|
|
|
flag=true;
|
|
|
|
|
|
}
|
|
|
|
|
|
}
|
|
|
|
|
|
}
|
2018-11-14 15:30:25 +08:00
|
|
|
|
}else{
|
|
|
|
|
|
flag=true;
|
2018-11-06 11:36:31 +08:00
|
|
|
|
}
|
2018-11-14 15:30:25 +08:00
|
|
|
|
}
|
|
|
|
|
|
if(!flag){
|
|
|
|
|
|
$("div[for='"+prefixName+"cfgKeywords']").html("");
|
|
|
|
|
|
$("div[for='"+prefixName+"cfgKeywords']").html("<label class='error'>"+$("#certNotMatchDomain").text()+"</label>");
|
2018-11-06 11:36:31 +08:00
|
|
|
|
}else{
|
2018-11-14 15:30:25 +08:00
|
|
|
|
$("div[for='"+prefixName+"cfgKeywords']").html("");
|
|
|
|
|
|
}
|
2019-01-19 14:39:40 +06:00
|
|
|
|
//});
|
2018-11-14 15:30:25 +08:00
|
|
|
|
}else{
|
|
|
|
|
|
flag=false;
|
2019-01-19 14:39:40 +06:00
|
|
|
|
//$("input[name$='cfgRegionCode'").each(function(){
|
2018-11-14 15:30:25 +08:00
|
|
|
|
if(serviceType == "intercept_domain"){
|
|
|
|
|
|
if(error ==null || error.trim() == ''){
|
|
|
|
|
|
$("div[for='"+prefixName+"cfgKeywords']").html("");
|
|
|
|
|
|
$("div[for='"+prefixName+"cfgKeywords']").html("<label class='error'>"+$("#certNotMatchDomain").text()+"</label>");
|
|
|
|
|
|
}
|
|
|
|
|
|
}
|
|
|
|
|
|
|
2019-01-19 14:39:40 +06:00
|
|
|
|
//});
|
2018-11-14 15:30:25 +08:00
|
|
|
|
}
|
|
|
|
|
|
}else{
|
|
|
|
|
|
flag=false;
|
2019-01-19 14:39:40 +06:00
|
|
|
|
//$("input[name$='cfgRegionCode'").each(function(){
|
2018-11-14 15:30:25 +08:00
|
|
|
|
var error=$("div[for='"+prefixName+"cfgKeywords']").html();
|
|
|
|
|
|
if(serviceType == "intercept_domain"){
|
|
|
|
|
|
if(error ==null || error.trim() == ''){
|
|
|
|
|
|
$("div[for='"+prefixName+"cfgKeywords']").html("");
|
|
|
|
|
|
$("div[for='"+prefixName+"cfgKeywords']").html("<label class='error'>"+$("#certNotMatchDomain").text()+"</label>");
|
2018-11-06 11:36:31 +08:00
|
|
|
|
}
|
|
|
|
|
|
}
|
2018-11-14 15:30:25 +08:00
|
|
|
|
|
2019-01-19 14:39:40 +06:00
|
|
|
|
//});
|
2018-11-06 11:36:31 +08:00
|
|
|
|
}
|
|
|
|
|
|
}else{
|
|
|
|
|
|
flag=true;
|
|
|
|
|
|
}
|
|
|
|
|
|
}else{
|
|
|
|
|
|
flag=true;
|
|
|
|
|
|
}
|
|
|
|
|
|
return flag;
|
|
|
|
|
|
|
|
|
|
|
|
}
|
2018-11-14 15:30:25 +08:00
|
|
|
|
var setInterceptDefaultInfo=function(cfgId){
|
|
|
|
|
|
var action=$("input[name='action']:checked").val();
|
|
|
|
|
|
var interceptRatelimitIp="";
|
|
|
|
|
|
var interceptReplacePktBin="";
|
|
|
|
|
|
var protocolNamePrefix="";
|
|
|
|
|
|
var serviceType="";
|
|
|
|
|
|
//查找当前业务中的serviceRegionType,是否存在intercept_ratelimit_ip
|
|
|
|
|
|
$("input[name$='cfgRegionCode']").each(function(){
|
|
|
|
|
|
//替换动作非tcp
|
|
|
|
|
|
var serviceRegionTypeValue=$(this).attr("serviceType");
|
|
|
|
|
|
serviceType=serviceRegionTypeValue;
|
|
|
|
|
|
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");
|
|
|
|
|
|
$(".whiteListAction").addClass("hidden");
|
2018-12-17 00:21:27 +08:00
|
|
|
|
$(".spoofingAction").addClass("hidden");
|
2018-12-28 19:24:36 +06:00
|
|
|
|
$(".intensity").removeClass("hidden");//域名关联度
|
2018-11-14 15:30:25 +08:00
|
|
|
|
if(interceptRatelimitIp == 'intercept_ratelimit_ip'){
|
|
|
|
|
|
$("select[name='"+protocolNamePrefix+"protocol']").find("option").remove();
|
|
|
|
|
|
$("select[name='"+protocolNamePrefix+"protocol']").selectpicker("refresh");
|
|
|
|
|
|
//$("select[name='"+protocolNamePrefix+"protocol']").append("<option value='0' selected>"+$.validator.messages.all+"</option>");
|
|
|
|
|
|
$("select[name='"+protocolNamePrefix+"protocol']").append("<option value='6' selected>TCP</option>");
|
|
|
|
|
|
//$("select[name='"+protocolNamePrefix+"protocol']").append("<option value='17'>UDP</option>");
|
|
|
|
|
|
$("select[name='"+protocolNamePrefix+"protocol']").selectpicker("refresh");
|
|
|
|
|
|
}
|
|
|
|
|
|
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");
|
|
|
|
|
|
$(".whiteListAction").addClass("hidden");
|
2018-12-17 00:21:27 +08:00
|
|
|
|
$(".spoofingAction").addClass("hidden");
|
2018-12-28 19:24:36 +06:00
|
|
|
|
$(".intensity").addClass("hidden");//域名关联度
|
2019-01-10 13:30:19 +06:00
|
|
|
|
if(interceptRatelimitIp == 'intercept_ratelimit_ip'){
|
|
|
|
|
|
var selectedOp = $("select[name='"+protocolNamePrefix+"protocol']").find("option[selected]").val();
|
2018-11-14 15:30:25 +08:00
|
|
|
|
$("select[name='"+protocolNamePrefix+"protocol']").find("option").remove();
|
|
|
|
|
|
$("select[name='"+protocolNamePrefix+"protocol']").selectpicker("refresh");
|
2019-01-10 13:30:19 +06:00
|
|
|
|
if((selectedOp == "0") || (typeof selectedOp == "undefined") || (!"${_cfg.cfgId}")){
|
|
|
|
|
|
var option1 = "<option value='0' selected>"+$.validator.messages.arbitrary+"</option>";
|
|
|
|
|
|
var option2 = "<option value='6'>TCP</option>";
|
|
|
|
|
|
var option3 = "<option value='17'>UDP</option>";
|
|
|
|
|
|
}else if(selectedOp == "6"){
|
|
|
|
|
|
var option1 = "<option value='0'>"+$.validator.messages.arbitrary+"</option>";
|
|
|
|
|
|
var option2 = "<option value='6' selected>TCP</option>";
|
|
|
|
|
|
var option3 = "<option value='17'>UDP</option>";
|
|
|
|
|
|
}else{
|
|
|
|
|
|
var option1 = "<option value='0'>"+$.validator.messages.arbitrary+"</option>";
|
|
|
|
|
|
var option2 = "<option value='6'>TCP</option>";
|
|
|
|
|
|
var option3 = "<option value='17' selected>UDP</option>";
|
|
|
|
|
|
}
|
|
|
|
|
|
$("select[name='"+protocolNamePrefix+"protocol']").append(option1);
|
|
|
|
|
|
$("select[name='"+protocolNamePrefix+"protocol']").append(option2);
|
|
|
|
|
|
$("select[name='"+protocolNamePrefix+"protocol']").append(option3);
|
2018-11-14 15:30:25 +08:00
|
|
|
|
$("select[name='"+protocolNamePrefix+"protocol']").selectpicker("refresh");
|
|
|
|
|
|
switchRateLimitType();
|
|
|
|
|
|
}
|
|
|
|
|
|
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");
|
|
|
|
|
|
$(".whiteListAction").addClass("hidden");
|
2018-12-17 00:21:27 +08:00
|
|
|
|
$(".spoofingAction").addClass("hidden");
|
2018-12-28 19:24:36 +06:00
|
|
|
|
$(".intensity").addClass("hidden");//域名关联度
|
2018-11-14 15:30:25 +08:00
|
|
|
|
if(interceptRatelimitIp == 'intercept_ratelimit_ip'){
|
|
|
|
|
|
$("select[name='"+protocolNamePrefix+"protocol']").find("option").remove();
|
|
|
|
|
|
$("select[name='"+protocolNamePrefix+"protocol']").selectpicker("refresh");
|
|
|
|
|
|
$("select[name='"+protocolNamePrefix+"protocol']").append("<option value='17' selected>UDP</option>")
|
|
|
|
|
|
$("select[name='"+protocolNamePrefix+"protocol']").append("<option value='1' >ICMP</option>")
|
|
|
|
|
|
$("select[name='"+protocolNamePrefix+"protocol']").selectpicker("refresh");
|
|
|
|
|
|
}
|
|
|
|
|
|
if(interceptReplacePktBin == 'intercept_replace_pkt_bin' && cfgId == ""){
|
|
|
|
|
|
$("."+interceptReplacePktBin).removeClass("hidden");
|
|
|
|
|
|
$("."+interceptReplacePktBin).find("span").removeClass("hidden");
|
|
|
|
|
|
}
|
|
|
|
|
|
}else if(action==128){
|
|
|
|
|
|
$(".monitAction").addClass("hidden");
|
|
|
|
|
|
$(".ratelimitAction").addClass("hidden");
|
|
|
|
|
|
$(".replaceAction").addClass("hidden");
|
|
|
|
|
|
$(".whiteListAction").removeClass("hidden");
|
2018-12-17 00:21:27 +08:00
|
|
|
|
$(".spoofingAction").addClass("hidden");
|
2018-12-28 19:24:36 +06:00
|
|
|
|
$(".intensity").addClass("hidden");//域名关联度
|
2018-11-14 15:30:25 +08:00
|
|
|
|
if(interceptRatelimitIp == 'intercept_ratelimit_ip'){
|
2019-01-10 13:30:19 +06:00
|
|
|
|
var selectedOp = $("select[name='"+protocolNamePrefix+"protocol']").find("option[selected]").val();
|
2018-11-14 15:30:25 +08:00
|
|
|
|
$("select[name='"+protocolNamePrefix+"protocol']").find("option").remove();
|
|
|
|
|
|
$("select[name='"+protocolNamePrefix+"protocol']").selectpicker("refresh");
|
|
|
|
|
|
//$("select[name='"+protocolNamePrefix+"protocol']").append("<option value='0' selected>"+$.validator.messages.all+"</option>")
|
2019-01-10 13:30:19 +06:00
|
|
|
|
if((selectedOp == "6") || (typeof selectedOp == "undefined")){
|
|
|
|
|
|
var option1 = "<option value='6' selected>TCP</option>";
|
|
|
|
|
|
var option2 = "<option value='17'>UDP</option>";
|
|
|
|
|
|
}else if(selectedOp == "17"){
|
|
|
|
|
|
var option1 = "<option value='6'>TCP</option>";
|
|
|
|
|
|
var option2 = "<option value='17' selected>UDP</option>";
|
|
|
|
|
|
}else{
|
|
|
|
|
|
var option1 = "<option value='6' selected>TCP</option>";
|
|
|
|
|
|
var option2 = "<option value='17'>UDP</option>";
|
|
|
|
|
|
}
|
|
|
|
|
|
$("select[name='"+protocolNamePrefix+"protocol']").append(option1)
|
|
|
|
|
|
$("select[name='"+protocolNamePrefix+"protocol']").append(option2)
|
2018-11-14 15:30:25 +08:00
|
|
|
|
$("select[name='"+protocolNamePrefix+"protocol']").selectpicker("refresh");
|
|
|
|
|
|
}
|
|
|
|
|
|
if(interceptReplacePktBin == 'intercept_replace_pkt_bin'){
|
|
|
|
|
|
$("."+interceptReplacePktBin).addClass("hidden");
|
|
|
|
|
|
$("."+interceptReplacePktBin+"_div").addClass("hidden");
|
|
|
|
|
|
}
|
2018-12-17 00:21:27 +08:00
|
|
|
|
}else if(action==48){
|
|
|
|
|
|
//重定向,IP仿冒业务
|
|
|
|
|
|
$(".monitAction").addClass("hidden");
|
|
|
|
|
|
$(".ratelimitAction").addClass("hidden");
|
|
|
|
|
|
$(".replaceAction").addClass("hidden");
|
|
|
|
|
|
$(".whiteListAction").addClass("hidden");
|
|
|
|
|
|
$(".spoofingAction").removeClass("hidden");
|
2018-12-28 19:24:36 +06:00
|
|
|
|
$(".intensity").addClass("hidden");//域名关联度
|
2018-12-17 00:21:27 +08:00
|
|
|
|
if(interceptRatelimitIp == 'intercept_ratelimit_ip'){
|
|
|
|
|
|
$("select[name='"+protocolNamePrefix+"protocol']").find("option").remove();
|
|
|
|
|
|
$("select[name='"+protocolNamePrefix+"protocol']").selectpicker("refresh");
|
|
|
|
|
|
$("select[name='"+protocolNamePrefix+"protocol']").append("<option value='17' selected>UDP</option>")
|
|
|
|
|
|
$("select[name='"+protocolNamePrefix+"protocol']").append("<option value='6' >TCP</option>")
|
|
|
|
|
|
$("select[name='"+protocolNamePrefix+"protocol']").selectpicker("refresh");
|
|
|
|
|
|
}
|
|
|
|
|
|
if(interceptReplacePktBin == 'intercept_replace_pkt_bin' && cfgId == ""){
|
|
|
|
|
|
$("."+interceptReplacePktBin).addClass("hidden");
|
|
|
|
|
|
$("."+interceptReplacePktBin).find("span").removeClass("hidden");
|
|
|
|
|
|
}
|
2018-11-14 15:30:25 +08:00
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
}
|
2018-08-21 13:38:26 +08:00
|
|
|
|
</script>
|
|
|
|
|
|
</head>
|
|
|
|
|
|
<body>
|
2018-09-30 09:56:20 +08:00
|
|
|
|
<!-- fucntion_ID 200-IP 201-DOMAIN -->
|
2018-12-28 19:24:36 +06:00
|
|
|
|
<c:if test="${_cfg.functionId eq 214}">
|
2018-09-30 09:56:20 +08:00
|
|
|
|
<c:set var="interceptType" value="Ip"/>
|
|
|
|
|
|
</c:if>
|
2018-12-28 19:24:36 +06:00
|
|
|
|
<c:if test="${_cfg.functionId eq 200}">
|
|
|
|
|
|
<c:set var="interceptType" value="Ip"/>
|
|
|
|
|
|
</c:if>
|
|
|
|
|
|
<c:if test="${cfg.functionId eq 201}">
|
2018-09-30 09:56:20 +08:00
|
|
|
|
<c:set var="interceptType" value="Domain"/>
|
|
|
|
|
|
</c:if>
|
|
|
|
|
|
<c:if test="${_cfg.functionId eq 212}">
|
|
|
|
|
|
<c:set var="interceptType" value="Domain"/>
|
|
|
|
|
|
</c:if>
|
2018-08-21 13:38:26 +08:00
|
|
|
|
<span id="keywordError" style="display:none"><spring:message code="required"></spring:message></span>
|
|
|
|
|
|
<span id="tagsinputTip" style="display:none"><spring:message code="multiple_keywords_tip"></spring:message></span>
|
2018-11-06 11:36:31 +08:00
|
|
|
|
<span id="certNotMatchDomain" style="display:none"><spring:message code="cert_not_match_domain"></spring:message></span>
|
|
|
|
|
|
<!-- Domain and certificate information do not match! -->
|
2018-08-21 13:38:26 +08:00
|
|
|
|
<div class="page-content">
|
2018-09-30 11:36:09 +08:00
|
|
|
|
<h3 class="page-title">
|
|
|
|
|
|
<spring:message code="${_cfg.menuNameCode}"></spring:message>
|
|
|
|
|
|
</h3>
|
2018-08-21 13:38:26 +08:00
|
|
|
|
<div class="row">
|
|
|
|
|
|
<div class="col-md-12">
|
|
|
|
|
|
<div class="portlet box blue">
|
|
|
|
|
|
<div class="portlet-title">
|
|
|
|
|
|
<div class="caption">
|
|
|
|
|
|
<i class="fa fa-gift"></i>
|
|
|
|
|
|
<c:if test="${empty _cfg.cfgId}">
|
|
|
|
|
|
<spring:message code="add"></spring:message>
|
|
|
|
|
|
</c:if>
|
|
|
|
|
|
<c:if test="${not empty _cfg.cfgId}">
|
|
|
|
|
|
<spring:message code="edit"></spring:message>
|
|
|
|
|
|
</c:if>
|
|
|
|
|
|
</div>
|
|
|
|
|
|
</div>
|
|
|
|
|
|
<div class="portlet-body form">
|
|
|
|
|
|
<!-- BEGIN FORM-->
|
2018-08-23 15:21:50 +08:00
|
|
|
|
<form id="cfgFrom" action="${ctx}/proxy/intercept/${fn:toLowerCase(interceptType) }/saveOrUpdate"
|
2018-08-21 13:38:26 +08:00
|
|
|
|
method="post" class="form-horizontal">
|
|
|
|
|
|
<input type="hidden" name="cfgId" value="${_cfg.cfgId}">
|
|
|
|
|
|
<input type="hidden" name="compileId" value="${_cfg.compileId}">
|
|
|
|
|
|
<input type="hidden" name="functionId" value="${_cfg.functionId}">
|
2018-08-31 13:02:25 +08:00
|
|
|
|
<input type="hidden" id="serviceId" name="serviceId" value="${_cfg.serviceId}">
|
2018-11-27 11:19:56 +08:00
|
|
|
|
<input type="hidden" id="regionSize" name="regionSize" value="${fn:length(regionList)}">
|
2019-04-14 17:17:58 +08:00
|
|
|
|
<input type="hidden" name="isValid" value="${_cfg.isValid}">
|
|
|
|
|
|
<input type="hidden" name="isAudit" value="${_cfg.isAudit}">
|
2019-01-12 20:10:25 +08:00
|
|
|
|
<!-- <input type="hidden" id="doLog" name="doLog" value="2"> -->
|
2018-08-21 13:38:26 +08:00
|
|
|
|
<div class="form-body">
|
|
|
|
|
|
<div class="row">
|
|
|
|
|
|
<div class="col-md-6">
|
|
|
|
|
|
<div class="form-group">
|
|
|
|
|
|
<label class="control-label col-md-3"><spring:message
|
|
|
|
|
|
code="config_describe" /></label>
|
|
|
|
|
|
<div class="col-md-6">
|
|
|
|
|
|
<input class="form-control" type="text" name="cfgDesc"
|
|
|
|
|
|
value="${_cfg.cfgDesc}">
|
|
|
|
|
|
</div>
|
|
|
|
|
|
</div>
|
|
|
|
|
|
</div>
|
|
|
|
|
|
<div class="col-md-6">
|
|
|
|
|
|
<div class="form-group">
|
|
|
|
|
|
<label class="control-label col-md-3"><spring:message
|
|
|
|
|
|
code="action" /></label>
|
|
|
|
|
|
<div class="col-md-6">
|
|
|
|
|
|
<c:forEach items="${serviceList}" var="service"
|
|
|
|
|
|
varStatus="satus">
|
|
|
|
|
|
<label class="radio-inline"> <c:if
|
|
|
|
|
|
test="${_cfg.functionId eq service.functionId}">
|
2019-01-13 18:32:53 +08:00
|
|
|
|
<input type="radio" name="action" class="action"
|
2018-08-21 13:38:26 +08:00
|
|
|
|
serviceId="${service.serviceId }"
|
|
|
|
|
|
protocolId="${service.protocolId }"
|
2019-01-12 20:10:25 +08:00
|
|
|
|
configDoLog="${service.configDoLog }"
|
2018-08-21 13:38:26 +08:00
|
|
|
|
value="${service.action }" class="required action"
|
|
|
|
|
|
<c:if test="${_cfg.action==service.action || (_cfg.action==null && satus.index==0)}">checked</c:if>>
|
|
|
|
|
|
<c:forEach items="${fns:getDictList('SERVICE_ACTION') }" var="dict">
|
2018-11-02 11:23:49 +08:00
|
|
|
|
<c:if test="${(dict.itemCode eq service.action) && (service.action eq 1) }">
|
2019-05-21 19:50:54 +08:00
|
|
|
|
<spring:message code="forward"/>
|
2018-11-02 11:23:49 +08:00
|
|
|
|
</c:if>
|
2018-11-14 15:30:25 +08:00
|
|
|
|
<c:if test="${(dict.itemCode eq service.action) && (service.action eq 128) }">
|
|
|
|
|
|
<spring:message code="bypass"/>
|
|
|
|
|
|
</c:if>
|
2018-12-17 00:21:27 +08:00
|
|
|
|
<c:if test="${(dict.itemCode eq service.action) && (service.action eq 48) }">
|
|
|
|
|
|
<spring:message code="Spoofing"/>
|
|
|
|
|
|
</c:if>
|
|
|
|
|
|
<c:if test="${(dict.itemCode eq service.action) && (service.action ne 1 && service.action ne 128 && service.action ne 48 ) }">
|
2018-08-21 13:38:26 +08:00
|
|
|
|
<spring:message code="${dict.itemValue }"/>
|
|
|
|
|
|
</c:if>
|
|
|
|
|
|
</c:forEach>
|
|
|
|
|
|
</c:if>
|
|
|
|
|
|
</label>
|
|
|
|
|
|
</c:forEach>
|
|
|
|
|
|
</div>
|
|
|
|
|
|
<div for="action"></div>
|
|
|
|
|
|
</div>
|
|
|
|
|
|
</div>
|
|
|
|
|
|
</div>
|
2018-09-13 13:35:04 +08:00
|
|
|
|
<!-- dolog begin-->
|
2019-01-12 20:10:25 +08:00
|
|
|
|
<div class="row interceptDoLog doLog">
|
2018-09-13 13:35:04 +08:00
|
|
|
|
<div class="col-md-6">
|
|
|
|
|
|
<div class="form-group">
|
|
|
|
|
|
<label class="control-label col-md-3"><spring:message code="do_log" /></label>
|
|
|
|
|
|
<c:forEach items="${fns:getDictList('DO_LOG') }" var="dict">
|
|
|
|
|
|
<c:choose>
|
|
|
|
|
|
<c:when test="${dict.itemCode eq _cfg.doLog}">
|
|
|
|
|
|
<label class="radio-inline">
|
|
|
|
|
|
<input type="radio" name="doLog" checked value="${dict.itemCode}" ><spring:message code="${dict.itemValue}"/>
|
|
|
|
|
|
</label>
|
|
|
|
|
|
</c:when>
|
|
|
|
|
|
<c:otherwise>
|
|
|
|
|
|
<label class="radio-inline">
|
|
|
|
|
|
<input type="radio" name="doLog" value="${dict.itemCode}" ><spring:message code="${dict.itemValue}"/>
|
|
|
|
|
|
</label>
|
|
|
|
|
|
</c:otherwise>
|
|
|
|
|
|
</c:choose>
|
|
|
|
|
|
|
|
|
|
|
|
</c:forEach>
|
|
|
|
|
|
</div>
|
|
|
|
|
|
</div>
|
2019-01-12 20:10:25 +08:00
|
|
|
|
</div>
|
2018-09-13 13:35:04 +08:00
|
|
|
|
<!-- dolog end-->
|
2018-11-14 15:30:25 +08:00
|
|
|
|
|
2018-08-21 13:38:26 +08:00
|
|
|
|
<%-- action 为1 监测时 可以选择证书--%>
|
2019-05-21 19:50:54 +08:00
|
|
|
|
<h4 class="form-section monitAction">
|
2018-10-15 19:30:04 +08:00
|
|
|
|
<spring:message code="action_region" />
|
|
|
|
|
|
<small></small>
|
2019-05-21 19:50:54 +08:00
|
|
|
|
</h4>
|
|
|
|
|
|
<fieldset class="monitAction hidden">
|
|
|
|
|
|
<legend><spring:message code="intercept_file_strategy" /></legend>
|
|
|
|
|
|
<div class="row">
|
|
|
|
|
|
<div class="col-md-6">
|
|
|
|
|
|
<div class="form-group">
|
|
|
|
|
|
<label class="control-label col-md-3"><spring:message
|
|
|
|
|
|
code="intercept_file_strategy" /></label>
|
|
|
|
|
|
<div class="col-md-6">
|
|
|
|
|
|
<select name="keyring" class="selectpicker show-tick form-control">
|
|
|
|
|
|
<option value="" <c:if test="${empty _cfg.userRegion.keyring}">selected</c:if> ><spring:message code="selected"/></option>
|
|
|
|
|
|
<c:forEach items="${certificateList}" var="certificate">
|
|
|
|
|
|
<option value="${certificate.compileId}"
|
|
|
|
|
|
cn="${certificate.cn}"
|
|
|
|
|
|
san="${certificate.altName}"
|
|
|
|
|
|
keyringType="${certificate.keyringType}"
|
|
|
|
|
|
<c:if test="${_cfg.userRegion.keyring eq fn:trim(certificate.compileId)}">
|
|
|
|
|
|
selected
|
|
|
|
|
|
</c:if>
|
|
|
|
|
|
>
|
|
|
|
|
|
${certificate.cfgDesc}
|
|
|
|
|
|
</option>
|
|
|
|
|
|
|
|
|
|
|
|
</c:forEach>
|
|
|
|
|
|
</select>
|
|
|
|
|
|
</div>
|
|
|
|
|
|
<span id="certDomain" title=""
|
|
|
|
|
|
class="hidden" data-icon="" style="cursor:default"></span>
|
|
|
|
|
|
<div for="keyring"></div>
|
|
|
|
|
|
</div>
|
|
|
|
|
|
</div>
|
|
|
|
|
|
</div>
|
|
|
|
|
|
</fieldset>
|
2019-05-22 17:58:31 +08:00
|
|
|
|
<br class="monitAction hidden">
|
2019-05-21 19:50:54 +08:00
|
|
|
|
<fieldset class="monitAction hidden">
|
|
|
|
|
|
<legend><spring:message code="exclusions" /></legend>
|
|
|
|
|
|
<div class="row">
|
|
|
|
|
|
<div class="col-md-6">
|
|
|
|
|
|
<div class="form-group">
|
|
|
|
|
|
<label class="control-label col-md-3">
|
|
|
|
|
|
<spring:message code="ev_cert" />
|
|
|
|
|
|
</label>
|
|
|
|
|
|
<div class="col-md-6">
|
|
|
|
|
|
<div class="bootstrap-switch">
|
|
|
|
|
|
<input type="checkbox" id="ev_cert" name="ev_cert" class="switch userRegion"
|
|
|
|
|
|
value="${_cfg.cfgId eq null?0:_cfg.userRegion.exclusions.ev_cert }" <c:if test="${ _cfg.userRegion.exclusions.ev_cert eq 1}">checked</c:if>/>
|
|
|
|
|
|
</div>
|
|
|
|
|
|
</div>
|
|
|
|
|
|
<div for="ev_cert"></div>
|
|
|
|
|
|
</div>
|
|
|
|
|
|
</div>
|
|
|
|
|
|
<div class="col-md-6">
|
|
|
|
|
|
<div class="form-group">
|
|
|
|
|
|
<label class="control-label col-md-3">
|
|
|
|
|
|
<spring:message code="cert_transparency" />
|
|
|
|
|
|
</label>
|
|
|
|
|
|
<div class="col-md-6">
|
|
|
|
|
|
<div class="bootstrap-switch">
|
|
|
|
|
|
<input type="checkbox" id="cert_transparency" name="cert_transparency" class="switch userRegion"
|
|
|
|
|
|
value="${_cfg.cfgId eq null?0:_cfg.userRegion.exclusions.cert_transparency }" <c:if test="${_cfg.userRegion.exclusions.cert_transparency eq 1}">checked</c:if>/>
|
|
|
|
|
|
</div>
|
|
|
|
|
|
</div>
|
|
|
|
|
|
<div for="cert_transparency"></div>
|
|
|
|
|
|
</div>
|
|
|
|
|
|
</div>
|
|
|
|
|
|
</div>
|
|
|
|
|
|
<div class="row">
|
|
|
|
|
|
<div class="col-md-6">
|
|
|
|
|
|
<div class="form-group">
|
|
|
|
|
|
<label class="control-label col-md-3">
|
|
|
|
|
|
<spring:message code="client_cert_req" />
|
|
|
|
|
|
</label>
|
|
|
|
|
|
<div class="col-md-6">
|
|
|
|
|
|
<div class="bootstrap-switch">
|
|
|
|
|
|
<input type="checkbox" id="client_cert_req" name="client_cert_req" class="switch userRegion"
|
|
|
|
|
|
value="${_cfg.cfgId eq null?1:_cfg.userRegion.exclusions.client_cert_req }" <c:if test="${_cfg.cfgId eq null or _cfg.userRegion.exclusions.client_cert_req eq 1}">checked</c:if>/>
|
|
|
|
|
|
</div>
|
|
|
|
|
|
</div>
|
|
|
|
|
|
<div for="client_cert_req"></div>
|
|
|
|
|
|
</div>
|
|
|
|
|
|
</div>
|
|
|
|
|
|
<div class="col-md-6">
|
|
|
|
|
|
<div class="form-group">
|
|
|
|
|
|
<label class="control-label col-md-3">
|
|
|
|
|
|
<spring:message code="pinning" />
|
|
|
|
|
|
</label>
|
|
|
|
|
|
<div class="col-md-6">
|
|
|
|
|
|
<div class="bootstrap-switch">
|
|
|
|
|
|
<input type="checkbox" id="pinning" name="pinning" class="switch userRegion"
|
|
|
|
|
|
value="${_cfg.cfgId eq null?1:_cfg.userRegion.exclusions.pinning }" <c:if test="${_cfg.cfgId eq null or _cfg.userRegion.exclusions.pinning eq 1}">checked</c:if>/>
|
|
|
|
|
|
</div>
|
|
|
|
|
|
</div>
|
|
|
|
|
|
<div for="pinning"></div>
|
|
|
|
|
|
</div>
|
|
|
|
|
|
</div>
|
|
|
|
|
|
</div>
|
|
|
|
|
|
</fieldset>
|
2019-05-22 17:58:31 +08:00
|
|
|
|
<br class="monitAction hidden">
|
2019-05-21 19:50:54 +08:00
|
|
|
|
<fieldset class="monitAction hidden">
|
|
|
|
|
|
<legend><spring:message code="cert_verify" /></legend>
|
|
|
|
|
|
<div class="panel panel-default">
|
|
|
|
|
|
<div class="panel-heading">
|
|
|
|
|
|
<h3 class="panel-title">
|
|
|
|
|
|
<spring:message code="approach" />
|
|
|
|
|
|
</h3>
|
|
|
|
|
|
</div>
|
|
|
|
|
|
<div class="panel-body">
|
|
|
|
|
|
<div class="row approach">
|
2018-08-21 13:38:26 +08:00
|
|
|
|
<div class="col-md-6">
|
2019-05-21 19:50:54 +08:00
|
|
|
|
<div class="form-group">
|
|
|
|
|
|
<label class="control-label col-md-3">
|
|
|
|
|
|
<spring:message code="cn" />
|
|
|
|
|
|
</label>
|
|
|
|
|
|
<div class="col-md-6">
|
|
|
|
|
|
<div class="bootstrap-switch">
|
|
|
|
|
|
<input type="checkbox" id="ev_cert" name="cn" class="switch userRegion"
|
|
|
|
|
|
value="${_cfg.cfgId eq null?1:_cfg.userRegion.cert_verify.approach.cn }" <c:if test="${_cfg.cfgId eq null or _cfg.userRegion.cert_verify.approach.cn eq 1}">checked</c:if>/>
|
|
|
|
|
|
</div>
|
|
|
|
|
|
</div>
|
|
|
|
|
|
<div for="cn"></div>
|
|
|
|
|
|
</div>
|
|
|
|
|
|
</div>
|
|
|
|
|
|
<div class="col-md-6">
|
|
|
|
|
|
<div class="form-group">
|
|
|
|
|
|
<label class="control-label col-md-3">
|
|
|
|
|
|
<spring:message code="issuer" />
|
|
|
|
|
|
</label>
|
|
|
|
|
|
<div class="col-md-6">
|
|
|
|
|
|
<div class="bootstrap-switch">
|
|
|
|
|
|
<input type="checkbox" id="issuer" name="issuer" class="switch userRegion"
|
|
|
|
|
|
value="${_cfg.cfgId eq null?1:_cfg.userRegion.cert_verify.approach.issuer }" <c:if test="${_cfg.cfgId eq null or _cfg.userRegion.cert_verify.approach.issuer eq 1}">checked</c:if>/>
|
|
|
|
|
|
</div>
|
|
|
|
|
|
</div>
|
|
|
|
|
|
<div for="issuer"></div>
|
|
|
|
|
|
</div>
|
|
|
|
|
|
</div>
|
|
|
|
|
|
</div>
|
|
|
|
|
|
<div class="row approach">
|
|
|
|
|
|
<div class="col-md-6">
|
|
|
|
|
|
<div class="form-group">
|
|
|
|
|
|
<label class="control-label col-md-3">
|
|
|
|
|
|
<spring:message code="self_signed" />
|
|
|
|
|
|
</label>
|
|
|
|
|
|
<div class="col-md-6">
|
|
|
|
|
|
<div class="bootstrap-switch">
|
|
|
|
|
|
<input type="checkbox" id="self-signed" name="self-signed" class="switch userRegion"
|
|
|
|
|
|
value="${_cfg.cfgId eq null?1:_cfg.userRegion.cert_verify.approach['self-signed'] }" <c:if test="${_cfg.cfgId eq null or _cfg.userRegion.cert_verify.approach['self-signed'] eq 1}">checked</c:if>/>
|
|
|
|
|
|
</div>
|
|
|
|
|
|
</div>
|
|
|
|
|
|
<div for="self-signed"></div>
|
|
|
|
|
|
</div>
|
|
|
|
|
|
</div>
|
|
|
|
|
|
<div class="col-md-6">
|
|
|
|
|
|
<div class="form-group">
|
|
|
|
|
|
<label class="control-label col-md-3">
|
|
|
|
|
|
<spring:message code="expiration" />
|
|
|
|
|
|
</label>
|
|
|
|
|
|
<div class="col-md-6">
|
|
|
|
|
|
<div class="bootstrap-switch">
|
|
|
|
|
|
<input type="checkbox" id="expiration" name="expiration" class="switch userRegion"
|
|
|
|
|
|
value="${_cfg.cfgId eq null?1:_cfg.userRegion.cert_verify.approach.expiration }" <c:if test="${_cfg.cfgId eq null or _cfg.userRegion.cert_verify.approach.expiration eq 1}">checked</c:if>/>
|
|
|
|
|
|
</div>
|
|
|
|
|
|
</div>
|
|
|
|
|
|
<div for="expiration"></div>
|
|
|
|
|
|
</div>
|
|
|
|
|
|
</div>
|
|
|
|
|
|
</div>
|
|
|
|
|
|
</div>
|
|
|
|
|
|
</div>
|
|
|
|
|
|
<%-- <fieldset>
|
|
|
|
|
|
<legend><spring:message code="approach" />
|
|
|
|
|
|
</legend> --%>
|
|
|
|
|
|
<!-- </fieldset><br/> -->
|
|
|
|
|
|
|
|
|
|
|
|
<div class="row">
|
|
|
|
|
|
<div class="col-md-6">
|
|
|
|
|
|
<div class="form-group ">
|
|
|
|
|
|
<label class="control-label col-md-3"><spring:message code="cert_verify_fail_method"/></label>
|
|
|
|
|
|
<div class="col-md-6">
|
|
|
|
|
|
<select id="fail_method" name="fail_method" data-live-search="true" class="selectpicker form-control required">
|
|
|
|
|
|
<c:forEach items="${fns:getDictList('FAIL_METHOD')}" var="dictC">
|
|
|
|
|
|
<option value="${dictC.itemCode}" <c:if test="${(_cfg.userRegion.cert_verify.fail_method eq null and dictC.itemCode eq 'pass-through') or (_cfg.userRegion.cert_verify.fail_method eq dictC.itemCode)}">selected</c:if>><spring:message code="${dictC.itemValue}"/></option>
|
2018-08-24 15:41:05 +08:00
|
|
|
|
</c:forEach>
|
2019-05-21 19:50:54 +08:00
|
|
|
|
</select>
|
|
|
|
|
|
</div>
|
|
|
|
|
|
<div for="fail_method"></div>
|
|
|
|
|
|
</div>
|
|
|
|
|
|
</div>
|
|
|
|
|
|
</div>
|
|
|
|
|
|
</fieldset>
|
2019-05-22 17:58:31 +08:00
|
|
|
|
<br class="monitAction hidden">
|
2019-05-21 19:50:54 +08:00
|
|
|
|
<fieldset class="monitAction hidden">
|
|
|
|
|
|
<legend><spring:message code="ssl_version" /></legend>
|
|
|
|
|
|
<div class="row">
|
|
|
|
|
|
<div class="col-md-6">
|
|
|
|
|
|
<div class="form-group">
|
|
|
|
|
|
<label class="control-label col-md-3">
|
|
|
|
|
|
<spring:message code="mirror_client" />
|
|
|
|
|
|
</label>
|
|
|
|
|
|
<div class="col-md-6">
|
|
|
|
|
|
<div class="bootstrap-switch">
|
|
|
|
|
|
<input type="checkbox" id="mirror_client" name="mirror_client" class="switch userRegion"
|
|
|
|
|
|
value="${_cfg.userRegion.ssl_ver.mirror_client }" <c:if test="${_cfg.userRegion.ssl_ver.mirror_client eq 1}">checked</c:if>/>
|
|
|
|
|
|
</div>
|
|
|
|
|
|
</div>
|
|
|
|
|
|
<div for="mirror_client"></div>
|
2018-08-21 13:38:26 +08:00
|
|
|
|
</div>
|
|
|
|
|
|
</div>
|
|
|
|
|
|
</div>
|
2019-05-21 19:50:54 +08:00
|
|
|
|
<div class="row ssl_version <c:if test="${_cfg.userRegion.ssl_ver.mirror_client eq 1}">hidden</c:if>">
|
|
|
|
|
|
<div class="col-md-6">
|
|
|
|
|
|
<div class="form-group">
|
|
|
|
|
|
<label class="control-label col-md-3">
|
|
|
|
|
|
<spring:message code="min" />
|
|
|
|
|
|
</label>
|
|
|
|
|
|
<div class="col-md-6">
|
|
|
|
|
|
<select id="min" name="min" class="selectpicker form-control sslVersionCheck">
|
|
|
|
|
|
<c:forEach items="${fns:getDictList('SSL_VERSION')}" var="dictC">
|
|
|
|
|
|
<option value="${dictC.itemCode}" data-sort="${dictC.itemSort}" <c:if test="${((_cfg.userRegion.ssl_ver.min eq null) and(dictC.itemCode eq 'ssl3'))or (_cfg.userRegion.ssl_ver.min eq dictC.itemCode)}">selected</c:if>><spring:message code="${dictC.itemValue}"/></option>
|
|
|
|
|
|
</c:forEach>
|
|
|
|
|
|
</select>
|
|
|
|
|
|
</div>
|
|
|
|
|
|
<div for="min"></div>
|
|
|
|
|
|
</div>
|
|
|
|
|
|
</div>
|
|
|
|
|
|
<div class="col-md-6">
|
|
|
|
|
|
<div class="form-group">
|
|
|
|
|
|
<label class="control-label col-md-3">
|
|
|
|
|
|
<spring:message code="max" />
|
|
|
|
|
|
</label>
|
|
|
|
|
|
<div class="col-md-6">
|
|
|
|
|
|
<select id="max" name="max" class="selectpicker form-control sslVersionCheck">
|
|
|
|
|
|
<c:forEach items="${fns:getDictList('SSL_VERSION')}" var="dictC">
|
|
|
|
|
|
<option value="${dictC.itemCode}" data-sort="${dictC.itemSort}" <c:if test="${((_cfg.userRegion.ssl_ver.max eq null) and(dictC.itemCode eq 'tls13'))or (_cfg.userRegion.ssl_ver.max eq dictC.itemCode)}">selected</c:if>><spring:message code="${dictC.itemValue}"/></option>
|
|
|
|
|
|
</c:forEach>
|
|
|
|
|
|
</select>
|
|
|
|
|
|
</div>
|
|
|
|
|
|
<div for="max"></div>
|
|
|
|
|
|
</div>
|
|
|
|
|
|
</div>
|
|
|
|
|
|
</div>
|
|
|
|
|
|
</fieldset>
|
2019-05-22 17:58:31 +08:00
|
|
|
|
<br class="monitAction hidden">
|
2019-05-21 19:50:54 +08:00
|
|
|
|
<fieldset class="monitAction hidden">
|
|
|
|
|
|
<legend><spring:message code="decrypt_mirror" /></legend>
|
|
|
|
|
|
<div class="row">
|
|
|
|
|
|
<div class="col-md-6">
|
|
|
|
|
|
<div class="form-group">
|
|
|
|
|
|
<label class="control-label col-md-3">
|
|
|
|
|
|
<spring:message code="enable" />
|
|
|
|
|
|
</label>
|
|
|
|
|
|
<div class="col-md-6">
|
|
|
|
|
|
<div class="bootstrap-switch">
|
|
|
|
|
|
<input type="checkbox" id="enable" name="enable" class="switch userRegion"
|
|
|
|
|
|
value="${_cfg.userRegion.decrypt_mirror.enable }" <c:if test="${_cfg.userRegion.decrypt_mirror.enable eq 1}">checked</c:if>/>
|
|
|
|
|
|
</div>
|
|
|
|
|
|
</div>
|
|
|
|
|
|
<div for="enable"></div>
|
|
|
|
|
|
</div>
|
|
|
|
|
|
</div>
|
|
|
|
|
|
<div class="col-md-6 mirror_profile <c:if test="${_cfg.userRegion.decrypt_mirror.enable ne 1}">hidden</c:if>">
|
|
|
|
|
|
<div class="form-group">
|
|
|
|
|
|
<label class="control-label col-md-3">
|
|
|
|
|
|
<font color="red">*</font><spring:message code="decrypt_mirror_mirror_profile" />
|
|
|
|
|
|
</label>
|
|
|
|
|
|
<div class="col-md-6">
|
|
|
|
|
|
<select id="mirror_profile" name="mirror_profile" data-live-search="true" class="selectpicker form-control required">
|
|
|
|
|
|
<option value="" ><spring:message code="selected"/></option>
|
|
|
|
|
|
<c:forEach items="${mirrorProfiles}" var="dictC">
|
|
|
|
|
|
<option value="${dictC.compileId}" <c:if test="${_cfg.userRegion.decrypt_mirror.mirror_profile eq dictC.compileId}">selected</c:if>><spring:message code="${dictC.cfgDesc}"/></option>
|
|
|
|
|
|
</c:forEach>
|
|
|
|
|
|
</select>
|
|
|
|
|
|
</div>
|
|
|
|
|
|
<div for="mirror_profile"></div>
|
|
|
|
|
|
</div>
|
|
|
|
|
|
</div>
|
|
|
|
|
|
</div>
|
|
|
|
|
|
</fieldset>
|
2018-10-15 19:30:04 +08:00
|
|
|
|
<%-- action 为64 限速时 --%>
|
2018-08-21 13:38:26 +08:00
|
|
|
|
<div class="row ratelimitAction hidden">
|
2018-10-15 19:30:04 +08:00
|
|
|
|
<h4 class="form-section">
|
|
|
|
|
|
<spring:message code="action_region" />
|
|
|
|
|
|
<small></small>
|
|
|
|
|
|
</h4>
|
2018-08-29 15:32:06 +08:00
|
|
|
|
<div class="col-md-6 hidden">
|
2018-08-21 13:38:26 +08:00
|
|
|
|
<div class="form-group">
|
2018-08-29 10:50:40 +08:00
|
|
|
|
<label class="control-label col-md-3"><font color="red">*</font><spring:message code="limit_rate_type"/></label>
|
2018-08-21 13:38:26 +08:00
|
|
|
|
<div class="col-md-6">
|
2018-08-29 10:50:40 +08:00
|
|
|
|
<label class="radio-inline">
|
|
|
|
|
|
<input type="radio"
|
|
|
|
|
|
name="userRegion1" value="0"
|
2018-08-29 15:32:06 +08:00
|
|
|
|
<%-- <c:if test="${(userRegion1 eq 0) || (empty userRegion1)}"> --%>
|
2018-08-29 10:50:40 +08:00
|
|
|
|
checked
|
2018-08-29 15:32:06 +08:00
|
|
|
|
<%-- </c:if> --%>
|
2018-08-29 10:50:40 +08:00
|
|
|
|
class="required" >
|
|
|
|
|
|
<spring:message code="ratelimit" />
|
|
|
|
|
|
</label>
|
2018-08-29 15:32:06 +08:00
|
|
|
|
<%-- <label class="radio-inline">
|
2018-08-29 10:50:40 +08:00
|
|
|
|
<input type="radio"
|
|
|
|
|
|
name="userRegion1" value="1"
|
|
|
|
|
|
<c:if test="${(userRegion1 eq 1)}">
|
|
|
|
|
|
checked
|
|
|
|
|
|
</c:if>
|
|
|
|
|
|
class="required" >
|
|
|
|
|
|
<spring:message code="bandwith" />
|
2018-08-29 15:32:06 +08:00
|
|
|
|
</label> --%>
|
2018-08-21 13:38:26 +08:00
|
|
|
|
</div>
|
2018-08-28 17:16:49 +08:00
|
|
|
|
<div for="userRegion1"></div>
|
2018-08-21 13:38:26 +08:00
|
|
|
|
</div>
|
2018-08-29 10:50:40 +08:00
|
|
|
|
</div>
|
|
|
|
|
|
<div class="col-md-6 droprate">
|
|
|
|
|
|
<div class="form-group ">
|
|
|
|
|
|
<label class="control-label col-md-3"><font color="red">*</font><spring:message code="ratelimit"/></label>
|
|
|
|
|
|
<div class="col-md-6">
|
2018-10-17 10:06:08 +08:00
|
|
|
|
<select name="userRegion2" data-live-search="true" class="selectpicker form-control required">
|
|
|
|
|
|
<option value="" ><spring:message code="selected"/></option>
|
|
|
|
|
|
<c:forEach items="${fns:getDictList('RATE_LIMIT')}" var="ratelimitC">
|
2018-11-21 09:34:00 +08:00
|
|
|
|
<option value="${ratelimitC.itemCode}" <c:if test="${_cfg.userRegion2==ratelimitC.itemCode || (_cfg.userRegion2==null && ratelimitC.itemCode eq '0.1')}">selected</c:if>><spring:message code="${ratelimitC.itemValue}"/></option>
|
2018-10-17 10:06:08 +08:00
|
|
|
|
</c:forEach>
|
|
|
|
|
|
</select>
|
2018-08-29 10:50:40 +08:00
|
|
|
|
</div>
|
|
|
|
|
|
<div for="userRegion2"></div>
|
|
|
|
|
|
</div>
|
|
|
|
|
|
</div>
|
2018-08-29 15:32:06 +08:00
|
|
|
|
<%-- <div class="col-md-6 bandwith">
|
2018-08-29 10:50:40 +08:00
|
|
|
|
<div class="form-group">
|
|
|
|
|
|
<label class="control-label col-md-3"><font color="red">*</font><spring:message code="bandwith"/></label>
|
|
|
|
|
|
<div class="col-md-6">
|
|
|
|
|
|
<input class="form-control required number" type="text" name="userRegion3" value="${_cfg.userRegion3 }">
|
|
|
|
|
|
</div>
|
|
|
|
|
|
<div for="userRegion3"></div>
|
|
|
|
|
|
</div>
|
2018-08-29 15:32:06 +08:00
|
|
|
|
</div> --%>
|
2018-08-21 13:38:26 +08:00
|
|
|
|
</div>
|
|
|
|
|
|
<%--action 为80 替换时 可以选择替换动作--%>
|
|
|
|
|
|
<div class="row replaceAction hidden">
|
|
|
|
|
|
<h4 class="form-section">
|
|
|
|
|
|
<spring:message code="action_region" />
|
|
|
|
|
|
<small></small>
|
|
|
|
|
|
</h4>
|
|
|
|
|
|
<div class="row">
|
|
|
|
|
|
<div class="col-md-6">
|
|
|
|
|
|
<div class="form-group">
|
|
|
|
|
|
<label class="control-label col-md-3"><font color="red">*</font>
|
|
|
|
|
|
<spring:message code="replace_zone" />
|
|
|
|
|
|
</label>
|
|
|
|
|
|
<div class="col-md-6">
|
2018-08-28 17:16:49 +08:00
|
|
|
|
<select name="userRegion1"
|
2018-08-21 13:38:26 +08:00
|
|
|
|
class="selectpicker show-tick form-control required">
|
2018-08-21 21:26:05 +08:00
|
|
|
|
<option value="" ><spring:message code="selected"/></option>
|
|
|
|
|
|
<c:forEach items="${fns:getDictList('INTERCEPT_REPLACE_ZONE')}" var="replaceZoneC">
|
2018-08-28 17:16:49 +08:00
|
|
|
|
<option value="${replaceZoneC.itemCode}" <c:if test="${_cfg.userRegion1==replaceZoneC.itemCode || _cfg.userRegion1==null}">selected</c:if>><spring:message code="${replaceZoneC.itemValue}"/></option>
|
2018-08-21 13:38:26 +08:00
|
|
|
|
</c:forEach>
|
|
|
|
|
|
</select>
|
|
|
|
|
|
</div>
|
2018-08-28 17:16:49 +08:00
|
|
|
|
<div for="userRegion1"></div>
|
2018-08-21 13:38:26 +08:00
|
|
|
|
</div>
|
|
|
|
|
|
</div>
|
|
|
|
|
|
</div>
|
|
|
|
|
|
<div class="row">
|
|
|
|
|
|
<div class="col-md-6">
|
|
|
|
|
|
<div class="form-group ">
|
|
|
|
|
|
<label class="control-label col-md-3"><font color="red">*</font>
|
|
|
|
|
|
<spring:message code="replaced_content" /></label>
|
|
|
|
|
|
<div class="col-md-6">
|
2019-01-07 15:55:40 +08:00
|
|
|
|
<input class="form-control required" type="text" maxlength="1024"
|
2018-08-28 17:16:49 +08:00
|
|
|
|
name="userRegion2"
|
|
|
|
|
|
value="${_cfg.userRegion2 }">
|
2018-08-21 13:38:26 +08:00
|
|
|
|
</div>
|
2018-08-28 17:16:49 +08:00
|
|
|
|
<div for="userRegion2"></div>
|
2018-08-21 13:38:26 +08:00
|
|
|
|
</div>
|
|
|
|
|
|
</div>
|
|
|
|
|
|
<div class="col-md-6">
|
|
|
|
|
|
<div class="form-group ">
|
|
|
|
|
|
<label class="control-label col-md-3"><font color="red">*</font>
|
|
|
|
|
|
<spring:message code="replace_content" /></label>
|
|
|
|
|
|
<div class="col-md-6">
|
2019-01-07 15:55:40 +08:00
|
|
|
|
<input class="form-control required" type="text" maxlength="1024"
|
2018-08-28 17:16:49 +08:00
|
|
|
|
name="userRegion3"
|
|
|
|
|
|
value="${_cfg.userRegion3 }">
|
2018-08-21 13:38:26 +08:00
|
|
|
|
</div>
|
2018-08-28 17:16:49 +08:00
|
|
|
|
<div for="userRegion3"></div>
|
2018-08-21 13:38:26 +08:00
|
|
|
|
</div>
|
|
|
|
|
|
</div>
|
|
|
|
|
|
</div>
|
|
|
|
|
|
</div>
|
2018-12-17 00:21:27 +08:00
|
|
|
|
<div class="row spoofingAction hidden">
|
|
|
|
|
|
<h4 class="form-section">
|
|
|
|
|
|
<spring:message code="action_region" />
|
|
|
|
|
|
<small></small>
|
|
|
|
|
|
</h4>
|
|
|
|
|
|
<div class="row">
|
|
|
|
|
|
<div class="col-md-6">
|
|
|
|
|
|
<div class="form-group">
|
|
|
|
|
|
<label class="control-label col-md-3"><font color="red">*</font>
|
2018-12-27 21:00:23 +06:00
|
|
|
|
<spring:message code="spoofing" />
|
2018-12-17 00:21:27 +08:00
|
|
|
|
</label>
|
|
|
|
|
|
<div class="col-md-6">
|
|
|
|
|
|
<select name="userRegion1"
|
|
|
|
|
|
class="selectpicker show-tick form-control required">
|
|
|
|
|
|
<c:forEach items="${fns:getDictList('SPOOFING_IP_TYPE')}" var="spoofingIp">
|
2018-12-18 13:09:22 +06:00
|
|
|
|
<option value="${spoofingIp.itemCode}" <c:if test="${_cfg.userRegion1==spoofingIp.itemCode}">selected</c:if>><spring:message code="${spoofingIp.itemValue}"/></option>
|
2018-12-17 00:21:27 +08:00
|
|
|
|
</c:forEach>
|
|
|
|
|
|
</select>
|
|
|
|
|
|
</div>
|
|
|
|
|
|
<div for="userRegion1"></div>
|
|
|
|
|
|
</div>
|
|
|
|
|
|
</div>
|
|
|
|
|
|
<div class="col-md-6">
|
|
|
|
|
|
<div class="form-group ">
|
|
|
|
|
|
<label class="control-label col-md-3"><font color="red">*</font>
|
|
|
|
|
|
<spring:message code="With" /></label>
|
|
|
|
|
|
<div class="col-md-6">
|
2019-01-07 15:55:40 +08:00
|
|
|
|
<input class="form-control required ip" maxlength="1024" type="text" name="userRegion2" value="${_cfg.userRegion2}">
|
|
|
|
|
|
<input class="form-control" type="hidden" maxlength="1024" name="userRegion3" value="${_cfg.userRegion3}">
|
2018-12-27 21:00:23 +06:00
|
|
|
|
<%-- <select name="userRegion2" class="selectpicker show-tick form-control required">
|
2018-12-17 00:21:27 +08:00
|
|
|
|
<option value="" ><spring:message code="select"/></option>
|
|
|
|
|
|
<c:forEach items="${policyGroups }" var="policyGroup">
|
2018-12-27 21:00:23 +06:00
|
|
|
|
<option value="${policyGroup.cfgId}" <c:if test="${_cfg.userRegion2==policyGroup.cfgId }">selected</c:if>><spring:message code="${policyGroup.groupName}"/></option>
|
2018-12-17 00:21:27 +08:00
|
|
|
|
</c:forEach>
|
2018-12-27 21:00:23 +06:00
|
|
|
|
</select> --%>
|
2018-12-17 00:21:27 +08:00
|
|
|
|
</div>
|
|
|
|
|
|
<div for="userRegion2"></div>
|
|
|
|
|
|
</div>
|
|
|
|
|
|
</div>
|
|
|
|
|
|
</div>
|
|
|
|
|
|
<%-- <div class="row">
|
|
|
|
|
|
<div class="col-md-6">
|
|
|
|
|
|
<div class="form-group ">
|
|
|
|
|
|
<label class="control-label col-md-3"><font color="red">*</font>
|
|
|
|
|
|
<spring:message code="IP" /></label>
|
|
|
|
|
|
<div class="col-md-6">
|
|
|
|
|
|
<input class="form-control required" type="text"
|
|
|
|
|
|
name="userRegion2"
|
|
|
|
|
|
value="${_cfg.userRegion2 }">
|
|
|
|
|
|
</div>
|
|
|
|
|
|
<div for="userRegion2"></div>
|
|
|
|
|
|
</div>
|
|
|
|
|
|
</div>
|
|
|
|
|
|
|
|
|
|
|
|
</div> --%>
|
|
|
|
|
|
</div>
|
2018-11-14 15:30:25 +08:00
|
|
|
|
<%-- action 为128 白名单时 --%>
|
2018-12-28 19:24:36 +06:00
|
|
|
|
<c:if test="${_cfg.functionId eq 200}">
|
2018-11-14 15:30:25 +08:00
|
|
|
|
<div class="row whiteListAction hidden">
|
2018-11-22 11:35:09 +08:00
|
|
|
|
<%-- <h4 class="form-section">
|
2018-11-14 15:30:25 +08:00
|
|
|
|
<spring:message code="action_region" />
|
|
|
|
|
|
<small></small>
|
|
|
|
|
|
</h4>
|
|
|
|
|
|
<!-- 域名拦截增加拦截强度 -->
|
|
|
|
|
|
<div class="col-md-6">
|
|
|
|
|
|
<div class="form-group">
|
|
|
|
|
|
<label class="control-label col-md-3"><font color="red">*</font>
|
|
|
|
|
|
<spring:message code="intercept_intensity" />
|
|
|
|
|
|
</label>
|
|
|
|
|
|
<div class="col-md-6">
|
|
|
|
|
|
<select name="userRegion5"
|
|
|
|
|
|
class="selectpicker show-tick form-control required">
|
|
|
|
|
|
<c:forEach items="${fns:getDictList('INTERCEPT_DOMAIN_INTENSITY')}" var="intensityC">
|
|
|
|
|
|
<option value="${intensityC.itemCode}" <c:if test="${_cfg.userRegion5==intensityC.itemCode || (empty _cfg.userRegion5 && intensityC.itemCode eq 1)}">selected</c:if>><spring:message code="${intensityC.itemValue}"/></option>
|
|
|
|
|
|
</c:forEach>
|
|
|
|
|
|
</select>
|
|
|
|
|
|
</div>
|
|
|
|
|
|
<div for="userRegion5"></div>
|
|
|
|
|
|
</div>
|
2018-11-22 11:35:09 +08:00
|
|
|
|
</div> --%>
|
2018-11-14 15:30:25 +08:00
|
|
|
|
</div>
|
|
|
|
|
|
</c:if>
|
2018-08-21 13:38:26 +08:00
|
|
|
|
<c:set var="ipCfgIndex" value="0"></c:set>
|
|
|
|
|
|
<c:set var="complexCfgIndex" value="0"></c:set>
|
2018-08-23 15:21:50 +08:00
|
|
|
|
<c:set var="domainCfgIndex" value="0"></c:set>
|
2018-08-21 13:38:26 +08:00
|
|
|
|
<c:forEach items="${regionList}" var="region" varStatus="status">
|
|
|
|
|
|
<c:if test="${region.regionType eq 1 }">
|
|
|
|
|
|
<!--ip info-->
|
|
|
|
|
|
<c:set var="tabName" value="${region.configRegionValue}Tab"></c:set>
|
|
|
|
|
|
<h4 class="form-section">
|
|
|
|
|
|
<spring:message code="${region.configRegionValue}" />
|
|
|
|
|
|
<small> <span
|
|
|
|
|
|
class="glyphicon glyphicon-plus ${tabName}Add"
|
|
|
|
|
|
onClick="addContent(this,'${tabName}')" title="add"></span></small>
|
|
|
|
|
|
</h4>
|
|
|
|
|
|
<c:set var="cfgName" value="ipPortList[${ipCfgIndex}]"></c:set>
|
|
|
|
|
|
<%-- <c:set var="regionValue" value="${region.configRegionValue}"></c:set> --%>
|
|
|
|
|
|
<c:choose>
|
|
|
|
|
|
<c:when test="${fn:length(_cfg.ipPortList)>0 and ipCfgIndex<fn:length(_cfg.ipPortList) }">
|
|
|
|
|
|
<c:forEach items="${_cfg.ipPortList}" var="ipPort">
|
|
|
|
|
|
<c:if test="${region.configRegionValue eq ipPort.cfgType }">
|
|
|
|
|
|
<div class="row boxSolid ${tabName}${status.index}">
|
|
|
|
|
|
<%@include file="/WEB-INF/views/cfg/ipCfgForm.jsp"%>
|
|
|
|
|
|
</div>
|
|
|
|
|
|
<c:set var="ipCfgIndex" value="${ipCfgIndex+1}"></c:set>
|
|
|
|
|
|
</c:if>
|
|
|
|
|
|
</c:forEach>
|
|
|
|
|
|
</c:when>
|
|
|
|
|
|
<c:otherwise>
|
|
|
|
|
|
<div class="row boxSolid ${tabName}${status.index} hidden disabled">
|
|
|
|
|
|
<%@include file="/WEB-INF/views/cfg/ipCfgForm.jsp"%>
|
|
|
|
|
|
</div>
|
|
|
|
|
|
<c:set var="ipCfgIndex" value="${ipCfgIndex+1 }"></c:set>
|
|
|
|
|
|
</c:otherwise>
|
|
|
|
|
|
</c:choose>
|
|
|
|
|
|
<!--/ip info-->
|
|
|
|
|
|
</c:if>
|
|
|
|
|
|
<c:if test="${region.regionType eq 2 }">
|
2018-08-23 15:21:50 +08:00
|
|
|
|
<c:if test="${region.configServiceType eq 'intercept_replace_pkt_bin'}">
|
|
|
|
|
|
<c:set var="tabName" value="${region.configRegionValue}Tab"></c:set>
|
|
|
|
|
|
<h4 class="form-section ${region.configServiceType }">
|
|
|
|
|
|
<spring:message code="${region.configRegionValue}" />
|
|
|
|
|
|
<small> <span
|
|
|
|
|
|
class="glyphicon glyphicon-plus ${tabName}Add"
|
|
|
|
|
|
onClick="addContent(this,'${tabName}')" title="add"></span></small>
|
|
|
|
|
|
</h4>
|
|
|
|
|
|
<c:set var="cfgName" value="interceptPktBinList[${complexCfgIndex}]"></c:set>
|
|
|
|
|
|
<%-- <c:set var="regionValue" value="${region.configRegionValue}"></c:set> --%>
|
|
|
|
|
|
<c:choose>
|
|
|
|
|
|
<c:when test="${fn:length(_cfg.interceptPktBinList)>0}">
|
|
|
|
|
|
<c:set var="isBreak" value="false" ></c:set>
|
|
|
|
|
|
<c:forEach items="${_cfg.interceptPktBinList}" var="cfg">
|
|
|
|
|
|
<c:choose>
|
|
|
|
|
|
<c:when test="${region.configRegionValue eq cfg.cfgType and !isBreak}">
|
|
|
|
|
|
<div class="row boxSolid ${region.configServiceType }_div ${tabName}${status.index}">
|
|
|
|
|
|
<%@include file="/WEB-INF/views/cfg/complexCfgForm.jsp"%>
|
|
|
|
|
|
</div>
|
|
|
|
|
|
<c:set var="isBreak" value="true" ></c:set>
|
|
|
|
|
|
<c:set var="complexCfgIndex" value="${complexCfgIndex+1 }"></c:set>
|
|
|
|
|
|
</c:when>
|
|
|
|
|
|
</c:choose>
|
|
|
|
|
|
</c:forEach>
|
|
|
|
|
|
<c:if test="${!isBreak}">
|
|
|
|
|
|
<div class="row boxSolid ${region.configServiceType }_div ${tabName}${status.index} hidden disabled">
|
|
|
|
|
|
<%@include file="/WEB-INF/views/cfg/complexCfgForm.jsp"%>
|
|
|
|
|
|
</div>
|
|
|
|
|
|
<c:set var="complexCfgIndex" value="${complexCfgIndex+1 }"></c:set>
|
|
|
|
|
|
</c:if>
|
|
|
|
|
|
</c:when>
|
|
|
|
|
|
<c:otherwise>
|
|
|
|
|
|
<div class="row boxSolid ${region.configServiceType }_div ${tabName}${status.index} hidden disabled">
|
2018-08-21 13:38:26 +08:00
|
|
|
|
<%@include file="/WEB-INF/views/cfg/complexCfgForm.jsp"%>
|
|
|
|
|
|
</div>
|
|
|
|
|
|
<c:set var="complexCfgIndex" value="${complexCfgIndex+1 }"></c:set>
|
2018-08-23 15:21:50 +08:00
|
|
|
|
</c:otherwise>
|
|
|
|
|
|
</c:choose>
|
|
|
|
|
|
</c:if>
|
|
|
|
|
|
<c:if test="${region.configServiceType eq 'intercept_domain'}">
|
|
|
|
|
|
<c:set var="tabName" value="${region.configRegionValue}Tab"></c:set>
|
|
|
|
|
|
<h4 class="form-section ${region.configServiceType }">
|
|
|
|
|
|
<spring:message code="${region.configRegionValue}" />
|
|
|
|
|
|
<small> <span
|
|
|
|
|
|
class="glyphicon glyphicon-plus ${tabName}Add"
|
|
|
|
|
|
onClick="addContent(this,'${tabName}')" title="add"></span></small>
|
|
|
|
|
|
</h4>
|
|
|
|
|
|
<c:set var="cfgName" value="httpUrlList[${domainCfgIndex}]"></c:set>
|
|
|
|
|
|
<%-- <c:set var="regionValue" value="${region.configRegionValue}"></c:set> --%>
|
|
|
|
|
|
<c:choose>
|
|
|
|
|
|
<c:when test="${fn:length(_cfg.httpUrlList)>0}">
|
|
|
|
|
|
<c:set var="isBreak" value="false" ></c:set>
|
|
|
|
|
|
<c:forEach items="${_cfg.httpUrlList}" var="cfg">
|
|
|
|
|
|
<c:choose>
|
|
|
|
|
|
<c:when test="${region.configRegionValue eq cfg.cfgType and !isBreak}">
|
|
|
|
|
|
<div class="row boxSolid ${region.configServiceType }_div ${tabName}${status.index}">
|
|
|
|
|
|
<%@include file="/WEB-INF/views/cfg/complexCfgForm.jsp"%>
|
|
|
|
|
|
</div>
|
|
|
|
|
|
<c:set var="isBreak" value="true" ></c:set>
|
|
|
|
|
|
<c:set var="domainCfgIndex" value="${domainCfgIndex+1 }"></c:set>
|
|
|
|
|
|
</c:when>
|
|
|
|
|
|
</c:choose>
|
|
|
|
|
|
</c:forEach>
|
|
|
|
|
|
<c:if test="${!isBreak}">
|
|
|
|
|
|
<div class="row boxSolid ${region.configServiceType }_div ${tabName}${status.index} hidden disabled">
|
|
|
|
|
|
<%@include file="/WEB-INF/views/cfg/complexCfgForm.jsp"%>
|
|
|
|
|
|
</div>
|
|
|
|
|
|
<c:set var="domainCfgIndex" value="${domainCfgIndex+1 }"></c:set>
|
|
|
|
|
|
</c:if>
|
|
|
|
|
|
</c:when>
|
|
|
|
|
|
<c:otherwise>
|
|
|
|
|
|
<div class="row boxSolid ${region.configServiceType }_div ${tabName}${status.index} hidden disabled">
|
|
|
|
|
|
<%@include file="/WEB-INF/views/cfg/complexCfgForm.jsp"%>
|
|
|
|
|
|
</div>
|
|
|
|
|
|
<c:set var="domainCfgIndex" value="${domainCfgIndex+1 }"></c:set>
|
|
|
|
|
|
</c:otherwise>
|
|
|
|
|
|
</c:choose>
|
|
|
|
|
|
</c:if>
|
2018-08-21 13:38:26 +08:00
|
|
|
|
</c:if>
|
|
|
|
|
|
</c:forEach>
|
|
|
|
|
|
<br>
|
|
|
|
|
|
<%@include file="/WEB-INF/include/form/areaInfo.jsp"%>
|
|
|
|
|
|
<br>
|
|
|
|
|
|
<%@include file="/WEB-INF/include/form/basicInfo.jsp"%>
|
2019-01-26 19:01:41 +06:00
|
|
|
|
<br>
|
|
|
|
|
|
<%@include file="/WEB-INF/include/form/scheduleNew.jsp"%>
|
2018-08-21 13:38:26 +08:00
|
|
|
|
<div class="form-actions">
|
|
|
|
|
|
<div class="row">
|
|
|
|
|
|
<div class="col-md-6">
|
|
|
|
|
|
<div class="row">
|
|
|
|
|
|
<div class="col-md-offset-3 col-md-8">
|
2019-04-14 17:17:58 +08:00
|
|
|
|
<c:set var="auditPermission" value="false"></c:set>
|
|
|
|
|
|
<!-- 拥有配置新增直接生效的功能权限 -->
|
|
|
|
|
|
<shiro:hasPermission name="save:audit:permission">
|
|
|
|
|
|
<c:set var="auditPermission" value="true"></c:set>
|
|
|
|
|
|
</shiro:hasPermission>
|
|
|
|
|
|
<c:choose>
|
|
|
|
|
|
<c:when test="${!(fns:getUser().isAdmin()) && auditPermission}">
|
|
|
|
|
|
<button id="audit" type="submit" class="btn green">
|
|
|
|
|
|
<spring:message code="submit" />
|
|
|
|
|
|
</button>
|
|
|
|
|
|
</c:when>
|
|
|
|
|
|
<c:otherwise>
|
|
|
|
|
|
<button id="save" type="submit" class="btn green">
|
|
|
|
|
|
<spring:message code="submit" />
|
|
|
|
|
|
</button>
|
|
|
|
|
|
</c:otherwise>
|
|
|
|
|
|
</c:choose>
|
2018-08-21 13:38:26 +08:00
|
|
|
|
<button id="cancel" type="button" class="btn default">
|
|
|
|
|
|
<spring:message code="cancel" />
|
|
|
|
|
|
</button>
|
|
|
|
|
|
</div>
|
|
|
|
|
|
</div>
|
|
|
|
|
|
</div>
|
|
|
|
|
|
<div class="col-md-6"></div>
|
|
|
|
|
|
</div>
|
|
|
|
|
|
</div>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
</div>
|
|
|
|
|
|
</form>
|
|
|
|
|
|
<!-- END FORM-->
|
|
|
|
|
|
</div>
|
|
|
|
|
|
</div>
|
|
|
|
|
|
</div>
|
|
|
|
|
|
</div>
|
|
|
|
|
|
</div>
|
|
|
|
|
|
</body>
|
|
|
|
|
|
</html>
|