sing-box icon indicating copy to clipboard operation
sing-box copied to clipboard

SFA client, ipv6 does not work

Open dKenGuru opened this issue 11 months ago • 15 comments

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.35

Version


Description

Ipv6 in tun does not work since ~.20 alpha. Same config works on 1.12.x client.

Reproduction

Install SFA 1.13 alpha and create tun with ipv6 support

Logs


Supporter

Integrity requirements

  • [x] 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.
  • [x] 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.
  • [x] 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.
  • [x] 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.

dKenGuru avatar Dec 30 '25 22:12 dKenGuru

我可以确定的是这个 Issue 出现于 1.13-alpha.35 。我没有在 1.13-alpha.34. 以及之前的版本发现这个问题。

我这里提供一个最小的可复现配置。

{
  "log"      : {"level": "info"},
  "inbounds" : [
    {
      "type": "tun",
      "tag": "tun-in",
      "address": ["172.27.0.1/30", "fdfe:dcba:9876::1/126"],
      "auto_route": true,
      "route_exclude_address": ["10.0.0.0/8", "172.16.0.0/12", "192.168.0.0/16", "fc00::/7"]
    }
  ],
  "dns"      : {
    "servers": [ {"type": "https", "tag": "dns-resolve", "server": "223.5.5.5"} ],
    "final"  : "dns-resolve"
  },
  "route"    : {
    "rules": [ {"port": 53, "action": "hijack-dns"} ],
    "auto_detect_interface": true,
    "final": "direct"
  },
  "outbounds": [ {"type": "direct", "tag": "direct", "domain_resolver": "dns-resolve"} ]
}

将该配置导入到 SFA-alpha35 内, 同时启动。

打开 Termux 分别使用 curl ip.sb -4v 和 curl ip.sb -6v 可以查看到在 IPv4的情况下,TCP连接可以被建立,但是如果在 IPv6的情况下,TCP连接不会被建立,而 Curl 的输出始终卡在 Trying .... 阶段。

已经确认只有在 SFA 才会出现这个问题,而在只有核心的情况下无法出现。

daminit avatar Dec 31 '25 13:12 daminit

{
  "log": {
    "level": "warn",
    "timestamp": true
  },
  "dns": {
    "servers": [
      {
        "type": "local",
        "tag": "DNS"
      }
    ],
    "final": "DNS",
    "strategy": "prefer_ipv6"
  },
  "inbounds": [
    {
      "type": "tun",
      "address": [
        "172.19.0.1/30",
        "fdfe:dcba:9876::1/126"
      ],
      "auto_route": true,
      "strict_route": true,
      "stack": "system",
      "sniff": true
    }
  ],

This working fine in SFA 1.12.x. But not in 1.13 any last build. Android system DNS set to CDN - one.one.one.one.

dKenGuru avatar Jan 01 '26 09:01 dKenGuru

Ipv6 still broken in SFA.

dKenGuru avatar Jan 14 '26 23:01 dKenGuru

Still not fixed. What information needed?

dKenGuru avatar Feb 06 '26 18:02 dKenGuru

Still not fixed. What information needed?

Some users had reported that IPv6 can be used when the stack is switched to gvisor or when application-specific proxies are disabled. You can try it.

daminit avatar Feb 07 '26 09:02 daminit

Gvisor works, yep. But on 1.12 System stack works fine.

dKenGuru avatar Feb 07 '26 09:02 dKenGuru

This issue cannot be reproduced on my device, also running Android 16. If you cannot provide a general method for reproducing it (in the official Android Studio emulator), I'm afraid this is a vendor-specific problem.

nekohasekai avatar Feb 07 '26 09:02 nekohasekai

It is Pixel 6a and 9a. So Pixel line as is reference android smartphone.

dKenGuru avatar Feb 07 '26 10:02 dKenGuru

No, Pixel is still considered a stock ROM. I need it to be reproducible in an emulator unless you send me a Pixel ;)

nekohasekai avatar Feb 07 '26 10:02 nekohasekai

If it was vendor specific problem, 1.12 versions also must have this. But they are not. Problem start since 1.13 alpha .10 or .20+.

dKenGuru avatar Feb 07 '26 18:02 dKenGuru

If it was vendor specific problem, 1.12 versions also must have this. But they are not. Problem start since 1.13 alpha .10 or .20+.

You could try a different subscription, I had this problem and switched to another airport's subscription and it went away.

Additionally I found out that it's because there are some issues with the auto-generated subscriptions when the only subscription content provided is the node information, as evidenced by the fact that when I access Google Play connectivitycheck.gsstatic.com requests are matched to the rule_set of [geosite-cn geoip-cn] and then is DIRECTED, ultimately rendering Google Play unusable!

duty9527 avatar Feb 28 '26 09:02 duty9527

I don't use subscriptions.

dKenGuru avatar Feb 28 '26 09:02 dKenGuru

This issue seems like has been solved in https://github.com/SagerNet/sing-box-for-android/commit/05fe2efc8522a6548aa66aa5e877181a15abd5b8

Should consider close this issue.

daminit avatar Mar 01 '26 08:03 daminit

This issue seems like has been solved in SagerNet/sing-box-for-android@05fe2ef

Should consider close this issue.

I can confirm this, thank you! Setting "route": {"auto_detect_interface": true} to prevent TUN loopback instead of excluding (io.nekohasekai.sfa) from the android split VPN fixed my IPv6 issues.

Note: The mentioned commit only affects the split-tunnel app list defined in the SFA settings, if you are configuring per-app proxy in your sing-box profile, adding the SFA package id manually is still required.

AgentConDier avatar Mar 09 '26 00:03 AgentConDier

This issue is stale because it has been open 60 days with no activity. Remove stale label or comment or this will be closed in 5 days

github-actions[bot] avatar May 08 '26 02:05 github-actions[bot]