yichya / openwrt-xray-geodata-cut

Run xray-geodata-cut when compiling OpenWrt
0 stars 0 forks source link

panic: Calling IP() on a DomainAddress #1

Open varathongue opened 1 year ago

varathongue commented 1 year ago

I'm trying to use this tool to trim the GeoDB for other countries, I followed the code usage according to

https://github.com/yichya/openwrt-xray-geodata-cut/blob/af0e35e16315a3fb7347b98c9384b120c26b31d6/Makefile#L98

which leads to this error:

ubuntu22@Laptop:~/geocut/xray-geodata-cut$ ./xray-geodata-cut -in geoip_in.dat -type geoip -keep "cn,private" -out geoip.dat
panic: Calling IP() on a DomainAddress.

goroutine 1 [running]:
github.com/xtls/xray-core/common/net.domainAddress.IP(...)
    /home/ubuntu22/go/pkg/mod/github.com/xtls/xray-core@v1.5.7/common/net/address.go:164
github.com/yichya/xray-geodata-cut/geoip.Search(0xc000078000, {0x0, 0x3})
    /home/ubuntu22/geocut/xray-geodata-cut/geoip/search.go:18 +0x117
main.main()
    /home/ubuntu22/geocut/xray-geodata-cut/main.go:35 +0x271

However I can successfully cut the GeoSite using the following : https://github.com/yichya/openwrt-xray-geodata-cut/blob/af0e35e16315a3fb7347b98c9384b120c26b31d6/Makefile#L104

ubuntu22@Laptop:~/geocut/xray-geodata-cut$ ./xray-geodata-cut -type geosite -in geosite_in.dat -keep "cn,geolocation-\!cn,category-ads" -out geosite.dat
yichya commented 1 year ago

Please provide your geoip_in.dat for further analysis of the problem.

varathongue commented 1 year ago

https://github.com/v2fly/geoip/releases/download/202212220043/geoip.dat