Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

修改 fake_ip_filter.list 适配方式,尽量使用 domaindomain_suffix #619

Merged
merged 1 commit into from
Apr 13, 2024
Merged

Conversation

DustinWin
Copy link
Contributor

fake_ip_filter.list 仅中间区域带有 * 的域名使用 domain_regex 规则类型

fake_ip_filter.list 仅中间区域带有 `*` 的域名使用 `domain_regex` 规则类型
@juewuy juewuy merged commit 9a3b9e3 into juewuy:dev Apr 13, 2024
@juewuy
Copy link
Owner

juewuy commented Apr 13, 2024

panic: runtime error: index out of range [5] with length 5 goroutine 1 [running]: github.com/sagernet/sing/common/domain.newSuccinctSet({0xc0000a9008, 0x8a, 0xc0003ce4e0?}) github.com/sagernet/sing@v0.4.0-beta.6/common/domain/set.go:31 +0x5c5 github.com/sagernet/sing/common/domain.NewMatcher({0x0, 0x0, 0x8f?}, {0xc00016a408, 0x5c, 0xc00059dd58?}) github.com/sagernet/sing@v0.4.0-beta.6/common/domain/matcher.go:39 +0x50d github.com/sagernet/sing-box/route.NewDomainItem({0x0, 0x0, 0x0}, {0xc00016a408, 0x5c, 0x8f}) github.com/sagernet/sing-box/route/rule_item_domain.go:41 +0x299 github.com/sagernet/sing-box/route.NewDefaultDNSRule({_, }, {, }, {{0x0, 0x0, 0x0}, 0x0, {0x0, 0x0, ...}, ...}, ...) github.com/sagernet/sing-box/route/rule_dns.go:141 +0x101a github.com/sagernet/sing-box/route.NewDNSRule({, }, {, }, {{0x140f456, 0x7}, {0x0, 0x0, 0x0}, {{0x0, ...}, ...}, ...}, ...) github.com/sagernet/sing-box/route/rule_dns.go:64 +0x265 github.com/sagernet/sing-box/route.NewRouter({, }, {, _}, {0x0, 0x0, {0xc0002e2008, 0x15, 0x23}, {0xc00019e000, ...}, ...}, ...) github.com/sagernet/sing-box/route/router.go:195 +0x102d github.com/sagernet/sing-box.New({{{0xc000560000, 0x18538, 0x1a000}, {0x0, 0x0}, 0xc0001e9980, 0xc00019e0e0, 0x0, {0xc0002a6008, 0x4, ...}, ...}, ...}) github.com/sagernet/sing-box/box.go:90 +0x5d4 main.check() github.com/sagernet/sing-box/cmd/sing-box/cmd_check.go:34 +0x198 main.init.func19(0xc0001a1b00?, {0xc0000b8ac0?, 0x4?, 0x140dad7?}) github.com/sagernet/sing-box/cmd/sing-box/cmd_check.go:16 +0x17 github.com/spf13/cobra.(*Command).execute(0x1fbd540, {0xc0000b8a40, 0x4, 0x4}) github.com/spf13/cobra@v1.8.0/command.go:987 +0xab1 github.com/spf13/cobra.(*Command).ExecuteC(0x1fbe960) github.com/spf13/cobra@v1.8.0/command.go:1115 +0x3ff github.com/spf13/cobra.(*Command).Execute(...) github.com/spf13/cobra@v1.8.0/command.go:1039 main.main() github.com/sagernet/sing-box/cmd/sing-box/main.go:38 +0x1e
直接炸了是啥情况

@DustinWin
Copy link
Contributor Author

DustinWin commented Apr 13, 2024

panic: runtime error: index out of range [5] with length 5 goroutine 1 [running]: github.com/sagernet/sing/common/domain.newSuccinctSet({0xc0000a9008, 0x8a, 0xc0003ce4e0?}) github.com/sagernet/sing@v0.4.0-beta.6/common/domain/set.go:31 +0x5c5 github.com/sagernet/sing/common/domain.NewMatcher({0x0, 0x0, 0x8f?}, {0xc00016a408, 0x5c, 0xc00059dd58?}) github.com/sagernet/sing@v0.4.0-beta.6/common/domain/matcher.go:39 +0x50d github.com/sagernet/sing-box/route.NewDomainItem({0x0, 0x0, 0x0}, {0xc00016a408, 0x5c, 0x8f}) github.com/sagernet/sing-box/route/rule_item_domain.go:41 +0x299 github.com/sagernet/sing-box/route.NewDefaultDNSRule({_, }, {, }, {{0x0, 0x0, 0x0}, 0x0, {0x0, 0x0, ...}, ...}, ...) github.com/sagernet/sing-box/route/rule_dns.go:141 +0x101a github.com/sagernet/sing-box/route.NewDNSRule({, }, {, }, {{0x140f456, 0x7}, {0x0, 0x0, 0x0}, {{0x0, ...}, ...}, ...}, ...) github.com/sagernet/sing-box/route/rule_dns.go:64 +0x265 github.com/sagernet/sing-box/route.NewRouter({, }, {, _}, {0x0, 0x0, {0xc0002e2008, 0x15, 0x23}, {0xc00019e000, ...}, ...}, ...) github.com/sagernet/sing-box/route/router.go:195 +0x102d github.com/sagernet/sing-box.New({{{0xc000560000, 0x18538, 0x1a000}, {0x0, 0x0}, 0xc0001e9980, 0xc00019e0e0, 0x0, {0xc0002a6008, 0x4, ...}, ...}, ...}) github.com/sagernet/sing-box/box.go:90 +0x5d4 main.check() github.com/sagernet/sing-box/cmd/sing-box/cmd_check.go:34 +0x198 main.init.func19(0xc0001a1b00?, {0xc0000b8ac0?, 0x4?, 0x140dad7?}) github.com/sagernet/sing-box/cmd/sing-box/cmd_check.go:16 +0x17 github.com/spf13/cobra.(*Command).execute(0x1fbd540, {0xc0000b8a40, 0x4, 0x4}) github.com/spf13/cobra@v1.8.0/command.go:987 +0xab1 github.com/spf13/cobra.(*Command).ExecuteC(0x1fbe960) github.com/spf13/cobra@v1.8.0/command.go:1115 +0x3ff github.com/spf13/cobra.(*Command).Execute(...) github.com/spf13/cobra@v1.8.0/command.go:1039 main.main() github.com/sagernet/sing-box/cmd/sing-box/main.go:38 +0x1e 直接炸了是啥情况

格式没问题呀,我这边测试了的,特别是 domain_suffix 做了 v1.9.0 以下版本的适配。awk 命令执行错误了?
我再改改看。

@juewuy
Copy link
Owner

juewuy commented Apr 13, 2024

domain_suffix 有问题,另外两个都没事儿,1.8和1.9我都试了

@DustinWin
Copy link
Contributor Author

domain_suffix 有问题,另外两个都没事儿,1.8和1.9我都试了

嗯,就是这个,我来改改。

@juewuy
Copy link
Owner

juewuy commented Apr 13, 2024

把带.的去掉应该就可以了 {print "."$0}

juewuy added a commit that referenced this pull request Apr 13, 2024
@DustinWin
Copy link
Contributor Author

把带.的去掉应该就可以了 {print "."$0}

我又推了,应该可以了。

@juewuy
Copy link
Owner

juewuy commented Apr 13, 2024

@DustinWin 打好包了,明天再测一下

@DustinWin
Copy link
Contributor Author

@DustinWin 打好包了,明天再测一下

仅删除 {print "."$0} 会有遗漏,我重新推了一下,麻烦你看看。

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants