PROXY+IP Spoofing+IP payload增加配置热修改和配置新增直接生效功能
This commit is contained in:
@@ -104,6 +104,11 @@ public class InterceptCfgService extends CrudService<WebsiteCfgDao,CfgIndexInfo>
|
||||
entity.setInterceptPktBinList(null);
|
||||
}
|
||||
|
||||
int isValid=0;
|
||||
if(!StringUtil.isEmpty(entity.getIsValid()) && entity.getIsValid()==1) {
|
||||
isValid=1;
|
||||
}
|
||||
|
||||
entity.setIsValid(0);
|
||||
entity.setIsAudit(0);
|
||||
|
||||
@@ -196,7 +201,11 @@ public class InterceptCfgService extends CrudService<WebsiteCfgDao,CfgIndexInfo>
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
if(isValid==1) {
|
||||
entity.setIsAudit(1);
|
||||
entity.setIsValid(1);
|
||||
auditInterceptIpCfg(entity, isValid,Constants.INSERT_ACTION);
|
||||
}
|
||||
}else{
|
||||
if(entity.getServiceId().equals(518)){//ip仿冒策略
|
||||
//保存IP仿冒池
|
||||
@@ -266,6 +275,12 @@ public class InterceptCfgService extends CrudService<WebsiteCfgDao,CfgIndexInfo>
|
||||
areaIpCfgDao.saveAreaIpCfg(cfg);
|
||||
}
|
||||
}
|
||||
|
||||
if(isValid==1) {
|
||||
entity.setIsAudit(1);
|
||||
entity.setIsValid(1);
|
||||
auditInterceptIpCfg(entity, isValid,Constants.UPDATE_ACTION);
|
||||
}
|
||||
}
|
||||
}
|
||||
/**
|
||||
@@ -338,9 +353,12 @@ public class InterceptCfgService extends CrudService<WebsiteCfgDao,CfgIndexInfo>
|
||||
* @param isAudit
|
||||
* @throws MaatConvertException
|
||||
*/
|
||||
public void auditInterceptIpCfg(CfgIndexInfo entity,Integer isAudit) throws MaatConvertException{
|
||||
public void auditInterceptIpCfg(CfgIndexInfo entity,Integer isAudit,Integer opAction) throws MaatConvertException{
|
||||
//修改数据库审核状态信息
|
||||
entity.setTableName(CfgIndexInfo.getTablename());
|
||||
entity.setIsAudit(isAudit);
|
||||
entity.setAuditorId(UserUtils.getUser().getId());
|
||||
entity.setAuditTime(new Date());
|
||||
websiteCfgDao.auditCfg(entity);
|
||||
|
||||
ToMaatBean maatBean = new ToMaatBean();
|
||||
@@ -552,7 +570,7 @@ public class InterceptCfgService extends CrudService<WebsiteCfgDao,CfgIndexInfo>
|
||||
maatBean.setAuditTime(entity.getAuditTime());
|
||||
maatBean.setCreatorName(entity.getCurrentUser().getName());
|
||||
maatBean.setVersion(Constants.MAAT_VERSION);
|
||||
maatBean.setOpAction(Constants.INSERT_ACTION);
|
||||
maatBean.setOpAction(opAction);
|
||||
//调用服务接口下发配置数据
|
||||
String json=gsonToJson(maatBean);
|
||||
logger.info("intercept IP/DNS 配置下发配置参数:"+json);
|
||||
|
||||
Reference in New Issue
Block a user