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

[Bug] sing-box geoip-cn.srs数据库未被调用,导致国内网站被错误分流走代理 #609

Closed
3 tasks done
devioa opened this issue Apr 5, 2024 · 13 comments
Closed
3 tasks done

Comments

@devioa
Copy link

devioa commented Apr 5, 2024

Verify steps

  • 我已经在 Issue Tracker 中找过我要提出的问题 I have searched on the issue tracker for a related issue.
  • 我已经使用公测版本测试过,问题依旧存在 I have tested using the test mod, and the issue still exists.
  • 我已经仔细看过 常见问题 并无法自行解决问题

Description

这里只调用了geosite-cn.srs

ShellCrash/scripts/start.sh

Lines 604 to 618 in 82b51cd

#生成add_rule_set.json
[ -z "$(cat ${CRASHDIR}/jsons/*.json | grep -Ei '\"tag\" *: *\"geosite-cn\"')" ] && cat > ${TMPDIR}/jsons/add_rule_set.json <<EOF
{
"route": {
"rule_set": [
{
"tag": "geosite-cn",
"type": "local",
"format": "binary",
"path": "geosite-cn.srs"
}
]
}
}
EOF

结果就是 geosite-cn 中没有收录的网站会被错误分流到 final 最后走代理
image
image

@juewuy
Copy link
Owner

juewuy commented Apr 5, 2024

@devioa 这个只是分流DNS决定是否返回fakeip,不会影响具体规则分流

@devioa
Copy link
Author

devioa commented Apr 5, 2024

@devioa 这个只是分流DNS决定是否返回fakeip,不会影响具体规则分流

问题是这个网站是国内的,但却走了代理,我自己在 ruleset 调用 geoip-cn 后这个网站就再也没出现了
而且不止im.jinritemai.com这个域名下所有子域名都会被分流到代理,还有一个就是*.chnau99999.com中国黄金的域名也会被分到代理去,其他网站暂时不知道,目前我自己就遇到这两个

@devioa
Copy link
Author

devioa commented Apr 5, 2024

不信你自己用 sing-box 内核测一下访问中国黄金官网

@juewuy
Copy link
Owner

juewuy commented Apr 5, 2024

@devioa 这是分流规则问题而不是脚本DNS问题

@devioa
Copy link
Author

devioa commented Apr 5, 2024

geoip-cn.srs下载了后没有被调用是事实吧?而且我自己修改代码加上调用过后这问题就解决了

@devioa
Copy link
Author

devioa commented Apr 5, 2024

而且这本来就是分流规则问题,这不是 sing-box 的rule-set配置管的吗?我啥时候说这是 dns 问题了

@devioa
Copy link
Author

devioa commented Apr 5, 2024

我这张图想表达的意思是,这是一个 ip 在中国大陆的网站,但是
image
但是却在经过 sing-box 内核的时候,可能因为jinritemai.com不在geosite-cn.srs数据库中有记录,而且此时 singbox 内核也没有 geoip-cn 数据库去识别是否为国内 ip,所以在这张图里就可以看到它最后被分流到 final 里去了,然后通过 final 走代理绕国外去了
image

@ericsyj
Copy link
Contributor

ericsyj commented Apr 5, 2024

这是singbox官方内核的预期行为,在路由规则匹配阶段,singbox不会做任何域名解析,如果你需要可以用singboxp内核

@devioa
Copy link
Author

devioa commented Apr 5, 2024

这是singbox官方内核的预期行为,在路由规则匹配阶段,singbox不会做任何域名解析,如果你需要可以用singboxp内核

OK,如果是官方内核的预期行为,可以忽略我这上面的解释,那回到 issue 标题的问题,geoip-cn.srs下载后并未被调用,最终导致了国内网站被错误分流走代理的这个情况出现

@ericsyj
Copy link
Contributor

ericsyj commented Apr 5, 2024

这是singbox官方内核的预期行为,在路由规则匹配阶段,singbox不会做任何域名解析,如果你需要可以用singboxp内核

OK,如果是官方内核的预期行为,可以忽略我这上面的解释,那回到 issue 标题的问题,geoip-cn.srs下载后并未被调用

建议你先检查一下内核运行后/tmp/ShellCrash/jsons/中的配置文件是否有引用此数据库

@juewuy
Copy link
Owner

juewuy commented Apr 5, 2024

@ericsyj 我不是告诉你此数据库是用来分流DNS了吗?
至于规则问题请自行解决,没有完美的规则我只能这么说
你所说的一切都不是bug,不会再回复

@devioa
Copy link
Author

devioa commented Apr 5, 2024

这是singbox官方内核的预期行为,在路由规则匹配阶段,singbox不会做任何域名解析,如果你需要可以用singboxp内核

OK,如果是官方内核的预期行为,可以忽略我这上面的解释,那回到 issue 标题的问题,geoip-cn.srs下载后并未被调用

建议你先检查一下内核运行后/tmp/ShellCrash/jsons/中的配置文件是否有引用此数据库

并没有,我在 issue Description中都把相关代码引用出来了,建议你先看下

@devioa
Copy link
Author

devioa commented Apr 5, 2024

@ericsyj 我不是告诉你此数据库是用来分流DNS了吗? 至于规则问题请自行解决,没有完美的规则我只能这么说 你所说的一切都不是bug,不会再回复

OKOK行行行你觉得不是那就不是你说的都对我自己 fork 自己解决

@devioa devioa closed this as not planned Won't fix, can't repro, duplicate, stale Apr 5, 2024
Repository owner locked and limited conversation to collaborators Apr 5, 2024
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants