2dust / v2rayN

A GUI client for Windows and Linux, support Xray core and others
https://1.2345345.xyz
GNU General Public License v3.0
70.71k stars 11.66k forks source link

[Bug]: Wrong/missing tags in routing rules prevent app from working entirely #6174

Closed eliotcougar closed 2 days ago

eliotcougar commented 3 days ago

预期情况

When there is a tag in routing rules that is missing in the geoip/geosite files, the program reports an error in the log, and stops working.

实际情况

The app should display an error in the log about wrong/missing tags, but keep working normally, ignoring the wrong/missing tags in the routing rules. In other words, this kind of error should be non-blocking, and fail gracefully.

复现方法

Just edit the routing rules so that they reference a missing tag.

In my case, I was using the custom Russian geosite/geoip regional setting, and I had some routing rules that referenced tags that only exist in that Russian version of geoip/geosite files. When the program was updated, it downloaded the default "Chinese" geoip/geosite files for some reason, and replaced them. After it restarted, the routing rules were referencing some missing tags. The program couldn't fix itself by downloading the correct "Russian" files it still had in the settings, because no traffic could flow due to error.

日志信息


额外信息

No response

我确认已更新至最新版本

我确认已查询历史issues

thttg commented 3 days ago

6147

eliotcougar commented 3 days ago

6147

Yes, I know how to set the source where it gets the geo files... The problem is that when you update v2rayN via the built-in updater, it unzips geoip and geosite files from the new version distribution archive, and overwrites the regional files that are present. Temporarily (until you manually redownload the regional files) the app in non-functional because the routing rules reference some tags that are not present in the default "Chinese" geoip/geosite files. And it can't fetch them automatically because the error blocks its own access to the internet until you either disable the proxy or switch to a routing rule set that works.

UPD: I don't understand why a single faulty rule in a rule set stops the program from routing any traffic and basically leaves the system unable to access any sites. Why can't it simply ignore the faulty rule and keep working, and just display a warning? You know, since it's very hard to figure out what geosite: rules even exist there, a user may try to enter something randomly (I know I did), expecting it to proxy traffic for their favorite online service, and only make the app non-functional as the result... Or what if a geosite.dat maintainer decides to remove or rename a tag? After an autoupdate, if the user has used that tag, their internet will suddenly stop working.

2dust commented 2 days ago

This is the core behavior, please go to core to submit an issue