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