mirror of
https://github.com/passepartoutvpn/wireguard-apple.git
synced 2025-02-16 21:02:02 +00:00
Model: Endpoint.hasHostAsIPAddress()
Signed-off-by: Roopesh Chander <roop@roopc.net>
This commit is contained in:
parent
e992030569
commit
aa0b6e0c60
@ -75,3 +75,16 @@ extension Endpoint: Codable {
|
||||
case invalidData
|
||||
}
|
||||
}
|
||||
|
||||
extension Endpoint {
|
||||
func hasHostAsIPAddress() -> Bool {
|
||||
switch (host) {
|
||||
case .name(_, _):
|
||||
return false
|
||||
case .ipv4(_):
|
||||
return true
|
||||
case .ipv6(_):
|
||||
return true
|
||||
}
|
||||
}
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user