Fix domain name resolution for XRay

This commit is contained in:
albexk 2024-09-19 13:31:59 +03:00
parent 87cb5f620a
commit 138e6f70a4
3 changed files with 13 additions and 4 deletions

View file

@ -60,7 +60,7 @@ private val parseNumericAddressCompat: (String) -> InetAddress =
internal fun convertIpv6ToCanonicalForm(ipv6: String): String = ipv6
.replace("((?:(?:^|:)0+\\b){2,}):?(?!\\S*\\b\\1:0+\\b)(\\S*)".toRegex(), "::$2")
internal val InetAddress.ip: String
val InetAddress.ip: String
get() = if (this is Inet4Address) {
hostAddress!!
} else {