IP拦截、域名拦截导入提交.
This commit is contained in:
@@ -205,6 +205,28 @@ public class ExportExcel {
|
||||
index++;
|
||||
}
|
||||
}
|
||||
// 拦截强度
|
||||
if("intercept_intensity".equals(headerStr)){
|
||||
commentStr="";
|
||||
List<SysDataDictionaryItem> dict=DictUtils.getDictList("INTERCEPT_DOMAIN_INTENSITY");
|
||||
if(dict !=null && dict.size()>0){
|
||||
for (SysDataDictionaryItem sysDataDictionaryItem : dict) {
|
||||
commentStr=commentStr+sysDataDictionaryItem.getItemCode()+"("+msgProp.getProperty(sysDataDictionaryItem.getItemValue(),sysDataDictionaryItem.getItemValue())+")\n";
|
||||
index++;
|
||||
}
|
||||
//defaultValue=dict.get(0).getItemCode();
|
||||
}
|
||||
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";
|
||||
@@ -805,6 +827,10 @@ public class ExportExcel {
|
||||
List<SysDataDictionaryItem> protocol=DictUtils.getDictList("PROTOCOL");
|
||||
if(protocol !=null && protocol.size()>0){
|
||||
for (SysDataDictionaryItem sysDataDictionaryItem : protocol) {
|
||||
// IP拦截 监测
|
||||
if((sysDataDictionaryItem.getItemCode().equals("17")) && (region.getFunctionId().equals(200) && service.getAction().equals(1))){
|
||||
continue;
|
||||
}
|
||||
if((","+region.getConfigProtocol()+",").indexOf(","+sysDataDictionaryItem.getItemCode()+",") >-1){
|
||||
if(StringUtil.isEmpty(msgProp.getProperty(sysDataDictionaryItem.getItemValue()))){
|
||||
commentStr=commentStr+sysDataDictionaryItem.getItemCode()+"("+sysDataDictionaryItem.getItemValue()+")"+"\n";
|
||||
|
||||
@@ -93,6 +93,10 @@ public class CheckIpFormatThread implements Callable<String>{
|
||||
String protocol = regionDict.getConfigProtocol();
|
||||
String direction = regionDict.getConfigDirection();
|
||||
StringBuffer errTip = new StringBuffer();
|
||||
// 因IP拦截 监测
|
||||
if(regionDict.getFunctionId().equals(200) && serviceDict.getAction().equals(1)){
|
||||
protocol="6";
|
||||
}
|
||||
for (int i = 0; i < list.size(); i++) {
|
||||
StringBuffer errInfo = new StringBuffer();
|
||||
IpPortCfg baseIpCfg = new IpPortCfg();
|
||||
|
||||
@@ -105,8 +105,41 @@ public class CheckStringFormatThread implements Callable<String>{
|
||||
}
|
||||
}
|
||||
}
|
||||
// 代理-域名拦截
|
||||
if (regionDict.getFunctionId().equals(201) && "intercept_domain".equals(regionDict.getConfigServiceType())) {
|
||||
String userRegion5 = baseStringCfg.getUserRegion5();// 拦截强度
|
||||
String userRegion2 = baseStringCfg.getUserRegion2();// 丢包率
|
||||
if (StringUtils.isNotBlank(userRegion5)) {
|
||||
List<SysDataDictionaryItem> dicts = DictUtils.getDictList("INTERCEPT_DOMAIN_INTENSITY");
|
||||
boolean has = false;
|
||||
for (SysDataDictionaryItem dict : dicts) {
|
||||
if (dict.getItemCode().equals(userRegion5)) {
|
||||
has = true;
|
||||
break;
|
||||
}
|
||||
}
|
||||
if (!has) {
|
||||
errInfo.append(String.format(prop.getProperty("is_incorrect"),
|
||||
prop.getProperty("intercept_intensity") + " ") + ";");
|
||||
}
|
||||
}
|
||||
if (StringUtils.isNotBlank(userRegion2)) {
|
||||
List<SysDataDictionaryItem> dicts = DictUtils.getDictList("RATE_LIMIT");
|
||||
boolean has = false;
|
||||
for (SysDataDictionaryItem dict : dicts) {
|
||||
if (dict.getItemCode().equals(userRegion2)) {
|
||||
has = true;
|
||||
break;
|
||||
}
|
||||
}
|
||||
if (!has) {
|
||||
errInfo.append(String.format(prop.getProperty("is_incorrect"),
|
||||
prop.getProperty("ratelimit") + " ") + ";");
|
||||
}
|
||||
}
|
||||
}
|
||||
String keyword = baseStringCfg.getCfgKeywords();
|
||||
if (!regionDict.getFunctionId().equals(403)) {
|
||||
if (!regionDict.getFunctionId().equals(403) && !regionDict.getFunctionId().equals(201)) {// 201域名拦截
|
||||
if (StringUtils.isBlank(keyword)) {
|
||||
errInfo.append(
|
||||
String.format(prop.getProperty("can_not_null"), prop.getProperty("key_word") + " ") + ";");
|
||||
|
||||
Reference in New Issue
Block a user