Anti DDOS导入下发增加userRegion.

This commit is contained in:
zhangwenqing
2018-12-21 21:58:32 +08:00
parent cb6b9f152f
commit 69272ba0db
2 changed files with 27 additions and 0 deletions

View File

@@ -69,7 +69,28 @@ public class BaseIpCfg extends BaseCfg<BaseIpCfg> {
protected Integer appCode;//仅用于copy属性使用 protected Integer appCode;//仅用于copy属性使用
protected Integer behavCode;//仅用于copy属性使用 protected Integer behavCode;//仅用于copy属性使用
protected Integer specServiceId;//仅用于copy属性使用 protected Integer specServiceId;//仅用于copy属性使用
protected String antiddosProtocol;//仅用于copy属性使用
protected Long bpsThreadshold;//仅用于copy属性使用
protected Long ppsThreadshold;//仅用于copy属性使用
public String getAntiddosProtocol() {
return antiddosProtocol;
}
public void setAntiddosProtocol(String antiddosProtocol) {
this.antiddosProtocol = antiddosProtocol;
}
public Long getBpsThreadshold() {
return bpsThreadshold;
}
public void setBpsThreadshold(Long bpsThreadshold) {
this.bpsThreadshold = bpsThreadshold;
}
public Long getPpsThreadshold() {
return ppsThreadshold;
}
public void setPpsThreadshold(Long ppsThreadshold) {
this.ppsThreadshold = ppsThreadshold;
}
public Integer getAppCode() { public Integer getAppCode() {
return appCode; return appCode;
} }

View File

@@ -2089,6 +2089,12 @@ public abstract class BaseService {
maatCfg.setUserRegion(Constants.APP_ID_REGION + "=" + _cfg.getAppCode()+Constants.USER_REGION_SPLIT+Constants.APP_VIGNORE_USER_REGION_KEY+"=1"); maatCfg.setUserRegion(Constants.APP_ID_REGION + "=" + _cfg.getAppCode()+Constants.USER_REGION_SPLIT+Constants.APP_VIGNORE_USER_REGION_KEY+"=1");
}else if(regionDict.getFunctionId()==408) {// Behavior Identify }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"); maatCfg.setUserRegion(Constants.PROTO_ID_REGION + "=" + _cfg.getAppCode()+Constants.USER_REGION_SPLIT+Constants.APP_VIGNORE_USER_REGION_KEY+"=1");
}else if(regionDict.getFunctionId()==301) {// Anti DDOS
Map umap= new HashMap();
umap.put("protocol", _cfg.getAntiddosProtocol());
umap.put("bps_threadshold", _cfg.getBpsThreadshold());
umap.put("pps_threadshold", _cfg.getPpsThreadshold());
maatCfg.setUserRegion(new Gson().toJson(umap));
} }
configCompileList.add(maatCfg); configCompileList.add(maatCfg);