MatsuriDayo / nekoray

Qt based cross-platform GUI proxy configuration manager (backend: sing-box)
https://matsuridayo.github.io/
GNU General Public License v3.0
13.52k stars 1.26k forks source link

BUG: failed to load geosite: RU #1440

Open glow12121 opened 2 months ago

glow12121 commented 2 months ago

Describe the problem

Expected behavior:

No routing for the websites in .ru zone.

I use Outline on my virtual server and Nekoray on my Linux computer.

Actual behavior:

Error: infra/conf/serial: failed to parse json config > infra/conf: invalid field rule > infra/conf: failed to parse domain rule: geosite:ru > infra/conf: failed to load geosite: RU > infra/conf: list not found in geosite.dat: RU

How to reproduce

image

nuckle commented 2 months ago

Looks like geosite doesn't have this rule (ru)

Also there's a related pull request: https://github.com/MatsuriDayo/NekoBoxForAndroid/pull/546

Hi! Firstly, this fields are in deprecated state: link Secondly, these databases do not contain lists of russian sites, so it's pointless to use them. Thirdly, it's much better to use domain:ru as described on nb4a site and accordingly with your commit. Thus we blocking all *.ru domains with no exceptions.

glow12121 commented 2 months ago

Thanks!

Is there a workaround?

nuckle commented 2 months ago

Thanks!

Is there a workaround?

I guess you can enter domain:ru in Direct Domain window, or you can try to use geosite:category-ru

glow12121 commented 2 months ago

It is strange - with these settings, some websites in .ru zone works. others do not.

For example, there is this log related to gosuslugi.ru.

2024/10/01 10:40:57 LookupIP error: gosuslugi.ru lookup gosuslugi.ru on 127.0.0.53:53: read udp 127.0.0.1:49686->127.0.0.53:53: i/o timeout
2024/10/01 10:40:57 LookupIP error: gosuslugi.ru lookup gosuslugi.ru on 127.0.0.53:53: read udp 127.0.0.1:49686->127.0.0.53:53: i/o timeout
2024/10/01 10:40:57 LookupIP error: gosuslugi.ru lookup gosuslugi.ru on 127.0.0.53:53: read udp 127.0.0.1:49686->127.0.0.53:53: i/o timeout
2024/10/01 10:40:57 LookupIP error: gosuslugi.ru lookup gosuslugi.ru on 127.0.0.53:53: read udp 127.0.0.1:49686->127.0.0.53:53: i/o timeout

image

glow12121 commented 2 months ago

Adding geosite:category-ru to the direct domains category leads to this error:

infra/conf/serial: failed to parse json config > infra/conf: invalid field rule > infra/conf: failed to parse domain rule: geosite:category-ru > infra/conf: failed to load geosite: CATEGORY-RU > infra/conf: list not found in geosite.dat: CATEGORY-RU

nuckle commented 2 months ago

Adding geosite:category-ru to the direct domains category leads to this error:

infra/conf/serial: failed to parse json config > infra/conf: invalid field rule > infra/conf: failed to parse domain rule: geosite:category-ru > infra/conf: failed to load geosite: CATEGORY-RU > infra/conf: list not found in geosite.dat: CATEGORY-RU

Make sure your geosite.dat and geosite.db files are up to date

geosite.dat geosite.db

glow12121 commented 2 months ago

I copied the two files to /usr/lib64/nekoray/ as root, killed and relaunched Nekoray.

But some websites still don't work. Here is a fragment of Nekoray's log at start in Tun mode:

