DNS: Fix parse domain and geoip (#5499)
Fixes https://github.com/XTLS/Xray-core/pull/5488#issuecomment-3712856715
This commit is contained in:
1 parent
c715154309
commit
961c352127
5 files changed
+117
-22
No files matched your search
@@ -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 != "" {
|
||||
|
||||
Reference in new issue
Block a user