File tree Expand file tree Collapse file tree
V2rayNG/app/src/main/java/com/v2ray/ang/handler Expand file tree Collapse file tree Original file line number Diff line number Diff 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 {
You can’t perform that action at this time.
0 commit comments