[Warning] The default Direct DNS may not works with systemd-resolved, you may consider change your DNS settings.
2024/10/01 12:42:23 udp:127.0.0.1:48682 accepted udp:8.8.8.8:53 [socks-in -> dns-out]
2024/10/01 12:42:24 DNS accepted https://8.8.8.8/dns-query [dns -> proxy]
2024/10/01 12:42:24 DNS accepted https://8.8.8.8/dns-query [dns -> proxy]
2024/10/01 12:42:24 cmsgProtect: broken pipe
2024/10/01 12:42:24 tcp:127.0.0.1:42904 accepted tcp:18.159.254.57:80 [socks-in -> proxy]
2024/10/01 12:42:24 tcp:127.0.0.1:42898 accepted tcp:18.159.254.57:80 [socks-in -> proxy]
2024/10/01 12:42:24 tcp:127.0.0.1:42908 accepted tcp:18.159.254.57:80 [socks-in -> proxy]
2024/10/01 12:42:24 tcp:127.0.0.1:42922 accepted tcp:18.159.254.57:80 [socks-in -> proxy]
2024/10/01 12:42:24 tcp:127.0.0.1:42932 accepted tcp:18.159.254.57:80 [socks-in -> proxy]
2024/10/01 12:42:24 tcp:127.0.0.1:42942 accepted tcp:142.250.102.188:5228 [socks-in -> proxy]
2024/10/01 12:42:25 tcp:127.0.0.1:42958 accepted tcp:172.217.23.202:443 [socks-in -> proxy]
2024/10/01 12:42:28 tcp:127.0.0.1:42966 accepted tcp:140.82.121.5:443 [socks-in -> proxy]
2024/10/01 12:42:28 cmsgProtect: broken pipe
2024/10/01 12:42:28 tcp:127.0.0.1:42970 accepted tcp:140.82.112.22:443 [socks-in -> proxy]
2024/10/01 12:42:28 cmsgProtect: broken pipe
2024/10/01 12:42:29 tcp:127.0.0.1:42980 accepted tcp:52.142.124.215:443 [socks-in -> proxy]
2024/10/01 12:42:30 tcp:127.0.0.1:42990 accepted tcp:66.203.125.15:443 [socks-in -> proxy]
2024/10/01 12:42:30 cmsgProtect: broken pipe
2024/10/01 12:42:33 udp:127.0.0.1:37739 accepted udp:8.8.8.8:53 [socks-in -> dns-out]
2024/10/01 12:42:33 udp:127.0.0.1:34830 accepted udp:8.8.8.8:53 [socks-in -> dns-out]
2024/10/01 12:42:33 udp:127.0.0.1:34851 accepted udp:8.8.8.8:53 [socks-in -> dns-out]
2024/10/01 12:42:33 udp:127.0.0.1:39482 accepted udp:8.8.8.8:53 [socks-in -> dns-out]
2024/10/01 12:42:33 LookupIP error: queuev4.vk.com lookup queuev4.vk.com on 127.0.0.53:53: read udp 127.0.0.1:57239->127.0.0.53:53: i/o timeout
2024/10/01 12:42:33 LookupIP error: queuev4.vk.com lookup queuev4.vk.com on 127.0.0.53:53: read udp 127.0.0.1:57239->127.0.0.53:53: i/o timeout
2024/10/01 12:42:33 LookupIP error: queuev4.vk.com lookup queuev4.vk.com on 127.0.0.53:53: read udp 127.0.0.1:57239->127.0.0.53:53: i/o timeout
2024/10/01 12:42:33 LookupIP error: queuev4.vk.com lookup queuev4.vk.com on 127.0.0.53:53: read udp 127.0.0.1:57239->127.0.0.53:53: i/o timeout
2024/10/01 12:42:33 LookupIP error: queuev4.vk.com lookup queuev4.vk.com on 127.0.0.53:53: read udp 127.0.0.1:57239->127.0.0.53:53: i/o timeout
2024/10/01 12:42:33 LookupIP error: queuev4.vk.com lookup queuev4.vk.com on 127.0.0.53:53: read udp 127.0.0.1:57239->127.0.0.53:53: i/o timeout
2024/10/01 12:42:33 LookupIP error: queuev4.vk.com lookup queuev4.vk.com on 127.0.0.53:53: read udp 127.0.0.1:57239->127.0.0.53:53: i/o timeout
2024/10/01 12:42:33 LookupIP error: queuev4.vk.com lookup queuev4.vk.com on 127.0.0.53:53: read udp 127.0.0.1:57239->127.0.0.53:53: i/o timeout
2024/10/01 12:42:33 LookupIP error: queuev4.vk.com lookup queuev4.vk.com on 127.0.0.53:53: read udp 127.0.0.1:57239->127.0.0.53:53: i/o timeout
2024/10/01 12:42:33 LookupIP error: queuev4.vk.com lookup queuev4.vk.com on 127.0.0.53:53: read udp 127.0.0.1:57239->127.0.0.53:53: i/o timeout
2024/10/01 12:42:33 LookupIP error: queuev4.vk.com lookup queuev4.vk.com on 127.0.0.53:53: read udp 127.0.0.1:57239->127.0.0.53:53: i/o timeout
2024/10/01 12:42:33 LookupIP error: queuev4.vk.com lookup queuev4.vk.com on 127.0.0.53:53: read udp 127.0.0.1:57239->127.0.0.53:53: i/o timeout
2024/10/01 12:42:33 LookupIP error: queuev4.vk.com lookup queuev4.vk.com on 127.0.0.53:53: read udp 127.0.0.1:57239->127.0.0.53:53: i/o timeout
2024/10/01 12:42:33 LookupIP error: queuev4.vk.com lookup queuev4.vk.com on 127.0.0.53:53: read udp 127.0.0.1:57239->127.0.0.53:53: i/o timeout
2024/10/01 12:42:33 LookupIP error: queuev4.vk.com lookup queuev4.vk.com on 127.0.0.53:53: read udp 127.0.0.1:57239->127.0.0.53:53: i/o timeout
2024/10/01 12:42:33 tcp:127.0.0.1:49546 accepted tcp:142.251.36.42:443 [socks-in -> proxy]
2024/10/01 12:42:33 udp:127.0.0.1:43776 accepted udp:194.190.168.1:123 [socks-in -> proxy]
2024/10/01 12:42:33 tcp:127.0.0.1:49556 accepted tcp:142.251.36.42:443 [socks-in -> proxy]
2024/10/01 12:42:38 LookupIP error: ya.ru lookup ya.ru on 127.0.0.53:53: read udp 127.0.0.1:40287->127.0.0.53:53: i/o timeout
2024/10/01 12:42:38 LookupIP error: ya.ru lookup ya.ru on 127.0.0.53:53: read udp 127.0.0.1:40287->127.0.0.53:53: i/o timeout
2024/10/01 12:42:38 LookupIP error: ya.ru lookup ya.ru on 127.0.0.53:53: read udp 127.0.0.1:40287->127.0.0.53:53: i/o timeout
2024/10/01 12:42:38 LookupIP error: ya.ru lookup ya.ru on 127.0.0.53:53: read udp 127.0.0.1:40287->127.0.0.53:53: i/o timeout
2024/10/01 12:42:38 LookupIP error: ya.ru lookup ya.ru on 127.0.0.53:53: read udp 127.0.0.1:40287->127.0.0.53:53: i/o timeout
2024/10/01 12:42:38 LookupIP error: ya.ru lookup ya.ru on 127.0.0.53:53: read udp 127.0.0.1:40287->127.0.0.53:53: i/o timeout
2024/10/01 12:42:38 LookupIP error: ya.ru lookup ya.ru on 127.0.0.53:53: read udp 127.0.0.1:40287->127.0.0.53:53: i/o timeout

Current routing settings:

image

nuckle commented 2 months ago

Does it work without TUN?

Akiyamov commented 1 month ago

Try using these db and include them as geoip:antizapret geosite:antizapret in proxied websites and default outbound: bypass

Rattge commented 1 month ago

I recommend edit "Custom Route (global) Json" in Routes settings image

It should resolve your problem