Handle IPv6 address correctly

This commit is contained in:
yuhan6665 committed 2024-01-01 22:16:07 -05:00
1 parent 4676717582
commit 73fad43573
3 files changed
+4 -7

No files matched your search

@@ -69,10 +69,6 @@ data class ServerConfig(
fun getV2rayPointDomainAndPort(): String {
val address = getProxyOutbound()?.getServerAddress().orEmpty()
val port = getProxyOutbound()?.getServerPort()
return if (Utils.isIpv6Address(address)) {
String.format("[%s]:%s", address, port)
} else {
String.format("%s:%s", address, port)
}
return Utils.getIpv6Address(address) + ":" + port
}
}