added domain name resolving before connection for wg/awg and xray protocols (#814)

added domain name resolving before connection
This commit is contained in:
Nethius 2024-09-17 01:14:13 +04:00 committed by GitHub
parent 76e5039578
commit 46cd740a84
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
12 changed files with 61 additions and 46 deletions

View file

@ -35,7 +35,7 @@ fun getLocalNetworks(context: Context, ipv6: Boolean): List<InetNetwork> {
return emptyList()
}
fun parseInetAddress(address: String): InetAddress = parseNumericAddressCompat(address)
fun parseInetAddress(address: String): InetAddress = InetAddress.getByName(address)
private val parseNumericAddressCompat: (String) -> InetAddress =
if (Build.VERSION.SDK_INT >= Build.VERSION_CODES.Q) {