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,11 +243,12 @@ public class DpTechBypassAbilityImpl extends DpTechAbilityImpl {
* @return the traction strategy format * @return the traction strategy format
*/ */
private String getIpSegmentFormat(String ipSegment) { private String getIpSegmentFormat(String ipSegment) {
if (!ipSegment.contains("/") && !ipSegment.contains("-")) { for (String v : ConstValue.IP_SEGMENT_SPILT) {
return ipSegment + "-" + ipSegment; if (ipSegment.contains(v)) {
} else { return ipSegment;
return ipSegment; }
} }
return ipSegment + "-" + ipSegment;
} }
/** /**

View File

@ -85,10 +85,15 @@ public class ConstValue {
public static final String BUSINESS_TYPE = "^(GENERAL)|(WEB)|(DNS)|(GAME)$"; 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}$"; 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. * The type Protocol.
* *