basic和behavior也加上dkc的自定义域,界面暂时隐藏,调整app的dns spoofing的复选框位置;

APP Identify IP修改为APP IP;
DK GL修改为Correlation;
调整导入的stream模块自定义域设置;
https 的contol doLog默认为1,可选择;
https 的cache和intercep默认为2,不变;
This commit is contained in:
duandongmei
2019-01-11 11:36:04 +06:00
parent bfb931747b
commit 11e35d04ed
11 changed files with 115 additions and 23 deletions

View File

@@ -2402,11 +2402,67 @@ public abstract class BaseService {
maatCfg.setUserRegion(Constants.DNS_STRATEGY_USER_REGION_KEY+"="+_cfg.getDnsStrategyId());
}
}else if(regionDict.getFunctionId()==407) {// Protocol Identify
//PROTOCOL IDENTITY USER_REGION PROTOCOL_ID=ProtocolId
maatCfg.setUserRegion(Constants.PROTO_ID_REGION + "=" + _cfg.getAppCode());
// 限速业务需要设置 USER_REGION Droprate=userregion3
if (Constants.RATELIMIT_ACTION.equals(_cfg.getAction())) {
_cfg.setUserRegion1(StringUtil.isEmpty(_cfg.getUserRegion1()) ? "0":_cfg.getUserRegion1());
//限速 需要发Droprate=0.001 暂不支持Bandwidth=200kbps
if(_cfg.getUserRegion1().equals("0")){//丢包率
_cfg.setUserRegion2(StringUtil.isEmpty(_cfg.getUserRegion2()) ? "":_cfg.getUserRegion2());
maatCfg.setUserRegion(maatCfg.getUserRegion()+Constants.USER_REGION_SPLIT +Constants.INTERCEPT_IP_RATELIMIT_DROPRATE_USER_REGION_KEY+"="+_cfg.getUserRegion2());
}else if(_cfg.getUserRegion1().equals("1")){//带宽
_cfg.setUserRegion3(StringUtil.isEmpty(_cfg.getUserRegion3()) ? "":_cfg.getUserRegion3());
maatCfg.setUserRegion(maatCfg.getUserRegion()+Constants.USER_REGION_SPLIT +Constants.INTERCEPT_IP_RATELIMIT_BANDWITH_USER_REGION_KEY+"="+_cfg.getUserRegion3());
}
}
//DKC=8 USER_REGION DKC=userregion4
if(!StringUtil.isEmpty(_cfg.getUserRegion4()) && Constants.REJECT_ACTION.equals(_cfg.getAction())){
maatCfg.setUserRegion(maatCfg.getUserRegion()+Constants.USER_REGION_SPLIT +Constants.APP_VIGNORE_USER_REGION_KEY+"="+_cfg.getUserRegion4());
}
// USER_REGION config_id=compileId
maatCfg.setUserRegion(maatCfg.getUserRegion()+Constants.USER_REGION_SPLIT+"config_id="+maatCfg.getCompileId());
}else if(regionDict.getFunctionId()==63) {// APP Policy
maatCfg.setUserRegion(Constants.APP_ID_REGION + "=" + _cfg.getAppCode()+Constants.USER_REGION_SPLIT+"config_id="+_cfg.getCompileId());
//APP IDENTITY USER_REGION包含APP_ID=AppCode;BEHAV_ID=ProtocolId
maatCfg.setUserRegion(Constants.APP_ID_REGION + "=" + _cfg.getAppCode()+Constants.USER_REGION_SPLIT+ Constants.BEHAV_ID_REGION + "=" + _cfg.getBehavCode());
// 限速业务需要设置
if (Constants.RATELIMIT_ACTION.equals(_cfg.getAction())) {
_cfg.setUserRegion1(StringUtil.isEmpty(_cfg.getUserRegion1()) ? "0":_cfg.getUserRegion1());
//限速 需要发Droprate=0.001 暂不支持Bandwidth=200kbps
if(_cfg.getUserRegion1().equals("0")){//丢包率
_cfg.setUserRegion2(StringUtil.isEmpty(_cfg.getUserRegion2()) ? "":_cfg.getUserRegion2());
maatCfg.setUserRegion(maatCfg.getUserRegion()+Constants.USER_REGION_SPLIT +Constants.INTERCEPT_IP_RATELIMIT_DROPRATE_USER_REGION_KEY+"="+_cfg.getUserRegion2());
}else if(_cfg.getUserRegion1().equals("1")){//带宽
_cfg.setUserRegion3(StringUtil.isEmpty(_cfg.getUserRegion3()) ? "":_cfg.getUserRegion3());
maatCfg.setUserRegion(maatCfg.getUserRegion()+Constants.USER_REGION_SPLIT +Constants.INTERCEPT_IP_RATELIMIT_BANDWITH_USER_REGION_KEY+"="+_cfg.getUserRegion3());
}
}
//DKC=8
if(!StringUtil.isEmpty(_cfg.getUserRegion4()) && Constants.REJECT_ACTION.equals(_cfg.getAction())){
maatCfg.setUserRegion(Constants.USER_REGION_SPLIT +Constants.APP_VIGNORE_USER_REGION_KEY+"="+_cfg.getUserRegion4());
}
maatCfg.setUserRegion(Constants.USER_REGION_SPLIT+"config_id="+_cfg.getCompileId());
}else if(regionDict.getFunctionId()==408) {// Behavior Identify
maatCfg.setUserRegion(Constants.PROTO_ID_REGION + "=" + _cfg.getAppCode()+Constants.USER_REGION_SPLIT+Constants.APP_VIGNORE_USER_REGION_KEY+"=1");
//BEHAVIOR IDENTITY USER_REGION包含APP_ID=AppCode;BEHAV_ID=ProtocolId
maatCfg.setUserRegion(Constants.APP_ID_REGION + "=" + _cfg.getAppCode()+Constants.USER_REGION_SPLIT+ Constants.BEHAV_ID_REGION + "=" + _cfg.getBehavCode());
// 限速业务需要设置
if (Constants.RATELIMIT_ACTION.equals(_cfg.getAction())) {
_cfg.setUserRegion1(StringUtil.isEmpty(_cfg.getUserRegion1()) ? "0":_cfg.getUserRegion1());
//限速 需要发Droprate=0.001 暂不支持Bandwidth=200kbps
if(_cfg.getUserRegion1().equals("0")){//丢包率
_cfg.setUserRegion2(StringUtil.isEmpty(_cfg.getUserRegion2()) ? "":_cfg.getUserRegion2());
maatCfg.setUserRegion(maatCfg.getUserRegion()+Constants.USER_REGION_SPLIT +Constants.INTERCEPT_IP_RATELIMIT_DROPRATE_USER_REGION_KEY+"="+_cfg.getUserRegion2());
}else if(_cfg.getUserRegion1().equals("1")){//带宽
_cfg.setUserRegion3(StringUtil.isEmpty(_cfg.getUserRegion3()) ? "":_cfg.getUserRegion3());
maatCfg.setUserRegion(maatCfg.getUserRegion()+Constants.USER_REGION_SPLIT +Constants.INTERCEPT_IP_RATELIMIT_BANDWITH_USER_REGION_KEY+"="+_cfg.getUserRegion3());
}
}
//DKC=8
if(!StringUtil.isEmpty(_cfg.getUserRegion4()) && Constants.REJECT_ACTION.equals(_cfg.getAction())){
maatCfg.setUserRegion(Constants.USER_REGION_SPLIT +Constants.APP_VIGNORE_USER_REGION_KEY+"="+_cfg.getUserRegion4());
}
maatCfg.setUserRegion(Constants.USER_REGION_SPLIT+"config_id="+_cfg.getCompileId());
}else if(regionDict.getFunctionId()==301) {// Anti DDOS
Map umap= new HashMap();
umap.put("protocol", _cfg.getAntiddosProtocol());