Skip to content

Commit 4e3641d

Browse files
committed
Fix
1 parent 156fa9e commit 4e3641d

1 file changed

Lines changed: 7 additions & 3 deletions

File tree

V2rayNG/app/src/main/java/com/v2ray/ang/handler/V2rayConfigManager.kt

Lines changed: 7 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -827,13 +827,17 @@ object V2rayConfigManager {
827827

828828
for (item in proxyOutboundList) {
829829
val domain = item.getServerAddress()
830-
if (domain.isNullOrEmpty() || Utils.isPureIpAddress(domain)) continue
831-
item.ensureSockopt().domainStrategy = if (preferIpv6) "UseIPv6v4" else "UseIPv4v6"
832-
if (newHosts.containsKey(domain)) continue
830+
if (domain.isNullOrEmpty()) continue
831+
832+
if (newHosts.containsKey(domain)) {
833+
item.ensureSockopt().domainStrategy = if (preferIpv6) "UseIPv6v4" else "UseIPv4v6"
834+
continue
835+
}
833836

834837
val resolvedIps = HttpUtil.resolveHostToIP(domain, preferIpv6)
835838
if (resolvedIps.isNullOrEmpty()) continue
836839

840+
item.ensureSockopt().domainStrategy = if (preferIpv6) "UseIPv6v4" else "UseIPv4v6"
837841
newHosts[domain] = if (resolvedIps.size == 1) {
838842
resolvedIps[0]
839843
} else {

0 commit comments

Comments
 (0)