代理拦截修改提交
This commit is contained in:
@@ -113,7 +113,7 @@
|
||||
</div>
|
||||
</div>
|
||||
<!-- 域名拦截增加拦截强度 -->
|
||||
<c:if test="${_cfg.functionId eq 200}">
|
||||
<%-- <c:if test="${_cfg.functionId eq 200}">
|
||||
<div class="col-md-6 hidden intensity">
|
||||
<div class="form-group">
|
||||
<label class="control-label col-md-3"><font color="red">*</font>
|
||||
@@ -130,7 +130,7 @@
|
||||
<div for="userRegion5"></div>
|
||||
</div>
|
||||
</div>
|
||||
</c:if>
|
||||
</c:if> --%>
|
||||
</div>
|
||||
<c:if test="${serviceId eq 1025}">
|
||||
<div class="row L3_header hidden">
|
||||
|
||||
@@ -8,12 +8,54 @@
|
||||
.boxSolid {
|
||||
border: 1px solid #eeeeee
|
||||
}
|
||||
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;
|
||||
}
|
||||
</style>
|
||||
<script type="text/javascript">
|
||||
$(document)
|
||||
.ready(
|
||||
function() {
|
||||
|
||||
$(".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");
|
||||
}
|
||||
}
|
||||
}
|
||||
});
|
||||
$(".action").on("change", function() {
|
||||
switchAction($("input[name=action]:checked").val());
|
||||
//拦截根据action切换动作部分
|
||||
@@ -30,7 +72,7 @@
|
||||
$(".ratelimitAction").find("input[name='userRegion1']").on("change",function(){
|
||||
switchRateLimitType();
|
||||
});
|
||||
$(".monitAction").find("select[name='userRegion1']").on("change",function(){
|
||||
$(".monitAction").find("select[name='keyring']").on("change",function(){
|
||||
selectCert(this);
|
||||
});
|
||||
selectCert();
|
||||
@@ -49,7 +91,10 @@
|
||||
submitHandler : function(form) {
|
||||
var flag = true;
|
||||
var actionValue=$("input[name=action]:checked").val();
|
||||
|
||||
//将拦截策略checkbox选中
|
||||
/* $(".userregion:visible").find(":not(checked)").each(function(){
|
||||
$(this).attr("checked",true);
|
||||
}); */
|
||||
|
||||
|
||||
//代表所有业务都隐藏了,提示必须增加一种业务数据
|
||||
@@ -89,14 +134,14 @@
|
||||
$(".disabled").each(function(){
|
||||
$(this).remove();
|
||||
});
|
||||
$("input[name$='exprType']").attr("disabled",false);
|
||||
var action=$("input[name='action']:checked").val();
|
||||
if(action==1){ //监测
|
||||
|
||||
$("input[name$='exprType']").attr("disabled",false);
|
||||
if(actionValue==1){ //监测
|
||||
$(".ratelimitAction").find("input[name^='userRegion'],select[name^='userRegion']").attr("disabled",true);
|
||||
$(".replaceAction").find("input[name^='userRegion'],select[name^='userRegion']").attr("disabled",true);
|
||||
$(".whiteListAction").find("input[name^='userRegion'],select[name^='userRegion']").attr("disabled",true);
|
||||
$(".spoofingAction").find("input[name^='userRegion'],select[name^='userRegion']").attr("disabled",true);
|
||||
}else if(action==64){//限速
|
||||
}else if(actionValue==64){//限速
|
||||
$(".monitAction").find("input[name^='userRegion'],select[name^='userRegion']").attr("disabled",true);
|
||||
$(".replaceAction").find("input[name^='userRegion'],select[name^='userRegion']").attr("disabled",true);
|
||||
$(".whiteListAction").find("input[name^='userRegion'],select[name^='userRegion']").attr("disabled",true);
|
||||
@@ -108,12 +153,12 @@
|
||||
if(rateLimitType == 1){//带宽
|
||||
$(".droprate").find("select[name='userRegion2']").attr("disabled",true);
|
||||
}
|
||||
}else if(action==80){//替换
|
||||
}else if(actionValue==80){//替换
|
||||
$(".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);
|
||||
$(".spoofingAction").find("input[name^='userRegion'],select[name^='userRegion']").attr("disabled",true);
|
||||
}else if(action==48){//IP仿冒业务
|
||||
}else if(actionValue==48){//IP仿冒业务
|
||||
$(".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);
|
||||
@@ -124,6 +169,13 @@
|
||||
$(".replaceAction").find("input[name^='userRegion'],select[name^='userRegion']").attr("disabled",true);
|
||||
$(".spoofingAction").find("input[name^='userRegion'],select[name^='userRegion']").attr("disabled",true);
|
||||
}
|
||||
//处理action parameter
|
||||
/* $(".userRegion").each(function(){
|
||||
$(this).attr("name","userRegion['"+$(this).attr("id")+"']");
|
||||
if($(this).is(":checkbox") && $(this).hasClass("switch")){
|
||||
$(this).attr("checked","checked");
|
||||
}
|
||||
}); */
|
||||
loading('onloading...');
|
||||
form.submit();
|
||||
}else{
|
||||
@@ -137,7 +189,6 @@
|
||||
/* $("span[title='add']").on("click", function() {
|
||||
$(".ipPort0").removeClass("hidden");
|
||||
}); */
|
||||
|
||||
});
|
||||
|
||||
//限流方式
|
||||
@@ -183,11 +234,11 @@
|
||||
}
|
||||
//实体证书提示域名信息
|
||||
var selectCert=function(){
|
||||
var cert=$(".monitAction").find("select[name='userRegion1']").val();
|
||||
var keyringType=$(".monitAction").find("select[name='userRegion1']").find("option[value='"+cert+"']").attr("keyringType");
|
||||
var cert=$(".monitAction").find("select[name='keyring']").val();
|
||||
var keyringType=$(".monitAction").find("select[name='keyring']").find("option[value='"+cert+"']").attr("keyringType");
|
||||
if(cert != '' && keyringType == 'end-entity'){
|
||||
var san=$(".monitAction").find("select[name='userRegion1']").find("option[value='"+cert+"']").attr("san");
|
||||
var cn=$(".monitAction").find("select[name='userRegion1']").find("option[value='"+cert+"']").attr("cn");
|
||||
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");
|
||||
if(san.indexOf(cn) > -1){
|
||||
$("#certDomain").attr("title",san);
|
||||
}else{
|
||||
@@ -204,8 +255,8 @@
|
||||
var serviceType=$(inputObj).attr("serviceType");
|
||||
var prefixName=$(inputObj).attr("name").split("cfgRegionCode")[0];
|
||||
//var matchMethod=$("select[name='"+prefixName+"matchMethod']").val();
|
||||
var cert=$(".monitAction").find("select[name='userRegion1']").val();
|
||||
var keyringType=$(".monitAction").find("select[name='userRegion1']").find("option[value='"+cert+"']").attr("keyringType");
|
||||
var cert=$(".monitAction").find("select[name='keyring']").val();
|
||||
var keyringType=$(".monitAction").find("select[name='keyring']").find("option[value='"+cert+"']").attr("keyringType");
|
||||
|
||||
if(cert != '' && keyringType == 'end-entity'){
|
||||
var domainDiv = $(inputObj).parent(".intercept_domain_div").is(':hidden');
|
||||
@@ -213,10 +264,10 @@
|
||||
top.$.jBox.tip("<spring:message code='intercep_domain_required_tip'/>", "<spring:message code='info'/>");
|
||||
return false;
|
||||
}
|
||||
var cn=$(".monitAction").find("select[name='userRegion1']").find("option[value='"+cert+"']").attr("cn");
|
||||
var cn=$(".monitAction").find("select[name='keyring']").find("option[value='"+cert+"']").attr("cn");
|
||||
if(cn !='' && cn != null){
|
||||
var cnReg = new RegExp('^(?=^.{3,255}$)[a-zA-Z0-9][-a-zA-Z0-9]{0,62}(\\'+cn.replace("*","")+')+$');
|
||||
var san=$(".monitAction").find("select[name='userRegion1']").find("option[value='"+cert+"']").attr("san");
|
||||
var san=$(".monitAction").find("select[name='keyring']").find("option[value='"+cert+"']").attr("san");
|
||||
if(san != null && san !=''){
|
||||
//$(".intercept_domain_div").each(function(){
|
||||
if(serviceType == "intercept_domain"){
|
||||
@@ -500,9 +551,7 @@
|
||||
<input type="hidden" name="isValid" value="${_cfg.isValid}">
|
||||
<input type="hidden" name="isAudit" value="${_cfg.isAudit}">
|
||||
<!-- <input type="hidden" id="doLog" name="doLog" value="2"> -->
|
||||
|
||||
<div class="form-body">
|
||||
|
||||
<div class="row">
|
||||
<div class="col-md-6">
|
||||
<div class="form-group">
|
||||
@@ -531,7 +580,7 @@
|
||||
<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">
|
||||
<c:if test="${(dict.itemCode eq service.action) && (service.action eq 1) }">
|
||||
<spring:message code="intercept"/>
|
||||
<spring:message code="forward"/>
|
||||
</c:if>
|
||||
<c:if test="${(dict.itemCode eq service.action) && (service.action eq 128) }">
|
||||
<spring:message code="bypass"/>
|
||||
@@ -577,39 +626,287 @@
|
||||
<!-- dolog end-->
|
||||
|
||||
<%-- action 为1 监测时 可以选择证书--%>
|
||||
<div class="row monitAction hidden">
|
||||
<h4 class="form-section">
|
||||
<h4 class="form-section monitAction">
|
||||
<spring:message code="action_region" />
|
||||
<small></small>
|
||||
</h4>
|
||||
<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="userRegion1" class="selectpicker show-tick form-control">
|
||||
<option value="" <c:if test="${empty _cfg.userRegion1}">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.userRegion1 eq fn:trim(certificate.compileId)}">
|
||||
selected
|
||||
</c:if>
|
||||
>
|
||||
${certificate.cfgDesc}
|
||||
</option>
|
||||
|
||||
</c:forEach>
|
||||
</select>
|
||||
</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>
|
||||
<br>
|
||||
<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>
|
||||
<span id="certDomain" title=""
|
||||
class="hidden" data-icon="" style="cursor:default"></span>
|
||||
<div for="userRegion1"></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>
|
||||
<br/>
|
||||
<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">
|
||||
<div class="col-md-6">
|
||||
<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>
|
||||
</c:forEach>
|
||||
</select>
|
||||
</div>
|
||||
<div for="fail_method"></div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</fieldset>
|
||||
<br>
|
||||
<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>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<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>
|
||||
<br>
|
||||
<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>
|
||||
<%-- action 为64 限速时 --%>
|
||||
<div class="row ratelimitAction hidden">
|
||||
<h4 class="form-section">
|
||||
|
||||
@@ -90,6 +90,65 @@
|
||||
$("#exportValue").val($("#intype").val());
|
||||
}
|
||||
}
|
||||
var keyringArr=[],mirrorProfileArr=[];
|
||||
$("td[userregion]").each(function(){
|
||||
var userregion=$(this).attr("userregion")
|
||||
if(userregion.length>0&&userregion.indexOf("{")==0){
|
||||
var jsonObj=JSON.parse(userregion);
|
||||
var obj=$(this);
|
||||
$(obj).parent().find("td[data-column='keyring']").text(jsonObj.keyring==0?"":jsonObj.keyring);
|
||||
if(jsonObj.keyring){
|
||||
keyringArr.push(jsonObj.keyring);
|
||||
}
|
||||
|
||||
$(obj).parent().find("td[data-column='ev_cert']").text(jsonObj.exclusions.ev_cert==1?"<spring:message code='yes'/>":"<spring:message code='no'/>");
|
||||
$(obj).parent().find("td[data-column='cert_transparency']").text(jsonObj.exclusions.cert_transparency==1?"<spring:message code='yes'/>":"<spring:message code='no'/>");
|
||||
$(obj).parent().find("td[data-column='client_cert_req']").text(jsonObj.exclusions.client_cert_req==1?"<spring:message code='yes'/>":"<spring:message code='no'/>");
|
||||
$(obj).parent().find("td[data-column='pinning']").text(jsonObj.exclusions.pinning==1?"<spring:message code='yes'/>":"<spring:message code='no'/>");
|
||||
$(obj).parent().find("td[data-column='cn']").text(jsonObj.cert_verify.approach.cn==1?"<spring:message code='yes'/>":"<spring:message code='no'/>");
|
||||
$(obj).parent().find("td[data-column='issuer']").text(jsonObj.cert_verify.approach.issuer==1?"<spring:message code='yes'/>":"<spring:message code='no'/>");
|
||||
$(obj).parent().find("td[data-column='self-signed']").text(jsonObj.cert_verify.approach['self-signed']==1?"<spring:message code='yes'/>":"<spring:message code='no'/>");
|
||||
$(obj).parent().find("td[data-column='expiration']").text(jsonObj.cert_verify.approach.expiration==1?"<spring:message code='yes'/>":"<spring:message code='no'/>");
|
||||
$("input[name='failMethods']").each(function(){
|
||||
if(jsonObj.cert_verify.fail_method==$(this).data("key")){
|
||||
$(obj).parent().find("td[data-column='fail_method']").text($(this).val());
|
||||
}
|
||||
});
|
||||
$("input[name='sslversions']").each(function(){
|
||||
if(jsonObj.ssl_ver.min==$(this).data("key")){
|
||||
$(obj).parent().find("td[data-column='min']").text($(this).val());
|
||||
}
|
||||
if(jsonObj.ssl_ver.max==$(this).data("key")){
|
||||
$(obj).parent().find("td[data-column='max']").text($(this).val());
|
||||
}
|
||||
});
|
||||
$(obj).parent().find("td[data-column='mirror_client']").text(jsonObj.ssl_ver.mirror_client==1?"<spring:message code='yes'/>":"<spring:message code='no'/>");
|
||||
$(obj).parent().find("td[data-column='enable']").text(jsonObj.decrypt_mirror.enable==1?"<spring:message code='yes'/>":"<spring:message code='no'/>");
|
||||
$(obj).parent().find("td[data-column='mirror_profile']").text(jsonObj.decrypt_mirror.mirror_profile);
|
||||
if(jsonObj.decrypt_mirror.mirror_profile){
|
||||
mirrorProfileArr.push(jsonObj.decrypt_mirror.mirror_profile);
|
||||
}
|
||||
}
|
||||
});
|
||||
if(keyringArr.length>0||mirrorProfileArr.length>0){
|
||||
$.post("${ctx}/proxy/intercept/ajaxGetValues",{"keyrings":keyringArr.join(','),"mirrorProfiles":mirrorProfileArr.join(',')},function(data){
|
||||
$("td[data-column='keyring']").each(function(){
|
||||
for(var key in data.keyrings){
|
||||
if($(this).text().trim()==key){
|
||||
$(this).text(data.keyrings[key]);
|
||||
}
|
||||
}
|
||||
});
|
||||
$("td[data-column='mirror_profile']").each(function(){
|
||||
for(var key in data.mirrorProfiles){
|
||||
if($(this).text().trim()==key){
|
||||
$(this).text(data.mirrorProfiles[key]);
|
||||
}
|
||||
}
|
||||
});
|
||||
})
|
||||
}
|
||||
|
||||
});
|
||||
</script>
|
||||
|
||||
@@ -100,6 +159,12 @@
|
||||
</c:if>
|
||||
<c:if test="${cfg.functionId eq 200}">
|
||||
<c:set var="interceptType" value="Ip"/>
|
||||
<c:forEach items="${fns:getDictList('FAIL_METHOD')}" var="dict">
|
||||
<input type="hidden" name="failMethods" data-key="${dict.itemCode}" value="${dict.itemValue}">
|
||||
</c:forEach>
|
||||
<c:forEach items="${fns:getDictList('SSL_VERSION')}" var="dict">
|
||||
<input type="hidden" name="sslversions" data-key="${dict.itemCode}" value="${dict.itemValue}">
|
||||
</c:forEach>
|
||||
</c:if>
|
||||
<c:if test="${cfg.functionId eq 201}">
|
||||
<c:set var="interceptType" value="Domain"/>
|
||||
@@ -389,8 +454,22 @@
|
||||
<c:if test="${cfg.functionId eq 200 }">
|
||||
<th column="userregion2" ><spring:message code="ratelimit"/></th>
|
||||
<%-- <th column="bandwith" ><spring:message code="bandwith"/></th> --%>
|
||||
<th column="userregion1" ><spring:message code="intercept_file_strategy"/></th>
|
||||
<th column="userregion5" ><spring:message code="intercept_intensity"/></th>
|
||||
<%-- <th column="userregion5" ><spring:message code="intercept_intensity"/></th> --%>
|
||||
<th column="pxy_intercept_monit_keyring" ><spring:message code="pxy_intercept_monit_keyring"/></th>
|
||||
<th column="exclusions_ev_cert" ><spring:message code="exclusions_ev_cert"/></th>
|
||||
<th column="exclusions_cert_transparency" ><spring:message code="exclusions_cert_transparency"/></th>
|
||||
<th column="exclusions_client_cert_req" ><spring:message code="exclusions_client_cert_req"/></th>
|
||||
<th column="exclusions_pinning" ><spring:message code="exclusions_pinning"/></th>
|
||||
<th column="cert_verify_approach_cn" ><spring:message code="cert_verify_approach_cn"/></th>
|
||||
<th column="cert_verify_approach_issuer" ><spring:message code="cert_verify_approach_issuer"/></th>
|
||||
<th column="cert_verify_approach_self_signed" ><spring:message code="cert_verify_approach_self_signed"/></th>
|
||||
<th column="cert_verify_approach_expiration" ><spring:message code="cert_verify_approach_expiration"/></th>
|
||||
<th column="cert_verify_fail_method" ><spring:message code="cert_verify_fail_method"/></th>
|
||||
<th column="ssl_ver_min" ><spring:message code="ssl_ver_min"/></th>
|
||||
<th column="ssl_ver_max" ><spring:message code="ssl_ver_max"/></th>
|
||||
<th column="ssl_ver_mirror_client" ><spring:message code="ssl_ver_mirror_client"/></th>
|
||||
<th column="decrypt_mirror_enable" ><spring:message code="decrypt_mirror_enable"/></th>
|
||||
<th column="decrypt_mirror_mirror_profile" ><spring:message code="decrypt_mirror_mirror_profile"/></th>
|
||||
</c:if>
|
||||
<%-- <c:if test="${cfg.functionId eq 200 }">
|
||||
<th column="bandwith" ><spring:message code="bandwith"/></th>
|
||||
@@ -471,22 +550,30 @@
|
||||
${indexCfg.userRegion3 }
|
||||
</c:if>
|
||||
</td> --%>
|
||||
<td>
|
||||
<c:if test="${indexCfg.action eq 1}">
|
||||
<c:forEach items="${certificateList}" var="certificate">
|
||||
<c:if test="${indexCfg.userRegion1 eq certificate.compileId}">${certificate.cfgDesc}</c:if>
|
||||
<%-- <td>
|
||||
<c:if test="${indexCfg.action eq 1 }">
|
||||
<c:forEach items="${fns:getDictList('INTERCEPT_DOMAIN_INTENSITY') }" var="intentsityC">
|
||||
<c:if test="${intentsityC.itemCode eq indexCfg.userRegion5 }">
|
||||
<spring:message code="${intentsityC.itemValue }"/>
|
||||
</c:if>
|
||||
</c:forEach>
|
||||
</c:if>
|
||||
</td>
|
||||
<td>
|
||||
<c:if test="${indexCfg.action eq 1 }">
|
||||
<c:forEach items="${fns:getDictList('INTERCEPT_DOMAIN_INTENSITY') }" var="intentsityC">
|
||||
<c:if test="${intentsityC.itemCode eq indexCfg.userRegion5 }">
|
||||
<spring:message code="${intentsityC.itemValue }"/>
|
||||
</c:if>
|
||||
</c:forEach>
|
||||
</c:if>
|
||||
</td>
|
||||
</td> --%>
|
||||
<td userregion='${indexCfg.userRegion1}' data-column="keyring"></td>
|
||||
<td data-column="ev_cert" ></td>
|
||||
<td data-column="cert_transparency" ></td>
|
||||
<td data-column="client_cert_req" ></td>
|
||||
<td data-column="pinning" ></td>
|
||||
<td data-column="cn" ></td>
|
||||
<td data-column="issuer" ></td>
|
||||
<td data-column="self-signed" ></td>
|
||||
<td data-column="expiration" ></td>
|
||||
<td data-column="fail_method" ></td>
|
||||
<td data-column="min" ></td>
|
||||
<td data-column="max" ></td>
|
||||
<td data-column="mirror_client" ></td>
|
||||
<td data-column="enable" ></td>
|
||||
<td data-column="mirror_profile" ></td>
|
||||
</c:if>
|
||||
<%-- <c:if test="${cfg.functionId eq 200 }">
|
||||
<td>
|
||||
|
||||
@@ -878,16 +878,16 @@ jQuery.validator.addMethod("noStrategyCheck",function(value,element) {
|
||||
return flag;
|
||||
});
|
||||
// 代理拦截策略ssl version min小于max校验
|
||||
//jQuery.validator.addMethod("sslVersionCheck",function(value,element) {
|
||||
// var min,max;
|
||||
// if($(element).attr("id")=="min"){
|
||||
// min=element,max=$("#max");
|
||||
// }else{
|
||||
// max=element,min=$("#min");
|
||||
// }
|
||||
// if($(min).find("option:selected").data("sort")>=$(max).find("option:selected").data("sort")){
|
||||
// return false;
|
||||
// }else{
|
||||
// return true;
|
||||
// }
|
||||
//});
|
||||
jQuery.validator.addMethod("sslVersionCheck",function(value,element) {
|
||||
var min,max;
|
||||
if($(element).attr("id")=="min"){
|
||||
min=element,max=$("#max");
|
||||
}else{
|
||||
max=element,min=$("#min");
|
||||
}
|
||||
if($(min).find("option:selected").data("sort")>=$(max).find("option:selected").data("sort")){
|
||||
return false;
|
||||
}else{
|
||||
return true;
|
||||
}
|
||||
});
|
||||
@@ -98,6 +98,7 @@
|
||||
rangeCross0:"The IP {0} must not between {1} and {2}",
|
||||
rangeCross1:"The IP range {0} has intersections with {1}",
|
||||
protectedCfgUnique:"Keyword already exists.",
|
||||
addrList:"Please enter the legitimate targets identification list"
|
||||
addrList:"Please enter the legitimate targets identification list",
|
||||
sslVersionCheck:"Min SSL version should smaller than Max SSL version"
|
||||
});
|
||||
}(jQuery));
|
||||
|
||||
@@ -98,6 +98,7 @@
|
||||
rangeCross0:"IP {0} не должен находиться между {1} и {2}",
|
||||
rangeCross1:"Диапазон IP {0} имеет пересечения с {1}",
|
||||
protectedCfgUnique:"Ключевое слово уже существует.",
|
||||
addrList:"Please enter the legitimate targets identification list"
|
||||
addrList:"Please enter the legitimate targets identification list",
|
||||
sslVersionCheck:"моя версия SSL должны меньше, чем версия SSL, макс"
|
||||
});
|
||||
}(jQuery));
|
||||
|
||||
@@ -98,6 +98,7 @@
|
||||
rangeCross0:"IP{0}不能介于{1}和{2}",
|
||||
rangeCross1:"IP范围{0}和IP范围{1}有交集",
|
||||
protectedCfgUnique:"关键字已存在",
|
||||
addrList:"请输入合法的目标标识列表"
|
||||
addrList:"请输入合法的目标标识列表",
|
||||
sslVersionCheck:"最小SSL协议版本应小于最大SSL协议版本"
|
||||
});
|
||||
}(jQuery));
|
||||
|
||||
Reference in New Issue
Block a user