mirror of
https://github.com/passepartoutvpn/wireguard-apple.git
synced 2025-02-18 13:52:07 +00:00
Model: Endpoint.hostname()
This commit is contained in:
parent
e83af4bce5
commit
8f35d70482
@ -87,4 +87,15 @@ extension Endpoint {
|
|||||||
return true
|
return true
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
func hostname() -> String? {
|
||||||
|
switch (host) {
|
||||||
|
case .name(let hostname, _):
|
||||||
|
return hostname
|
||||||
|
case .ipv4(_):
|
||||||
|
return nil
|
||||||
|
case .ipv6(_):
|
||||||
|
return nil
|
||||||
|
}
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user