DNS: Fix parse domain and geoip (#5499)

Fixes https://github.com/XTLS/Xray-core/pull/5488#issuecomment-3712856715
This commit is contained in:
Hossin Asaadi
2026-01-06 15:51:50 +03:30
committed by GitHub
parent c715154309
commit 961c352127
5 changed files with 117 additions and 22 deletions

View File

@@ -79,7 +79,7 @@ func (rr *RoutingRule) BuildCondition() (Condition, error) {
geoip := rr.Geoip
if runtime.GOOS != "windows" && runtime.GOOS != "wasm" {
var err error
geoip, err = getGeoIPList(rr.Geoip)
geoip, err = GetGeoIPList(rr.Geoip)
if err != nil {
return nil, errors.New("failed to build geoip from mmap").Base(err)
}
@@ -188,7 +188,7 @@ func (br *BalancingRule) Build(ohm outbound.Manager, dispatcher routing.Dispatch
}
}
func getGeoIPList(ips []*GeoIP) ([]*GeoIP, error) {
func GetGeoIPList(ips []*GeoIP) ([]*GeoIP, error) {
geoipList := []*GeoIP{}
for _, ip := range ips {
if ip.CountryCode != "" {