Proxy Control Policy配置增加导入.
This commit is contained in:
@@ -0,0 +1,32 @@
|
||||
package com.nis.domain.configuration.template;
|
||||
|
||||
import com.nis.util.excel.ExcelField;
|
||||
|
||||
/**
|
||||
* EXCEL HTTP(s)重定向 导入模板
|
||||
* @author dell
|
||||
*
|
||||
*/
|
||||
public class HttpsRedirectComplexTemplate extends ComplexStringAllTemplate{
|
||||
|
||||
private String userRegion1;// 重定向应答码
|
||||
private String userRegion2;// 重定向URL
|
||||
|
||||
@ExcelField(title="redirect_response_code",dictType="REDIRECT_RESPONSE_CODE",align=2,sort=2)
|
||||
public String getUserRegion1() {
|
||||
return userRegion1;
|
||||
}
|
||||
|
||||
public void setUserRegion1(String userRegion1) {
|
||||
this.userRegion1 = userRegion1;
|
||||
}
|
||||
|
||||
@ExcelField(title="redirect_url",align=2,sort=3)
|
||||
public String getUserRegion2() {
|
||||
return userRegion2;
|
||||
}
|
||||
|
||||
public void setUserRegion2(String userRegion2) {
|
||||
this.userRegion2 = userRegion2;
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,32 @@
|
||||
package com.nis.domain.configuration.template;
|
||||
|
||||
import com.nis.util.excel.ExcelField;
|
||||
|
||||
/**
|
||||
* EXCEL HTTP(s)重定向 导入模板
|
||||
* @author dell
|
||||
*
|
||||
*/
|
||||
public class HttpsRedirectIpTemplate extends IpAllTemplate{
|
||||
|
||||
private String userRegion1;// 重定向应答码
|
||||
private String userRegion2;// 重定向URL
|
||||
|
||||
@ExcelField(title="redirect_response_code",dictType="REDIRECT_RESPONSE_CODE",align=2,sort=2)
|
||||
public String getUserRegion1() {
|
||||
return userRegion1;
|
||||
}
|
||||
|
||||
public void setUserRegion1(String userRegion1) {
|
||||
this.userRegion1 = userRegion1;
|
||||
}
|
||||
|
||||
@ExcelField(title="redirect_url",align=2,sort=3)
|
||||
public String getUserRegion2() {
|
||||
return userRegion2;
|
||||
}
|
||||
|
||||
public void setUserRegion2(String userRegion2) {
|
||||
this.userRegion2 = userRegion2;
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,32 @@
|
||||
package com.nis.domain.configuration.template;
|
||||
|
||||
import com.nis.util.excel.ExcelField;
|
||||
|
||||
/**
|
||||
* EXCEL HTTP(s)重定向 导入模板
|
||||
* @author dell
|
||||
*
|
||||
*/
|
||||
public class HttpsRedirectTemplate extends StringAllTemplate{
|
||||
|
||||
private String userRegion1;// 重定向应答码
|
||||
private String userRegion2;// 重定向URL
|
||||
|
||||
@ExcelField(title="redirect_response_code",dictType="REDIRECT_RESPONSE_CODE",align=2,sort=2)
|
||||
public String getUserRegion1() {
|
||||
return userRegion1;
|
||||
}
|
||||
|
||||
public void setUserRegion1(String userRegion1) {
|
||||
this.userRegion1 = userRegion1;
|
||||
}
|
||||
|
||||
@ExcelField(title="redirect_url",align=2,sort=3)
|
||||
public String getUserRegion2() {
|
||||
return userRegion2;
|
||||
}
|
||||
|
||||
public void setUserRegion2(String userRegion2) {
|
||||
this.userRegion2 = userRegion2;
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,33 @@
|
||||
package com.nis.domain.configuration.template;
|
||||
|
||||
import com.nis.util.excel.ExcelField;
|
||||
|
||||
/**
|
||||
* EXCEL HTTP(s)阻断 导入模板
|
||||
* @author dell
|
||||
*
|
||||
*/
|
||||
public class HttpsRejectComplexTemplate extends ComplexStringAllTemplate{
|
||||
|
||||
private String userRegion1;// 应答码
|
||||
private String userRegion2;// 响应内容
|
||||
|
||||
@ExcelField(title="response_code",dictType="RESPONSE_CODE",align=2,sort=2)
|
||||
public String getUserRegion1() {
|
||||
return userRegion1;
|
||||
}
|
||||
|
||||
public void setUserRegion1(String userRegion1) {
|
||||
this.userRegion1 = userRegion1;
|
||||
}
|
||||
|
||||
@ExcelField(title="response_content",align=2,sort=3)
|
||||
public String getUserRegion2() {
|
||||
return userRegion2;
|
||||
}
|
||||
|
||||
public void setUserRegion2(String userRegion2) {
|
||||
this.userRegion2 = userRegion2;
|
||||
}
|
||||
|
||||
}
|
||||
@@ -0,0 +1,33 @@
|
||||
package com.nis.domain.configuration.template;
|
||||
|
||||
import com.nis.util.excel.ExcelField;
|
||||
|
||||
/**
|
||||
* EXCEL HTTP(s)阻断 导入模板
|
||||
* @author dell
|
||||
*
|
||||
*/
|
||||
public class HttpsRejectIpTemplate extends IpAllTemplate{
|
||||
|
||||
private String userRegion1;// 应答码
|
||||
private String userRegion2;// 响应内容
|
||||
|
||||
@ExcelField(title="response_code",dictType="RESPONSE_CODE",align=2,sort=2)
|
||||
public String getUserRegion1() {
|
||||
return userRegion1;
|
||||
}
|
||||
|
||||
public void setUserRegion1(String userRegion1) {
|
||||
this.userRegion1 = userRegion1;
|
||||
}
|
||||
|
||||
@ExcelField(title="response_content",align=2,sort=3)
|
||||
public String getUserRegion2() {
|
||||
return userRegion2;
|
||||
}
|
||||
|
||||
public void setUserRegion2(String userRegion2) {
|
||||
this.userRegion2 = userRegion2;
|
||||
}
|
||||
|
||||
}
|
||||
@@ -0,0 +1,33 @@
|
||||
package com.nis.domain.configuration.template;
|
||||
|
||||
import com.nis.util.excel.ExcelField;
|
||||
|
||||
/**
|
||||
* EXCEL HTTP(s)阻断 导入模板
|
||||
* @author dell
|
||||
*
|
||||
*/
|
||||
public class HttpsRejectTemplate extends StringAllTemplate{
|
||||
|
||||
private String userRegion1;// 应答码
|
||||
private String userRegion2;// 响应内容
|
||||
|
||||
@ExcelField(title="response_code",dictType="RESPONSE_CODE",align=2,sort=2)
|
||||
public String getUserRegion1() {
|
||||
return userRegion1;
|
||||
}
|
||||
|
||||
public void setUserRegion1(String userRegion1) {
|
||||
this.userRegion1 = userRegion1;
|
||||
}
|
||||
|
||||
@ExcelField(title="response_content",align=2,sort=3)
|
||||
public String getUserRegion2() {
|
||||
return userRegion2;
|
||||
}
|
||||
|
||||
public void setUserRegion2(String userRegion2) {
|
||||
this.userRegion2 = userRegion2;
|
||||
}
|
||||
|
||||
}
|
||||
@@ -0,0 +1,42 @@
|
||||
package com.nis.domain.configuration.template;
|
||||
|
||||
import com.nis.util.excel.ExcelField;
|
||||
|
||||
/**
|
||||
* EXCEL HTTP(s)替换 导入模板
|
||||
* @author dell
|
||||
*
|
||||
*/
|
||||
public class HttpsReplaceComplexTemplate extends ComplexStringAllTemplate{
|
||||
|
||||
private String userRegion1;// 搜索区域
|
||||
private String userRegion2;// 发现内容
|
||||
private String userRegion3;// 替换内容
|
||||
|
||||
@ExcelField(title="replace_zone",dictType="CONTROL_REPLACE_ZONE",align=2,sort=2)
|
||||
public String getUserRegion1() {
|
||||
return userRegion1;
|
||||
}
|
||||
|
||||
public void setUserRegion1(String userRegion1) {
|
||||
this.userRegion1 = userRegion1;
|
||||
}
|
||||
|
||||
@ExcelField(title="replaced_content",align=2,sort=3)
|
||||
public String getUserRegion2() {
|
||||
return userRegion2;
|
||||
}
|
||||
|
||||
public void setUserRegion2(String userRegion2) {
|
||||
this.userRegion2 = userRegion2;
|
||||
}
|
||||
|
||||
@ExcelField(title="replace_content",align=2,sort=4)
|
||||
public String getUserRegion3() {
|
||||
return userRegion3;
|
||||
}
|
||||
|
||||
public void setUserRegion3(String userRegion3) {
|
||||
this.userRegion3 = userRegion3;
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,42 @@
|
||||
package com.nis.domain.configuration.template;
|
||||
|
||||
import com.nis.util.excel.ExcelField;
|
||||
|
||||
/**
|
||||
* EXCEL HTTP(s)替换 导入模板
|
||||
* @author dell
|
||||
*
|
||||
*/
|
||||
public class HttpsReplaceIpTemplate extends IpAllTemplate{
|
||||
|
||||
private String userRegion1;// 搜索区域
|
||||
private String userRegion2;// 发现内容
|
||||
private String userRegion3;// 替换内容
|
||||
|
||||
@ExcelField(title="replace_zone",dictType="CONTROL_REPLACE_ZONE",align=2,sort=2)
|
||||
public String getUserRegion1() {
|
||||
return userRegion1;
|
||||
}
|
||||
|
||||
public void setUserRegion1(String userRegion1) {
|
||||
this.userRegion1 = userRegion1;
|
||||
}
|
||||
|
||||
@ExcelField(title="replaced_content",align=2,sort=3)
|
||||
public String getUserRegion2() {
|
||||
return userRegion2;
|
||||
}
|
||||
|
||||
public void setUserRegion2(String userRegion2) {
|
||||
this.userRegion2 = userRegion2;
|
||||
}
|
||||
|
||||
@ExcelField(title="replace_content",align=2,sort=4)
|
||||
public String getUserRegion3() {
|
||||
return userRegion3;
|
||||
}
|
||||
|
||||
public void setUserRegion3(String userRegion3) {
|
||||
this.userRegion3 = userRegion3;
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,42 @@
|
||||
package com.nis.domain.configuration.template;
|
||||
|
||||
import com.nis.util.excel.ExcelField;
|
||||
|
||||
/**
|
||||
* EXCEL HTTP(s)替换 导入模板
|
||||
* @author dell
|
||||
*
|
||||
*/
|
||||
public class HttpsReplaceTemplate extends StringAllTemplate{
|
||||
|
||||
private String userRegion1;// 搜索区域
|
||||
private String userRegion2;// 发现内容
|
||||
private String userRegion3;// 替换内容
|
||||
|
||||
@ExcelField(title="replace_zone",dictType="CONTROL_REPLACE_ZONE",align=2,sort=2)
|
||||
public String getUserRegion1() {
|
||||
return userRegion1;
|
||||
}
|
||||
|
||||
public void setUserRegion1(String userRegion1) {
|
||||
this.userRegion1 = userRegion1;
|
||||
}
|
||||
|
||||
@ExcelField(title="replaced_content",align=2,sort=3)
|
||||
public String getUserRegion2() {
|
||||
return userRegion2;
|
||||
}
|
||||
|
||||
public void setUserRegion2(String userRegion2) {
|
||||
this.userRegion2 = userRegion2;
|
||||
}
|
||||
|
||||
@ExcelField(title="replace_content",align=2,sort=4)
|
||||
public String getUserRegion3() {
|
||||
return userRegion3;
|
||||
}
|
||||
|
||||
public void setUserRegion3(String userRegion3) {
|
||||
this.userRegion3 = userRegion3;
|
||||
}
|
||||
}
|
||||
@@ -228,6 +228,73 @@ public class ExportExcel {
|
||||
index++;
|
||||
}*/
|
||||
}
|
||||
/*** HTTP(s)重定向 重定向应答码 ***/
|
||||
if("redirect_response_code".equals(headerStr)){
|
||||
commentStr="";
|
||||
List<SysDataDictionaryItem> dict=DictUtils.getDictList("REDIRECT_RESPONSE_CODE");
|
||||
if(dict !=null && dict.size()>0){
|
||||
for (SysDataDictionaryItem sysDataDictionaryItem : dict) {
|
||||
commentStr=commentStr+sysDataDictionaryItem.getItemCode()+"("+msgProp.getProperty(sysDataDictionaryItem.getItemValue(),sysDataDictionaryItem.getItemValue())+")\n";
|
||||
index++;
|
||||
}
|
||||
defaultValue = "1";
|
||||
}
|
||||
commentStr=msgProp.getProperty("select")+":\n"+commentStr;
|
||||
index++;
|
||||
commentStr=commentStr+"\n"+msgProp.getProperty("rule_desc_tip")+":\n";
|
||||
index++;
|
||||
if(!StringUtil.isEmpty(defaultValue)){
|
||||
//1、默认值说明
|
||||
commentStr=commentStr+"▶"+msgProp.getProperty("default_value")+":"+defaultValue+"\n";
|
||||
index++;
|
||||
index++;
|
||||
}
|
||||
}
|
||||
/*** HTTP(s)阻断 应答码 ***/
|
||||
if("response_code".equals(headerStr)){
|
||||
commentStr="";
|
||||
List<SysDataDictionaryItem> dict=DictUtils.getDictList("RESPONSE_CODE");
|
||||
if(dict !=null && dict.size()>0){
|
||||
for (SysDataDictionaryItem sysDataDictionaryItem : dict) {
|
||||
commentStr=commentStr+sysDataDictionaryItem.getItemCode()+"("+msgProp.getProperty(sysDataDictionaryItem.getItemValue(),sysDataDictionaryItem.getItemValue())+")\n";
|
||||
index++;
|
||||
}
|
||||
defaultValue = "404";
|
||||
}
|
||||
commentStr=msgProp.getProperty("select")+":\n"+commentStr;
|
||||
index++;
|
||||
commentStr=commentStr+"\n"+msgProp.getProperty("rule_desc_tip")+":\n";
|
||||
index++;
|
||||
if(!StringUtil.isEmpty(defaultValue)){
|
||||
//1、默认值说明
|
||||
commentStr=commentStr+"▶"+msgProp.getProperty("default_value")+":"+defaultValue+"\n";
|
||||
index++;
|
||||
index++;
|
||||
}
|
||||
}
|
||||
/*** HTTP(s)替换 搜索区域 ***/
|
||||
if(("replace_zone".equals(headerStr)) && (region.getFunctionId().equals(209))){
|
||||
commentStr="";
|
||||
List<SysDataDictionaryItem> dict=DictUtils.getDictList("CONTROL_REPLACE_ZONE");
|
||||
if(dict !=null && dict.size()>0){
|
||||
for (SysDataDictionaryItem sysDataDictionaryItem : dict) {
|
||||
commentStr=commentStr+sysDataDictionaryItem.getItemCode()+"("+msgProp.getProperty(sysDataDictionaryItem.getItemValue(),sysDataDictionaryItem.getItemValue())+")\n";
|
||||
index++;
|
||||
}
|
||||
defaultValue = "http_resp_body";
|
||||
}
|
||||
commentStr=msgProp.getProperty("select")+":\n"+commentStr;
|
||||
index++;
|
||||
commentStr=commentStr+"\n"+msgProp.getProperty("rule_desc_tip")+":\n";
|
||||
index++;
|
||||
if(!StringUtil.isEmpty(defaultValue)){
|
||||
//1、默认值说明
|
||||
commentStr=commentStr+"▶"+msgProp.getProperty("default_value")+":"+defaultValue+"\n";
|
||||
index++;
|
||||
index++;
|
||||
}
|
||||
}
|
||||
|
||||
/***发现内容***/
|
||||
if("replaced_content".equals(headerStr)){
|
||||
commentStr=commentStr+msgProp.getProperty("rule_desc_tip")+":\n";
|
||||
@@ -245,7 +312,7 @@ public class ExportExcel {
|
||||
index++;
|
||||
}
|
||||
//intercept replace replace_zone
|
||||
if("replace_zone".equals(headerStr)){
|
||||
if("replace_zone".equals(headerStr) && (region.getFunctionId().equals(212))){
|
||||
commentStr="";
|
||||
List<SysDataDictionaryItem> interceptReplaceZone=DictUtils.getDictList("INTERCEPT_REPLACE_ZONE");
|
||||
if(interceptReplaceZone !=null && interceptReplaceZone.size()>0){
|
||||
|
||||
@@ -18,6 +18,7 @@ import com.beust.jcommander.internal.Lists;
|
||||
import com.beust.jcommander.internal.Sets;
|
||||
import com.nis.domain.FunctionRegionDict;
|
||||
import com.nis.domain.FunctionServiceDict;
|
||||
import com.nis.domain.SysDataDictionaryItem;
|
||||
import com.nis.domain.configuration.ComplexkeywordCfg;
|
||||
import com.nis.domain.configuration.DnsResStrategy;
|
||||
import com.nis.util.Constants;
|
||||
@@ -100,6 +101,72 @@ public class CheckComplexStringFormatThread implements Callable<String>{
|
||||
}
|
||||
}
|
||||
}
|
||||
// 代理HTTP(s)阻断
|
||||
if (regionDict.getFunctionId().equals(207)) {
|
||||
String userRegion1 = baseStringCfg.getUserRegion1();// 应答码
|
||||
if (StringUtils.isNotBlank(userRegion1)) {
|
||||
List<SysDataDictionaryItem> dicts = DictUtils.getDictList("RESPONSE_CODE");
|
||||
boolean has = false;
|
||||
for (SysDataDictionaryItem dict : dicts) {
|
||||
if (dict.getItemCode().equals(userRegion1)) {
|
||||
has = true;
|
||||
break;
|
||||
}
|
||||
}
|
||||
if (!has) {
|
||||
errInfo.append(String.format(prop.getProperty("is_incorrect"),
|
||||
prop.getProperty("response_code") + " ") + ";");
|
||||
}
|
||||
}
|
||||
|
||||
}
|
||||
// 代理 HTTP(s)重定向
|
||||
if (regionDict.getFunctionId().equals(208)) {
|
||||
String userRegion1 = baseStringCfg.getUserRegion1();// 重定向应答码
|
||||
String userRegion2 = baseStringCfg.getUserRegion2();// 重定向URL
|
||||
if (StringUtils.isNotBlank(userRegion1)) {
|
||||
List<SysDataDictionaryItem> dicts = DictUtils.getDictList("REDIRECT_RESPONSE_CODE");
|
||||
boolean has = false;
|
||||
for (SysDataDictionaryItem dict : dicts) {
|
||||
if (dict.getItemCode().equals(userRegion1)) {
|
||||
has = true;
|
||||
break;
|
||||
}
|
||||
}
|
||||
if (!has) {
|
||||
errInfo.append(String.format(prop.getProperty("is_incorrect"),
|
||||
prop.getProperty("redirect_response_code") + " ") + ";");
|
||||
}
|
||||
}
|
||||
if(StringUtils.isNotBlank(userRegion2)){
|
||||
Pattern pat = Pattern.compile("^[hH][tT][tT][pP]([sS]?):\\/\\/(\\S+\\.)+\\S{2,}$");
|
||||
boolean bl = pat.matcher(userRegion2).matches();
|
||||
if (!bl) {
|
||||
errInfo.append(String.format(prop.getProperty("is_in_wrong_format"),
|
||||
prop.getProperty("redirect_url") + " '" + userRegion2 + "' ") + ";");
|
||||
}
|
||||
}
|
||||
}
|
||||
// 代理HTTP(s)替换
|
||||
if (regionDict.getFunctionId().equals(209)) {
|
||||
String userRegion1 = baseStringCfg.getUserRegion1();// 搜索区域
|
||||
if (StringUtils.isNotBlank(userRegion1)) {
|
||||
List<SysDataDictionaryItem> dicts = DictUtils.getDictList("CONTROL_REPLACE_ZONE");
|
||||
boolean has = false;
|
||||
for (SysDataDictionaryItem dict : dicts) {
|
||||
if (dict.getItemCode().equals(userRegion1)) {
|
||||
has = true;
|
||||
break;
|
||||
}
|
||||
}
|
||||
if (!has) {
|
||||
errInfo.append(String.format(prop.getProperty("is_incorrect"),
|
||||
prop.getProperty("replace_zone") + " ") + ";");
|
||||
}
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
String keyword = baseStringCfg.getCfgKeywords();
|
||||
String district = baseStringCfg.getDistrict();
|
||||
if (StringUtils.isBlank(keyword)) {
|
||||
@@ -282,6 +349,14 @@ public class CheckComplexStringFormatThread implements Callable<String>{
|
||||
String.format(prop.getProperty("is_incorrect"), prop.getProperty("is_case_insenstive"))
|
||||
+ ";");
|
||||
}
|
||||
// 关键字十六进制校验
|
||||
if (hexP.indexOf("1") != -1 && isHex.intValue() == 1) {
|
||||
boolean bl = Pattern.compile("^([0-9|a-f|A-F]*)$").matcher(keyword).matches();
|
||||
if(!bl) {
|
||||
errInfo.append(
|
||||
prop.getProperty("key_word") + " '" + keyword + "' "+String.format(prop.getProperty("contains_non_hex_char")) + ";");
|
||||
}
|
||||
}
|
||||
}
|
||||
isHex = baseStringCfg.getIsHex();
|
||||
isCaseInsenstive = baseStringCfg.getIsCaseInsenstive();
|
||||
|
||||
@@ -294,6 +294,72 @@ public class CheckIpFormatThread implements Callable<String>{
|
||||
baseIpCfg.setAntiddosProtocol("");
|
||||
}
|
||||
}
|
||||
// 代理HTTP(s)阻断
|
||||
if (regionDict.getFunctionId().equals(207)) {
|
||||
String userRegion1 = baseIpCfg.getUserRegion1();// 应答码
|
||||
if (StringUtils.isNotBlank(userRegion1)) {
|
||||
List<SysDataDictionaryItem> dicts = DictUtils.getDictList("RESPONSE_CODE");
|
||||
boolean has = false;
|
||||
for (SysDataDictionaryItem dict : dicts) {
|
||||
if (dict.getItemCode().equals(userRegion1)) {
|
||||
has = true;
|
||||
break;
|
||||
}
|
||||
}
|
||||
if (!has) {
|
||||
errInfo.append(String.format(prop.getProperty("is_incorrect"),
|
||||
prop.getProperty("response_code") + " ") + ";");
|
||||
}
|
||||
}
|
||||
|
||||
}
|
||||
// 代理 HTTP(s)重定向
|
||||
if (regionDict.getFunctionId().equals(208)) {
|
||||
String userRegion1 = baseIpCfg.getUserRegion1();// 重定向应答码
|
||||
String userRegion2 = baseIpCfg.getUserRegion2();// 重定向URL
|
||||
if (StringUtils.isNotBlank(userRegion1)) {
|
||||
List<SysDataDictionaryItem> dicts = DictUtils.getDictList("REDIRECT_RESPONSE_CODE");
|
||||
boolean has = false;
|
||||
for (SysDataDictionaryItem dict : dicts) {
|
||||
if (dict.getItemCode().equals(userRegion1)) {
|
||||
has = true;
|
||||
break;
|
||||
}
|
||||
}
|
||||
if (!has) {
|
||||
errInfo.append(String.format(prop.getProperty("is_incorrect"),
|
||||
prop.getProperty("redirect_response_code") + " ") + ";");
|
||||
}
|
||||
}
|
||||
if(StringUtils.isNotBlank(userRegion2)){
|
||||
Pattern pat = Pattern.compile("^[hH][tT][tT][pP]([sS]?):\\/\\/(\\S+\\.)+\\S{2,}$");
|
||||
boolean bl = pat.matcher(userRegion2).matches();
|
||||
if (!bl) {
|
||||
errInfo.append(String.format(prop.getProperty("is_in_wrong_format"),
|
||||
prop.getProperty("redirect_url") + " '" + userRegion2 + "' ") + ";");
|
||||
}
|
||||
}
|
||||
}
|
||||
// 代理HTTP(s)替换
|
||||
if (regionDict.getFunctionId().equals(209)) {
|
||||
String userRegion1 = baseIpCfg.getUserRegion1();// 搜索区域
|
||||
if (StringUtils.isNotBlank(userRegion1)) {
|
||||
List<SysDataDictionaryItem> dicts = DictUtils.getDictList("CONTROL_REPLACE_ZONE");
|
||||
boolean has = false;
|
||||
for (SysDataDictionaryItem dict : dicts) {
|
||||
if (dict.getItemCode().equals(userRegion1)) {
|
||||
has = true;
|
||||
break;
|
||||
}
|
||||
}
|
||||
if (!has) {
|
||||
errInfo.append(String.format(prop.getProperty("is_incorrect"),
|
||||
prop.getProperty("replace_zone") + " ") + ";");
|
||||
}
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
if (regionDict.getRegionType().equals(1)) {
|
||||
boolean srcIpEmpty = false;
|
||||
boolean destIpEmpty = false;
|
||||
|
||||
@@ -139,6 +139,72 @@ public class CheckStringFormatThread implements Callable<String>{
|
||||
}
|
||||
}
|
||||
}
|
||||
// 代理HTTP(s)阻断
|
||||
if (regionDict.getFunctionId().equals(207)) {
|
||||
String userRegion1 = baseStringCfg.getUserRegion1();// 应答码
|
||||
if (StringUtils.isNotBlank(userRegion1)) {
|
||||
List<SysDataDictionaryItem> dicts = DictUtils.getDictList("RESPONSE_CODE");
|
||||
boolean has = false;
|
||||
for (SysDataDictionaryItem dict : dicts) {
|
||||
if (dict.getItemCode().equals(userRegion1)) {
|
||||
has = true;
|
||||
break;
|
||||
}
|
||||
}
|
||||
if (!has) {
|
||||
errInfo.append(String.format(prop.getProperty("is_incorrect"),
|
||||
prop.getProperty("response_code") + " ") + ";");
|
||||
}
|
||||
}
|
||||
|
||||
}
|
||||
// 代理 HTTP(s)重定向
|
||||
if (regionDict.getFunctionId().equals(208)) {
|
||||
String userRegion1 = baseStringCfg.getUserRegion1();// 重定向应答码
|
||||
String userRegion2 = baseStringCfg.getUserRegion2();// 重定向URL
|
||||
if (StringUtils.isNotBlank(userRegion1)) {
|
||||
List<SysDataDictionaryItem> dicts = DictUtils.getDictList("REDIRECT_RESPONSE_CODE");
|
||||
boolean has = false;
|
||||
for (SysDataDictionaryItem dict : dicts) {
|
||||
if (dict.getItemCode().equals(userRegion1)) {
|
||||
has = true;
|
||||
break;
|
||||
}
|
||||
}
|
||||
if (!has) {
|
||||
errInfo.append(String.format(prop.getProperty("is_incorrect"),
|
||||
prop.getProperty("redirect_response_code") + " ") + ";");
|
||||
}
|
||||
}
|
||||
if(StringUtils.isNotBlank(userRegion2)){
|
||||
Pattern pat = Pattern.compile("^[hH][tT][tT][pP]([sS]?):\\/\\/(\\S+\\.)+\\S{2,}$");
|
||||
boolean bl = pat.matcher(userRegion2).matches();
|
||||
if (!bl) {
|
||||
errInfo.append(String.format(prop.getProperty("is_in_wrong_format"),
|
||||
prop.getProperty("redirect_url") + " '" + userRegion2 + "' ") + ";");
|
||||
}
|
||||
}
|
||||
}
|
||||
// 代理HTTP(s)替换
|
||||
if (regionDict.getFunctionId().equals(209)) {
|
||||
String userRegion1 = baseStringCfg.getUserRegion1();// 搜索区域
|
||||
if (StringUtils.isNotBlank(userRegion1)) {
|
||||
List<SysDataDictionaryItem> dicts = DictUtils.getDictList("CONTROL_REPLACE_ZONE");
|
||||
boolean has = false;
|
||||
for (SysDataDictionaryItem dict : dicts) {
|
||||
if (dict.getItemCode().equals(userRegion1)) {
|
||||
has = true;
|
||||
break;
|
||||
}
|
||||
}
|
||||
if (!has) {
|
||||
errInfo.append(String.format(prop.getProperty("is_incorrect"),
|
||||
prop.getProperty("replace_zone") + " ") + ";");
|
||||
}
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
String keyword = baseStringCfg.getCfgKeywords();
|
||||
if (!regionDict.getFunctionId().equals(403) && !regionDict.getFunctionId().equals(201)) {// 201域名拦截
|
||||
if (StringUtils.isBlank(keyword)) {
|
||||
@@ -324,6 +390,14 @@ public class CheckStringFormatThread implements Callable<String>{
|
||||
String.format(prop.getProperty("is_incorrect"), prop.getProperty("is_case_insenstive"))
|
||||
+ ";");
|
||||
}
|
||||
// 十六进制 关键字校验
|
||||
if (hexP.indexOf("1") != -1 && isHex.intValue() == 1) {
|
||||
boolean bl = Pattern.compile("^([0-9|a-f|A-F]*)$").matcher(keyword).matches();
|
||||
if(!bl) {
|
||||
errInfo.append(
|
||||
prop.getProperty("key_word") + " '" + keyword + "' "+String.format(prop.getProperty("contains_non_hex_char")) + ";");
|
||||
}
|
||||
}
|
||||
}
|
||||
isHex = baseStringCfg.getIsHex();
|
||||
isCaseInsenstive = baseStringCfg.getIsCaseInsenstive();
|
||||
|
||||
@@ -85,6 +85,15 @@ import com.nis.domain.configuration.template.DnsResStrategyTemplate;
|
||||
import com.nis.domain.configuration.template.DomainInterceptMonitTemplate;
|
||||
import com.nis.domain.configuration.template.DomainInterceptRateLimitTemplate;
|
||||
import com.nis.domain.configuration.template.DomainInterceptTemplate;
|
||||
import com.nis.domain.configuration.template.HttpsRedirectComplexTemplate;
|
||||
import com.nis.domain.configuration.template.HttpsRedirectIpTemplate;
|
||||
import com.nis.domain.configuration.template.HttpsRedirectTemplate;
|
||||
import com.nis.domain.configuration.template.HttpsRejectComplexTemplate;
|
||||
import com.nis.domain.configuration.template.HttpsRejectIpTemplate;
|
||||
import com.nis.domain.configuration.template.HttpsRejectTemplate;
|
||||
import com.nis.domain.configuration.template.HttpsReplaceComplexTemplate;
|
||||
import com.nis.domain.configuration.template.HttpsReplaceIpTemplate;
|
||||
import com.nis.domain.configuration.template.HttpsReplaceTemplate;
|
||||
import com.nis.domain.configuration.template.IpAllTemplate;
|
||||
import com.nis.domain.configuration.template.IpCfgTemplate;
|
||||
import com.nis.domain.configuration.template.IpPayloadTemplate;
|
||||
@@ -1279,9 +1288,18 @@ public class BaseController {
|
||||
AsnCacheUtils.init(true);
|
||||
BlockingQueue<AsnIpTemplate> list = ei.getDataList(AsnIpTemplate.class );
|
||||
ipPortCfgs=this.checkIpCfgMulity(errTip,serviceDict, regionDict, asnNoMaps, list);
|
||||
} else if (regionDict.getFunctionId().equals(301)) {// DDOS IP
|
||||
}else if (regionDict.getFunctionId().equals(301)) {// DDOS IP
|
||||
BlockingQueue<DdosIpTemplate> list = ei.getDataList(DdosIpTemplate.class );
|
||||
ipPortCfgs=this.checkIpCfgMulity(errTip,serviceDict, regionDict, null, list);
|
||||
}else if(regionDict.getFunctionId().equals(207)){// HTTP(s)阻断
|
||||
BlockingQueue<HttpsRejectIpTemplate> list = ei.getDataList(HttpsRejectIpTemplate.class );
|
||||
ipPortCfgs=this.checkIpCfgMulity(errTip,serviceDict, regionDict, null, list);
|
||||
}else if(regionDict.getFunctionId().equals(208)){// HTTP(s)重定向
|
||||
BlockingQueue<HttpsRedirectIpTemplate> list = ei.getDataList(HttpsRedirectIpTemplate.class );
|
||||
ipPortCfgs=this.checkIpCfgMulity(errTip,serviceDict, regionDict, null, list);
|
||||
}else if(regionDict.getFunctionId().equals(209)){// HTTP(s)替换
|
||||
BlockingQueue<HttpsReplaceIpTemplate> list = ei.getDataList(HttpsReplaceIpTemplate.class );
|
||||
ipPortCfgs=this.checkIpCfgMulity(errTip,serviceDict, regionDict, null, list);
|
||||
} else {
|
||||
BlockingQueue<IpAllTemplate> list = ei.getDataList(IpAllTemplate.class );
|
||||
ipPortCfgs=this.checkIpCfgMulity(errTip,serviceDict, regionDict, null, list);
|
||||
@@ -1307,6 +1325,15 @@ public class BaseController {
|
||||
BlockingQueue<DomainInterceptTemplate> list = ei.getDataList(DomainInterceptTemplate.class);
|
||||
stringCfgs=this.checkStringCfgMulity(errTip,serviceDict, regionDict, list);
|
||||
}
|
||||
}else if(regionDict.getFunctionId().equals(207)){// HTTP(s)阻断
|
||||
BlockingQueue<HttpsRejectTemplate> list = ei.getDataList(HttpsRejectTemplate.class);
|
||||
stringCfgs=this.checkStringCfgMulity(errTip,serviceDict, regionDict, list);
|
||||
}else if(regionDict.getFunctionId().equals(208)){// HTTP(s)重定向
|
||||
BlockingQueue<HttpsRedirectTemplate> list = ei.getDataList(HttpsRedirectTemplate.class);
|
||||
stringCfgs=this.checkStringCfgMulity(errTip,serviceDict, regionDict, list);
|
||||
}else if(regionDict.getFunctionId().equals(209)){// HTTP(s)替换
|
||||
BlockingQueue<HttpsReplaceTemplate> list = ei.getDataList(HttpsReplaceTemplate.class);
|
||||
stringCfgs=this.checkStringCfgMulity(errTip,serviceDict, regionDict, list);
|
||||
}else {
|
||||
BlockingQueue<StringAllTemplate> list = ei.getDataList(StringAllTemplate.class );
|
||||
stringCfgs=this.checkStringCfgMulity(errTip,serviceDict, regionDict, list);
|
||||
@@ -1317,6 +1344,15 @@ public class BaseController {
|
||||
BlockingQueue<DnsComplexStringTemplate> list = ei.getDataList(DnsComplexStringTemplate.class
|
||||
);
|
||||
complexkeywordCfgs = this.checkComplexStringCfgMulity(errTip,serviceDict, regionDict, list);
|
||||
} else if(regionDict.getFunctionId().equals(207)){// HTTP(s)阻断
|
||||
BlockingQueue<HttpsRejectComplexTemplate> list = ei.getDataList(HttpsRejectComplexTemplate.class);
|
||||
complexkeywordCfgs = this.checkComplexStringCfgMulity(errTip,serviceDict, regionDict, list);
|
||||
} else if(regionDict.getFunctionId().equals(208)){// HTTP(s)重定向
|
||||
BlockingQueue<HttpsRedirectComplexTemplate> list = ei.getDataList(HttpsRedirectComplexTemplate.class);
|
||||
complexkeywordCfgs = this.checkComplexStringCfgMulity(errTip,serviceDict, regionDict, list);
|
||||
} else if(regionDict.getFunctionId().equals(209)){// HTTP(s)替换
|
||||
BlockingQueue<HttpsReplaceComplexTemplate> list = ei.getDataList(HttpsReplaceComplexTemplate.class);
|
||||
complexkeywordCfgs = this.checkComplexStringCfgMulity(errTip,serviceDict, regionDict, list);
|
||||
} else {
|
||||
BlockingQueue<ComplexStringAllTemplate> list = ei.getDataList(ComplexStringAllTemplate.class
|
||||
);
|
||||
@@ -1944,8 +1980,14 @@ public class BaseController {
|
||||
ei.loadInitParams(P2pIpTemplate.class, msgProp, regionDict, serviceDict);
|
||||
} else if (regionDict.getFunctionId().equals(600)) {// ASN IP
|
||||
ei.loadInitParams(AsnIpTemplate.class, msgProp, regionDict, serviceDict);
|
||||
} else if (regionDict.getFunctionId().equals(301)) {// DDOS IP
|
||||
} else if (regionDict.getFunctionId().equals(301)) {// DDOS IP
|
||||
ei.loadInitParams(DdosIpTemplate.class, msgProp, regionDict, serviceDict);
|
||||
} else if(regionDict.getFunctionId().equals(207)){// HTTP(s)阻断
|
||||
ei.loadInitParams(HttpsRejectIpTemplate.class, this.getMsgProp(), regionDict, serviceDict);
|
||||
} else if(regionDict.getFunctionId().equals(208)){// HTTP(s)重定向
|
||||
ei.loadInitParams(HttpsRedirectIpTemplate.class, this.getMsgProp(), regionDict, serviceDict);
|
||||
} else if(regionDict.getFunctionId().equals(209)){// HTTP(s)替换
|
||||
ei.loadInitParams(HttpsReplaceIpTemplate.class, this.getMsgProp(), regionDict, serviceDict);
|
||||
} else {
|
||||
ei.loadInitParams(IpAllTemplate.class, msgProp, regionDict, serviceDict);
|
||||
}
|
||||
@@ -1963,13 +2005,25 @@ public class BaseController {
|
||||
}else{// 白名单
|
||||
ei.loadInitParams(DomainInterceptTemplate.class, msgProp, regionDict, serviceDict);
|
||||
}
|
||||
} else {
|
||||
}else if(regionDict.getFunctionId().equals(207)){// HTTP(s)阻断
|
||||
ei.loadInitParams(HttpsRejectTemplate.class, this.getMsgProp(), regionDict, serviceDict);
|
||||
}else if(regionDict.getFunctionId().equals(208)){// HTTP(s)重定向
|
||||
ei.loadInitParams(HttpsRedirectTemplate.class, this.getMsgProp(), regionDict, serviceDict);
|
||||
}else if(regionDict.getFunctionId().equals(209)){// HTTP(s)替换
|
||||
ei.loadInitParams(HttpsReplaceTemplate.class, this.getMsgProp(), regionDict, serviceDict);
|
||||
}else {
|
||||
ei.loadInitParams(StringAllTemplate.class, msgProp, regionDict, serviceDict);
|
||||
}
|
||||
|
||||
} else if (regionDict.getRegionType().equals(3)) {// 增强字符串类
|
||||
if (regionDict.getFunctionId().equals(7)&&serviceDict!=null&&serviceDict.getAction().intValue()==16) {
|
||||
ei.loadInitParams(DnsComplexStringTemplate.class, msgProp, regionDict, serviceDict);
|
||||
}else if(regionDict.getFunctionId().equals(207)){// HTTP(s)阻断
|
||||
ei.loadInitParams(HttpsRejectComplexTemplate.class, this.getMsgProp(), regionDict, serviceDict);
|
||||
}else if(regionDict.getFunctionId().equals(208)){// HTTP(s)重定向
|
||||
ei.loadInitParams(HttpsRedirectComplexTemplate.class, this.getMsgProp(), regionDict, serviceDict);
|
||||
}else if(regionDict.getFunctionId().equals(209)){// HTTP(s)替换
|
||||
ei.loadInitParams(HttpsReplaceComplexTemplate.class, this.getMsgProp(), regionDict, serviceDict);
|
||||
} else {
|
||||
ei.loadInitParams(ComplexStringAllTemplate.class, msgProp, regionDict, serviceDict);
|
||||
}
|
||||
|
||||
@@ -41,6 +41,15 @@ import com.nis.domain.configuration.template.IpAllTemplate;
|
||||
import com.nis.domain.configuration.template.DomainInterceptMonitTemplate;
|
||||
import com.nis.domain.configuration.template.DomainInterceptRateLimitTemplate;
|
||||
import com.nis.domain.configuration.template.DomainInterceptTemplate;
|
||||
import com.nis.domain.configuration.template.HttpsRedirectComplexTemplate;
|
||||
import com.nis.domain.configuration.template.HttpsRedirectIpTemplate;
|
||||
import com.nis.domain.configuration.template.HttpsRedirectTemplate;
|
||||
import com.nis.domain.configuration.template.HttpsRejectComplexTemplate;
|
||||
import com.nis.domain.configuration.template.HttpsRejectIpTemplate;
|
||||
import com.nis.domain.configuration.template.HttpsRejectTemplate;
|
||||
import com.nis.domain.configuration.template.HttpsReplaceComplexTemplate;
|
||||
import com.nis.domain.configuration.template.HttpsReplaceIpTemplate;
|
||||
import com.nis.domain.configuration.template.HttpsReplaceTemplate;
|
||||
import com.nis.domain.configuration.template.IpPayloadTemplate;
|
||||
import com.nis.domain.configuration.template.IpRateLimitTemplate;
|
||||
import com.nis.domain.configuration.template.IpWhitelistTemplate;
|
||||
@@ -350,6 +359,21 @@ public class IpController extends BaseController{
|
||||
ExportExcel excel=new ExportExcel(serviceDict,regionDict,pro,null, SnatTemplate.class, 2);
|
||||
excel.setDataList(pro,classList,null).
|
||||
write(request,response, fileName).dispose();
|
||||
}else if(regionDict.getFunctionId().equals(207)){// HTTP(s)阻断
|
||||
List<HttpsRejectIpTemplate> classList=new ArrayList<HttpsRejectIpTemplate>();
|
||||
ExportExcel excel=new ExportExcel(serviceDict,regionDict,this.getMsgProp(),null, HttpsRejectIpTemplate.class, 2);
|
||||
excel.setDataList(this.getMsgProp(),classList,null).
|
||||
write(request,response, fileName).dispose();
|
||||
}else if(regionDict.getFunctionId().equals(208)){// HTTP(s)重定向
|
||||
List<HttpsRedirectIpTemplate> classList=new ArrayList<HttpsRedirectIpTemplate>();
|
||||
ExportExcel excel=new ExportExcel(serviceDict,regionDict,this.getMsgProp(),null, HttpsRedirectIpTemplate.class, 2);
|
||||
excel.setDataList(this.getMsgProp(),classList,null).
|
||||
write(request,response, fileName).dispose();
|
||||
}else if(regionDict.getFunctionId().equals(209)){// HTTP(s)替换
|
||||
List<HttpsReplaceIpTemplate> classList=new ArrayList<HttpsReplaceIpTemplate>();
|
||||
ExportExcel excel=new ExportExcel(serviceDict,regionDict,this.getMsgProp(),null, HttpsReplaceIpTemplate.class, 2);
|
||||
excel.setDataList(this.getMsgProp(),classList,null).
|
||||
write(request,response, fileName).dispose();
|
||||
}else{
|
||||
List<IpAllTemplate> classList=new ArrayList<IpAllTemplate>();
|
||||
ExportExcel excel=new ExportExcel(serviceDict,regionDict,pro,null, IpAllTemplate.class, 2);
|
||||
@@ -386,6 +410,21 @@ public class IpController extends BaseController{
|
||||
excel.setDataList(pro,classList,null).
|
||||
write(request,response, fileName).dispose();
|
||||
}
|
||||
}else if(regionDict.getFunctionId().equals(207)){// HTTP(s)阻断
|
||||
List<HttpsRejectTemplate> classList=new ArrayList<HttpsRejectTemplate>();
|
||||
ExportExcel excel=new ExportExcel(serviceDict,regionDict,this.getMsgProp(),null, HttpsRejectTemplate.class, 2);
|
||||
excel.setDataList(this.getMsgProp(),classList,null).
|
||||
write(request,response, fileName).dispose();
|
||||
}else if(regionDict.getFunctionId().equals(208)){// HTTP(s)重定向
|
||||
List<HttpsRedirectTemplate> classList=new ArrayList<HttpsRedirectTemplate>();
|
||||
ExportExcel excel=new ExportExcel(serviceDict,regionDict,this.getMsgProp(),null, HttpsRedirectTemplate.class, 2);
|
||||
excel.setDataList(this.getMsgProp(),classList,null).
|
||||
write(request,response, fileName).dispose();
|
||||
}else if(regionDict.getFunctionId().equals(209)){// HTTP(s)替换
|
||||
List<HttpsReplaceTemplate> classList=new ArrayList<HttpsReplaceTemplate>();
|
||||
ExportExcel excel=new ExportExcel(serviceDict,regionDict,this.getMsgProp(),null, HttpsReplaceTemplate.class, 2);
|
||||
excel.setDataList(this.getMsgProp(),classList,null).
|
||||
write(request,response, fileName).dispose();
|
||||
}else{
|
||||
List<StringAllTemplate> classList=new ArrayList<StringAllTemplate>();
|
||||
ExportExcel excel=new ExportExcel(serviceDict,regionDict,pro,null, StringAllTemplate.class, 2);
|
||||
@@ -401,6 +440,21 @@ public class IpController extends BaseController{
|
||||
ExportExcel excel=new ExportExcel(serviceDict,regionDict,pro,null, DnsComplexStringTemplate.class, 2);
|
||||
excel.setDataList(pro,classList,null).
|
||||
write(request,response, fileName).dispose();
|
||||
}else if(regionDict.getFunctionId().equals(207)){// HTTP(s)阻断
|
||||
List<HttpsRejectComplexTemplate> classList=new ArrayList<HttpsRejectComplexTemplate>();
|
||||
ExportExcel excel=new ExportExcel(serviceDict,regionDict,this.getMsgProp(),null, HttpsRejectComplexTemplate.class, 2);
|
||||
excel.setDataList(this.getMsgProp(),classList,null).
|
||||
write(request,response, fileName).dispose();
|
||||
}else if(regionDict.getFunctionId().equals(208)){// HTTP(s)重定向
|
||||
List<HttpsRedirectComplexTemplate> classList=new ArrayList<HttpsRedirectComplexTemplate>();
|
||||
ExportExcel excel=new ExportExcel(serviceDict,regionDict,this.getMsgProp(),null, HttpsRedirectComplexTemplate.class, 2);
|
||||
excel.setDataList(this.getMsgProp(),classList,null).
|
||||
write(request,response, fileName).dispose();
|
||||
}else if(regionDict.getFunctionId().equals(209)){// HTTP(s)替换
|
||||
List<HttpsReplaceComplexTemplate> classList=new ArrayList<HttpsReplaceComplexTemplate>();
|
||||
ExportExcel excel=new ExportExcel(serviceDict,regionDict,this.getMsgProp(),null, HttpsReplaceComplexTemplate.class, 2);
|
||||
excel.setDataList(this.getMsgProp(),classList,null).
|
||||
write(request,response, fileName).dispose();
|
||||
}else{
|
||||
List<ComplexStringAllTemplate> classList=new ArrayList<ComplexStringAllTemplate>();
|
||||
ExportExcel excel=new ExportExcel(serviceDict,regionDict,pro,null, ComplexStringAllTemplate.class, 2);
|
||||
|
||||
@@ -52,7 +52,7 @@ import jersey.repackaged.com.google.common.collect.Lists;
|
||||
@RequestMapping("${adminPath}/proxy/control/httpRedirect")
|
||||
public class HttpRedirectPolicyController extends BaseController {
|
||||
@RequestMapping(value = { "httpRedirectList", "httpBlockList", "httpReplaceList", "httpMonitList",
|
||||
"httpWhitelistList" })
|
||||
"httpWhitelistList", ""})
|
||||
public String list(Model model, HttpServletRequest request, HttpServletResponse response,
|
||||
@ModelAttribute("cfg") CfgIndexInfo cfg) {
|
||||
Page<CfgIndexInfo> searchPage = new Page<CfgIndexInfo>(request, response, "a");
|
||||
|
||||
@@ -1690,6 +1690,19 @@ public abstract class BaseService {
|
||||
else if("subscribe_id".equals(regionDict.getConfigServiceType())){
|
||||
this.saveStringCfgBatch(regionDict,serviceDict,listPage, "ntc_subscribe_id_cfg",send);
|
||||
}
|
||||
// HTTP(s) URL
|
||||
else if(regionDict.getDictId().intValue()==97 || regionDict.getDictId().intValue()==79 ||
|
||||
regionDict.getDictId().intValue()==85 || regionDict.getDictId().intValue()==91 ||
|
||||
regionDict.getDictId().intValue()==99){
|
||||
this.saveStringCfgBatch(regionDict,serviceDict,listPage, "http_url_cfg",send);
|
||||
}
|
||||
// HTTP(s) 请求/应答内容
|
||||
else if(regionDict.getDictId().intValue()==94 || regionDict.getDictId().intValue()==95 ||
|
||||
regionDict.getDictId().intValue()==88 || regionDict.getDictId().intValue()==89 ||
|
||||
regionDict.getDictId().intValue()==82 || regionDict.getDictId().intValue()==83 ||
|
||||
regionDict.getDictId().intValue()==103 || regionDict.getDictId().intValue()==104){
|
||||
this.saveStringCfgBatch(regionDict,serviceDict,listPage, "http_body_cfg",send);
|
||||
}
|
||||
}else if("ComplexkeywordCfg".equals(type)) {
|
||||
List<ComplexkeywordCfg> listPage = (List<ComplexkeywordCfg>) list;
|
||||
// DNS
|
||||
@@ -1716,6 +1729,17 @@ public abstract class BaseService {
|
||||
if(regionDict.getDictId().intValue()==63) {
|
||||
// appCfgService.saveAppHttpCfg(listPage);
|
||||
this.saveComplexkeywordCfgBatch(regionDict,serviceDict,listPage, AppHttpCfg.getTablename(),send);
|
||||
}else
|
||||
// HTTP(s)请求头域
|
||||
if(regionDict.getDictId().intValue()==98 || regionDict.getDictId().intValue()==80 ||
|
||||
regionDict.getDictId().intValue()==86 || regionDict.getDictId().intValue()==92 ||
|
||||
regionDict.getDictId().intValue()==100) {
|
||||
this.saveComplexkeywordCfgBatch(regionDict,serviceDict,listPage, "http_req_head_cfg",send);
|
||||
}else
|
||||
// HTTP(s)响应头域
|
||||
if(regionDict.getDictId().intValue()==102 || regionDict.getDictId().intValue()==81 ||
|
||||
regionDict.getDictId().intValue()==87 || regionDict.getDictId().intValue()==93) {
|
||||
this.saveComplexkeywordCfgBatch(regionDict,serviceDict,listPage, "http_res_head_cfg",send);
|
||||
}
|
||||
}else if("DnsResStrategy".equals(type)) {
|
||||
List<DnsResStrategy> listPage = (List<DnsResStrategy>) list;
|
||||
|
||||
@@ -1430,4 +1430,5 @@ agent_count=AGENT
|
||||
letter_num=LETTER
|
||||
config_num=CONFIG
|
||||
monitor_num=MONITOR
|
||||
control_num=CONTROL
|
||||
control_num=CONTROL
|
||||
contains_non_hex_char=Contains non-hexadecimal characters
|
||||
@@ -1419,4 +1419,5 @@ l3_header_error=Only four attribute values are allowed to be entered at most
|
||||
IP_HEADER=IP Header
|
||||
ICMP_HEADER=ICMP Header
|
||||
offset_expression=Offset Expression
|
||||
cfg_custom=\u041F\u043E\u043B\u044C\u0437\u043E\u0432\u0430\u0442\u0435\u043B\u044C\u0441\u043A\u0438\u0435 \u0421\u0442\u043E\u043B\u0431\u0446\u044B
|
||||
cfg_custom=\u041F\u043E\u043B\u044C\u0437\u043E\u0432\u0430\u0442\u0435\u043B\u044C\u0441\u043A\u0438\u0435 \u0421\u0442\u043E\u043B\u0431\u0446\u044B
|
||||
contains_non_hex_char=Contains non-hexadecimal characters
|
||||
@@ -1430,4 +1430,5 @@ agent_count=\u4ee3\u7406\u6b21\u6570
|
||||
letter_num=\u6765\u51fd\u4ef6\u6570
|
||||
config_num=\u914d\u7f6e\u603b\u6570
|
||||
monitor_num=\u76d1\u6d4b\u6570\u91cf
|
||||
control_num=\u7ba1\u63a7\u6570\u91cf
|
||||
control_num=\u7ba1\u63a7\u6570\u91cf
|
||||
contains_non_hex_char=\u5305\u542B\u975E\u5341\u516D\u8FDB\u5236\u5B57\u7B26
|
||||
@@ -286,6 +286,23 @@
|
||||
onClick="javascript:window.location='${ctx}/proxy/control/httpRedirect/form?functionId=${cfg.functionId}'">
|
||||
<i class="fa fa-plus"></i>
|
||||
<spring:message code="add"></spring:message></button>
|
||||
<c:set var="serviceImport" value="false"></c:set>
|
||||
<c:set var="regionImport" value="false"></c:set>
|
||||
<c:forEach items="${serviceList}" var="service" >
|
||||
<c:if test="${(cfg.functionId eq service.functionId) && service.isImport eq 1}">
|
||||
<c:set var="serviceImport" value="true"></c:set>
|
||||
</c:if>
|
||||
</c:forEach>
|
||||
<c:forEach items="${regionList}" var="region" >
|
||||
<c:if test="${(cfg.functionId eq region.functionId) && region.isImport eq 1}">
|
||||
<c:set var="regionImport" value="true"></c:set>
|
||||
</c:if>
|
||||
</c:forEach>
|
||||
<c:if test="${serviceImport eq 'true' && regionImport eq 'true'}">
|
||||
<button type="button" class="btn btn-primary import" >
|
||||
<i class="fa fa-plus"></i>
|
||||
<spring:message code="import"></spring:message></button>
|
||||
</c:if>
|
||||
<!-- 导入功能按钮 -->
|
||||
<%-- <div class="btn-group">
|
||||
<button type="button" class="btn btn-default dropdown-toggle green" data-toggle="dropdown">
|
||||
@@ -774,6 +791,8 @@
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<c:set var="importPath" value="/proxy/control/httpRedirect?functionId=${cfg.functionId}"/>
|
||||
<!-- 模板导入,start -->
|
||||
<%@include file="/WEB-INF/include/excel/importModal.jsp" %>
|
||||
</body>
|
||||
</html>
|
||||
Reference in New Issue
Block a user