Fix dumb regression on endpoint address

Was only parsing IPv4/6 addresses, not generic hostnames.
This commit is contained in:
Davide De Rosa 2022-10-26 19:02:09 +02:00
parent 7659057888
commit 7b6aca479b
1 changed files with 1 additions and 1 deletions

View File

@ -30,7 +30,7 @@ import __TunnelKitUtils
public struct Endpoint: RawRepresentable, Codable, Equatable, CustomStringConvertible { public struct Endpoint: RawRepresentable, Codable, Equatable, CustomStringConvertible {
// XXX: simplistic match // XXX: simplistic match
private static let rx = NSRegularExpression("^([0-9A-Fa-f\\.:]+):(UDP[46]?|TCP[46]?):(\\d+)$") private static let rx = NSRegularExpression("^([^\\s]+):(UDP[46]?|TCP[46]?):(\\d+)$")
public let address: String public let address: String