Skip to content

Commit 236a85c

Browse files
Merge pull request #34 from codewithtamim/master
Fix Regex for CIDR
2 parents 7341440 + fb31055 commit 236a85c

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

wireguard/src/main/java/org/thebytearray/wireguard/model/TunnelConfig.kt

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -25,7 +25,7 @@ data class TunnelConfig(
2525

2626
companion object {
2727
private val IP_PATTERN = Pattern.compile(
28-
"^(([0-9]|[1-9][0-9]|1[0-9]{2}|2[0-4][0-9]|25[0-5])\\.){3}([0-9]|[1-9][0-9]|1[0-9]{2}|2[0-4][0-9]|25[0-5])$"
28+
"^(([0-9]|[1-9][0-9]|1[0-9]{2}|2[0-4][0-9]|25[0-5])\\.){3}([0-9]|[1-9][0-9]|1[0-9]{2}|2[0-4][0-9]|25[0-5])(/([0-9]|[1-2][0-9]|3[0-2]))?$"
2929
)
3030
private val WG_KEY_PATTERN = Pattern.compile("^[A-Za-z0-9+/]{43}=$")
3131
private val ENDPOINT_PATTERN = Pattern.compile(

0 commit comments

Comments
 (0)