REM:
1. 更新迪普设备IP段处理
This commit is contained in:
HuangXin 2021-01-20 17:08:49 +08:00
parent b5803e0a61
commit 8a91587ae2
2 changed files with 11 additions and 5 deletions

View File

@ -243,12 +243,13 @@ public class DpTechBypassAbilityImpl extends DpTechAbilityImpl {
* @return the traction strategy format
*/
private String getIpSegmentFormat(String ipSegment) {
if (!ipSegment.contains("/") && !ipSegment.contains("-")) {
return ipSegment + "-" + ipSegment;
} else {
for (String v : ConstValue.IP_SEGMENT_SPILT) {
if (ipSegment.contains(v)) {
return ipSegment;
}
}
return ipSegment + "-" + ipSegment;
}
/**
* Create traction strategy error code.

View File

@ -85,10 +85,15 @@ public class ConstValue {
public static final String BUSINESS_TYPE = "^(GENERAL)|(WEB)|(DNS)|(GAME)$";
/**
* The constant NUM_TYPE.
* The constant NUMBER_TYPE.
*/
public static final String NUMBER_TYPE = "^[0-9]+([.]{1}[0-9]+){0,1}$";
/**
* The constant IP_SEGMENT_SPILT.
*/
public static final String[] IP_SEGMENT_SPILT = new String[] {"-", "/"};
/**
* The type Protocol.
*