Skip to content

sing-box Android的分应用代理功能与广告拦截功能有冲突 #3776

@zhea55

Description

@zhea55

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

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.

Metadata

Metadata

Assignees

No one assigned

    Labels

    enhancementNew feature or request

    Type

    No type

    Projects

    No projects

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions