XrayR-project / XrayR

A Xray backend framework that can easily support many panels. 一个基于Xray的后端框架,支持V2ay,Trojan,Shadowsocks协议,极易扩展,支持多面板对接
https://xrayr-project.github.io/XrayR-doc/
Mozilla Public License 2.0
1.84k stars 773 forks source link

适配v2board1.7.2 路由规则的新版本 #197

Closed Elsa8u closed 1 year ago

Elsa8u commented 1 year ago

请问什么时候发布适配v2board1.7.2 路由规则的新稳定版本

Septrum101 commented 1 year ago

The latest version support block rules already.

Elsa8u commented 1 year ago

我使用一键安装脚本,v2board 设置了路由禁止访问列表,显示这个 docker latest版本也是。换成master后可以了。

image

Elsa8u commented 1 year ago

所以我在想,是不是新的版本还没发布

Elsa8u commented 1 year ago

The latest version support block rules already. 麻烦看一下,Thank you

cdnf commented 1 year ago

大神们,问题在哪?

XrayR 版本:XrayR 0.9.0 (A Xray backend that supports many panels)
v2board: 1.7.3 dev

之前用的好好的规则,现在突然发现加上审计就会全部reject,不管写什么规则都是全部reject

(.*\.||)(metatrader4|metatrader5|mql5)\.(org|com|net)

上面是用了好久的规则其中之一,用了就会所有访问都reject

……
@v2board.user|1055 access tcp:www.google.com:443 reject by rule

随便加了个测试路由,后端直接挂了

Mar 05 20:19:15 debian XrayR[19742]: panic: regexp: Compile(`*.google.com`): error parsing regexp: missing argument to repetition operator: `*`
Mar 05 20:19:15 debian XrayR[19742]: goroutine 1 [running]:
Mar 05 20:19:15 debian XrayR[19742]: regexp.MustCompile({0xc000482b60, 0xc})
Mar 05 20:19:15 debian XrayR[19742]:         regexp/regexp.go:319 +0xbb
Mar 05 20:19:15 debian XrayR[19742]: github.com/XrayR-project/XrayR/api/newV2board.(*APIClient).GetNodeRule(0xc000a70ab0)
Mar 05 20:19:15 debian XrayR[19742]:         github.com/XrayR-project/XrayR/api/newV2board/v2board.go:271 +0x145
Mar 05 20:19:15 debian XrayR[19742]: github.com/XrayR-project/XrayR/service/controller.(*Controller).Start(0xc00097cd00)
Mar 05 20:19:15 debian XrayR[19742]:         github.com/XrayR-project/XrayR/service/controller/controller.go:108 +0x39d
Mar 05 20:19:15 debian XrayR[19742]: github.com/XrayR-project/XrayR/panel.(*Panel).Start(0xc0008a4180)
Mar 05 20:19:15 debian XrayR[19742]:         github.com/XrayR-project/XrayR/panel/panel.go:209 +0x556
Mar 05 20:19:15 debian XrayR[19742]: main.main()
Mar 05 20:19:15 debian XrayR[19742]:         github.com/XrayR-project/XrayR/main/main.go:97 +0x250
Mar 05 20:19:15 debian systemd[1]: XrayR.service: Main process exited, code=exited, status=2/INVALIDARGUMENT
Mar 05 20:19:15 debian systemd[1]: XrayR.service: Failed with result 'exit-code'.
cdnf commented 1 year ago

大神们,问题在哪?

XrayR 版本:XrayR 0.9.0 (A Xray backend that supports many panels)
v2board: 1.7.3 dev

之前用的好好的规则,现在突然发现加上审计就会全部reject,不管写什么规则都是全部reject

(.*\.||)(metatrader4|metatrader5|mql5)\.(org|com|net)

上面是用了好久的规则其中之一,用了就会所有访问都reject

……
@v2board.user|1055 access tcp:www.google.com:443 reject by rule

随便加了个测试路由,后端直接挂了

Mar 05 20:19:15 debian XrayR[19742]: panic: regexp: Compile(`*.google.com`): error parsing regexp: missing argument to repetition operator: `*`
Mar 05 20:19:15 debian XrayR[19742]: goroutine 1 [running]:
Mar 05 20:19:15 debian XrayR[19742]: regexp.MustCompile({0xc000482b60, 0xc})
Mar 05 20:19:15 debian XrayR[19742]:         regexp/regexp.go:319 +0xbb
Mar 05 20:19:15 debian XrayR[19742]: github.com/XrayR-project/XrayR/api/newV2board.(*APIClient).GetNodeRule(0xc000a70ab0)
Mar 05 20:19:15 debian XrayR[19742]:         github.com/XrayR-project/XrayR/api/newV2board/v2board.go:271 +0x145
Mar 05 20:19:15 debian XrayR[19742]: github.com/XrayR-project/XrayR/service/controller.(*Controller).Start(0xc00097cd00)
Mar 05 20:19:15 debian XrayR[19742]:         github.com/XrayR-project/XrayR/service/controller/controller.go:108 +0x39d
Mar 05 20:19:15 debian XrayR[19742]: github.com/XrayR-project/XrayR/panel.(*Panel).Start(0xc0008a4180)
Mar 05 20:19:15 debian XrayR[19742]:         github.com/XrayR-project/XrayR/panel/panel.go:209 +0x556
Mar 05 20:19:15 debian XrayR[19742]: main.main()
Mar 05 20:19:15 debian XrayR[19742]:         github.com/XrayR-project/XrayR/main/main.go:97 +0x250
Mar 05 20:19:15 debian systemd[1]: XrayR.service: Main process exited, code=exited, status=2/INVALIDARGUMENT
Mar 05 20:19:15 debian systemd[1]: XrayR.service: Failed with result 'exit-code'.

退到 v0.8.8版本貌似审计没问题了,虽然用 *.google.com 规则也会异常退出

cdnf commented 1 year ago

退到 v0.8.8版本貌似审计没问题了,虽然用 *.google.com 规则也会异常退出

尴尬,这个版本审计规则加与不加一个样

cdnf commented 1 year ago

编辑保存了下已存在的路由规则,用到该规则的后端全挂,求最新正确的审计规则写法

Septrum101 commented 1 year ago

It should be same as rulelist.

haodong-shen commented 1 year ago

v2board更新到1.7.4后突然出现了这个问题,把节点删除后重新添加一个没有任何审计规则的节点信息即可恢复,目前不知道是v2board的问题还是后端的问题,反正解决方法如上。