sing-box Android的分应用代理功能与广告拦截功能有冲突
Nobody has claimed this yet.
- Dominant language
- Go
- Stars
- 38.1k
- Forks
- 4.6k
- Avg merge
- 19d 15h
- Merged PRs (30d)
- 1
Description
Operating system
Android
System version
Android 16
Installation type
sing-box for Android Graphical Client
If you are using a graphical client, please provide the version of the client.
1.13.0-rc.3
Version
Description
开启分应用代理功能后,国内应用里面有很多的广告、埋点请求,这些请求没有经过sing-box核心,导致广告、埋点都放行了。
Reproduction
sing-box Android有2个版本,google play版本不支持分应用代理功能。
F-Droid版本支持分应用代理功能。
这个分应用代理功能,与广告拦截功能有冲突。
我脑海里的sing-box核心有两个功能,1. dns服务器 2. 路由分发
现在的问题就是,如果我开启分应用代理功能,然后选中所有的中国应用(选中应用不经过VPN)
结果就是:国内应用打开速度很快,因为它们没有经过sing-box核心。
问题点:国内应用里面有很多的广告、埋点请求,我实际上是希望它们能到sing-box核心的。但是只要到核心,分应用代理的功能便失去了意义。
所以我现在安装的google play版本,所有应用全部经过sing-box核心。
有没有办法,既能使用分应用代理功能,又能让选中的中国应用,经过sing-box核心的dns过滤?
我所使用的dns配置
"dns": {
"servers": [
{
"type": "tls",
"server": "8.8.8.8",
"detour": "🌐 Anonymous Multi",
"tag": "dns-remote"
},
{
"type": "udp",
"server": "223.5.5.5",
"tag": "dns-direct"
},
{
"type": "fakeip",
"tag": "dns-fake",
"inet4_range": "198.18.0.0/15",
"inet6_range": "fc00::/18"
}
],
"rules": [
{
"clash_mode": "Direct",
"server": "dns-direct"
},
{
"clash_mode": "Global",
"server": "dns-remote"
},
{
"rule_set": ["adblocksingbox"], // dns里的广告拦截功能
"action": "reject"
},
{
"rule_set": ["geosite-geolocation-cn", "LocalAreaNetwork"],
"server": "dns-direct"
},
{
"type": "logical",
"mode": "and",
"rules": [
{
"rule_set": "geosite-geolocation-!cn",
"invert": true
},
{
"rule_set": "geoip-cn"
}
],
"action": "route",
"server": "dns-direct"
},
{
"disable_cache": true,
"inbound": "tun-in",
"query_type": ["A", "AAAA"],
"server": "dns-fake"
}
],
"strategy": "ipv4_only",
"independent_cache": true
},
Logs
Supporter
- I am a sponsor
Integrity requirements
- I confirm that I have read the documentation, understand the meaning of all the configuration items I wrote, and did not pile up seemingly useful options or default values.
- I confirm that I have provided the server and client configuration files and process that can be reproduced locally, instead of a complicated client configuration file that has been stripped of sensitive data.
- I confirm that I have provided the simplest configuration that can be used to reproduce the error I reported, instead of depending on remote servers, TUN, graphical interface clients, or other closed-source software.
- I confirm that I have provided the complete configuration files and logs, rather than just providing parts I think are useful out of confidence in my own intelligence.
Contributor guide
No contributing guide indexed for this repository
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
Start with the Android graphical client entry point and the reported 1.13.0-rc.3 setup, focusing on the per-application proxy path and the provided dns configuration for tun-in. Reproduce the case with selected Chinese apps bypassing the VPN, then trace whether their DNS requests reach the sing-box core. Done means per-application proxy bypass still works while the selected apps receive the configured DNS ad-blocking behavior.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- android, go
- Domain
- mobile-dev, networking
- Issue type
- Bug
- Difficulty
- 4/5
- Estimated time
- 3-5 days
- Activity status
- Quiet
- Clarity
- Mostly clear
- Newbie friendliness
- 48/100