-
Notifications
You must be signed in to change notification settings - Fork 738
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
请问大佬能否适配sing-box的规则文件 #900
Comments
Thank you for opening your first issue in this repo. It’s people like you who make anti-AD better! |
有参考的列表格式吗? |
sing-box 的配置是 json 格式,要匹配 {
"version": 1,
"rules": [
{
"domain": [
"doubleclick.net"
]
},
{
"domain_suffix": [
".doubleclick.net"
]
}
]
} sing-box 1.9.0 之后这样: {
"version": 1,
"rules": [
{
"domain_suffix": [
"doubleclick.net"
]
}
]
} 支持编译为二进制减小体积 参考: 不过似乎不支持在一个规则里匹配部分域名同时排除另外部分域名(例如屏蔽 |
是可行的,使用逻辑规则即可,模板如下: {
"version": 1,
"rules": [
{
"type": "logical",
"mode": "and",
"rules": [
{
"domain": [],
"domain_suffix": []
},
{
"domain": [],
"domain_suffix": [],
"invert": true
}
]
}
]
} sing-box 1.9+ 仍然与旧版本写法兼容,使用旧版写法生成规则兼容性更佳。 另外由于 sing-box 的规则集引用机制,「引用的规则集可视为被合并,而不是作为一个单独的规则子项」,使用逻辑规则的规则集在与其他规则集合并使用的时候容易出现问题,需要在一条规则中单独使用。还请添加相关注释。 |
sing-box的1.9正式版出了,现在domain suffix规则和其他app可以保持一致 |
如果希望释出 json 还是建议以 1.9.0- 的格式为主,事实上 1.9.0- 的 source type |
sing-box 在 1.10.0-alpha.25 添加了 AdGuard 域名规则支持,可以将 sing-box rule-set convert --type adguard anti-ad-adguard.txt 可以直接用这个方法让 anti-ad 原地支持 sing-box。不过由 adguard list 编译出的 rule-set 设置了更高的版本号,低于 1.10.0-alpha.25 的 sing-box 用不了 参考: |
singbox有劫持dns请求服务,能否适配下singbox的规则吖。
The text was updated successfully, but these errors were encountered: