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

sing-box v1.11系列,微信聊天无法发送图片 #2492

Closed
4 of 5 tasks
choicky opened this issue Jan 20, 2025 · 5 comments
Closed
4 of 5 tasks

sing-box v1.11系列,微信聊天无法发送图片 #2492

choicky opened this issue Jan 20, 2025 · 5 comments
Labels
need more information no locally reproducible process provided No basic respect for the open source community not following template Necessary information is not provided or is incomplete

Comments

@choicky
Copy link

choicky commented Jan 20, 2025

操作系统

Windows

系统版本

Windows 11, 23H2

安装类型

sing-box 原始命令行程序

如果您使用图形客户端程序,请提供该程序版本。

No response

版本

// 1.11系列都有该问题。

sing-box version 1.11.0-beta.24

Environment: go1.23.4 windows/amd64
Tags: with_gvisor,with_quic,with_dhcp,with_wireguard,with_ech,with_utls,with_reality_server,with_acme,with_clash_api
Revision: 8cc7734a921bf6c24d52d3b8dc40a553a88d7f5a
CGO: disabled

描述

sing-box v.1.11系列的各beta版本, sing-box.exe run -c config.json 的方式运行。微信聊天时,无法成功发送图片;

将前述for v1.11的配置文件改为兼容 v.1.10正式版之后,使用 sing-box v.1.10正式版运行时,微信聊天时能正常发送图片;

将前述兼容 v.10正式版的配置文件,使用 sing-box v.1.11各beta版 sing-box.exe run -c config.json 时,微信聊天依然不能正常发送图片。

重现方式

sing-box v.1.11系列的版本, sing-box.exe run -c config.json 的方式运行。

下面为 config.json 的完整内容:

{
  "log": {
    "level": "warn",
    "timestamp": true
  },
  "dns": {
    "servers": [
      {
        "tag": "ali_dns",
        "address": "223.5.5.5",
        "detour": "direct"
      },
      {
        "tag": "dns_direct",
        "address": "h3://dns.alidns.com/dns-query",
        "address_resolver": "ali_dns",
        "address_strategy": "ipv4_only",
        "strategy": "prefer_ipv4",
        "detour": "direct"
      },
      {
        "tag": "dns_proxy",
        "address": "https://cloudflare-dns.com/dns-query",
        "address_resolver": "dns_direct",
        "address_strategy": "ipv4_only",
        "strategy": "ipv4_only",
        "detour": "proxy_default"
      },
      {
        "tag": "dns_refused",
        "address": "rcode://refused"
      }
    ],
    "rules": [
      {
        "outbound": "any",
        "server": "dns_direct"
      },
      {
        "clash_mode": "Direct",
        "server": "dns_direct"
      },
      {
        "clash_mode": "Global",
        "server": "dns_proxy"
      },
      {
        "rule_set": "anti_ad",
        "action": "reject",
        "method": "default"
      },
      {
        "rule_set": "geolocation-cn",
        "server": "dns_direct"
      },
      {
        "type": "logical",
        "mode": "and",
        "rules": [
          {
            "rule_set": "geolocation-not-cn",
            "invert": true
          },
          {
            "rule_set": "geoip-cn"
          }
        ],
        "server": "dns_proxy",
        "client_subnet": "114.114.114.114/24"
      }
    ],
    "final": "dns_proxy",
    "strategy": "ipv4_only"
  },
  "inbounds": [
    {
      "type": "tun",
      "tag": "tun-in",
      "mtu": 1492,
      "address": [
        "172.16.0.1/30",
        "fd00::1/126"
      ],
      "auto_route": true,
      "strict_route": false,
      "stack": "mixed",
      "platform": {
        "http_proxy": {
          "enabled": true,
          "server": "127.0.0.1",
          "server_port": 2080
        }
      }
    },
    {
      "type": "mixed",
      "tag": "mixed-in",
      "listen": "::",
      "listen_port": 2080,
      "udp_fragment": false
    }
  ],
  "outbounds": [
    {
      "type": "direct",
      "tag": "direct"
    },
    {
      "type": "urltest",
      "tag": "proxy_auto",
      "outbounds": [
        //节点tag列表
      ],
      "url": "https://www.gstatic.com/generate_204",
      "interval": "4h0m0s",
      "tolerance": 50,
      "idle_timeout": "6h0m0s",
      "interrupt_exist_connections": true
    },
    {
      "type": "selector",
      "tag": "proxy_default",
      "outbounds": [
        //节点tag列表
      ],
      "default": "hk-reality",
      "interrupt_exist_connections": true
    },
    {
      "type": "selector",
      "tag": "proxy_AI",
      "outbounds": [
        //节点tag列表
      ],
      "default": "sg-reality",
      "interrupt_exist_connections": true
    },
    {
      //节点信息列表
    }
  ],
  "route": {
    "rules": [
      {
        "inbound": "tun-in",
        "action": "sniff"
      },
      {
        "inbound": "mixed-in",
        "action": "sniff"
      },
      {
        "protocol": "dns",
        "action": "hijack-dns"
      },
      {
        "clash_mode": "Block",
        "action": "reject",
        "method": "default"
      },
      {
        "clash_mode": "Direct",
        "outbound": "direct"
      },
      {
        "clash_mode": "Global",
        "outbound": "proxy_default"
      },
      {
        "protocol": "BitTorrent",
        "outbound": "direct"
      },
      {
        "ip_is_private": true,
        "outbound": "direct"
      },
      {
        "rule_set": "anti_ad",
        "action": "reject",
        "method": "default"
      },
      {
        "rule_set": [
          "geosite-openai",
          "geosite-gemini",
          "geosite-bing",
          "geoip_ai"
        ],
        "outbound": "proxy_AI"
      },
      {
        "rule_set": [
          "geoip-cn",
          "geolocation-cn",
          "geosite-tencent-cn",
          "geosite-bilibili-cn",
          "geosite-youku",
          "geosite-iqiyi",
          "geosite-amazon-cn",
          "geosite-apple-cn",
          "geosite-aws-cn",
          "geosite-bing-cn"
        ],
        "outbound": "direct"
      }
    ],
    "rule_set": [
      {
        "type": "remote",
        "tag": "anti_ad",
        "format": "binary",
        "url": "https://raw.githubusercontent.com/privacy-protection-tools/anti-ad.github.io/master/docs/anti-ad-sing-box.srs",
        "download_detour": "proxy_default",
        "update_interval": "48h0m0s"
      },
      {
        "type": "remote",
        "tag": "geoip_private",
        "format": "binary",
        "url": "https://raw.githubusercontent.com/MetaCubeX/meta-rules-dat/refs/heads/sing/geo/geoip/private.srs",
        "download_detour": "proxy_default",
        "update_interval": "48h0m0s"
      },
      {
        "type": "remote",
        "tag": "geosite-private",
        "format": "binary",
        "url": "https://raw.githubusercontent.com/MetaCubeX/meta-rules-dat/refs/heads/sing/geo/geosite/private.srs",
        "download_detour": "proxy_default",
        "update_interval": "48h0m0s"
      },
      {
        "type": "remote",
        "tag": "geosite-tencent-cn",
        "format": "binary",
        "url": "https://raw.githubusercontent.com/MetaCubeX/meta-rules-dat/refs/heads/sing/geo/geosite/[email protected]",
        "download_detour": "proxy_default",
        "update_interval": "48h0m0s"
      },
      {
        "type": "remote",
        "tag": "geosite-bilibili-cn",
        "format": "binary",
        "url": "https://raw.githubusercontent.com/MetaCubeX/meta-rules-dat/refs/heads/sing/geo/geosite/bilibili.srs",
        "download_detour": "proxy_default",
        "update_interval": "48h0m0s"
      },
      {
        "type": "remote",
        "tag": "geosite-youku",
        "format": "binary",
        "url": "https://raw.githubusercontent.com/MetaCubeX/meta-rules-dat/refs/heads/sing/geo/geosite/youku.srs",
        "download_detour": "proxy_default",
        "update_interval": "48h0m0s"
      },
      {
        "type": "remote",
        "tag": "geosite-iqiyi",
        "format": "binary",
        "url": "https://raw.githubusercontent.com/MetaCubeX/meta-rules-dat/refs/heads/sing/geo/geosite/iqiyi.srs",
        "download_detour": "proxy_default",
        "update_interval": "48h0m0s"
      },
      {
        "type": "remote",
        "tag": "geosite-apple-cn",
        "format": "binary",
        "url": "https://raw.githubusercontent.com/MetaCubeX/meta-rules-dat/refs/heads/sing/geo/geosite/apple-cn.srs",
        "download_detour": "proxy_default",
        "update_interval": "48h0m0s"
      },
      {
        "type": "remote",
        "tag": "geosite-aws-cn",
        "format": "binary",
        "url": "https://raw.githubusercontent.com/MetaCubeX/meta-rules-dat/refs/heads/sing/geo/geosite/aws-cn.srs",
        "download_detour": "proxy_default",
        "update_interval": "48h0m0s"
      },
      {
        "type": "remote",
        "tag": "geoip-cn",
        "format": "binary",
        "url": "https://raw.githubusercontent.com/MetaCubeX/meta-rules-dat/refs/heads/sing/geo/geoip/cn.srs",
        "download_detour": "proxy_default",
        "update_interval": "48h0m0s"
      },
      {
        "type": "remote",
        "tag": "geosite-cn",
        "format": "binary",
        "url": "https://raw.githubusercontent.com/MetaCubeX/meta-rules-dat/refs/heads/sing/geo/geosite/cn.srs",
        "download_detour": "proxy_default",
        "update_interval": "48h0m0s"
      },
      {
        "type": "remote",
        "tag": "geolocation-cn",
        "format": "binary",
        "url": "https://raw.githubusercontent.com/MetaCubeX/meta-rules-dat/refs/heads/sing/geo/geosite/geolocation-cn.srs",
        "download_detour": "proxy_default",
        "update_interval": "48h0m0s"
      },
      {
        "type": "remote",
        "tag": "geolocation-not-cn",
        "format": "binary",
        "url": "https://raw.githubusercontent.com/MetaCubeX/meta-rules-dat/refs/heads/sing/geo/geosite/geolocation-!cn.srs",
        "download_detour": "proxy_default",
        "update_interval": "48h0m0s"
      },
      {
        "type": "remote",
        "tag": "geosite-openai",
        "format": "binary",
        "url": "https://raw.githubusercontent.com/MetaCubeX/meta-rules-dat/refs/heads/sing/geo/geosite/openai.srs",
        "download_detour": "proxy_default",
        "update_interval": "48h0m0s"
      },
      {
        "type": "remote",
        "tag": "geosite-gemini",
        "format": "binary",
        "url": "https://raw.githubusercontent.com/MetaCubeX/meta-rules-dat/refs/heads/sing/geo/geosite/google-gemini.srs",
        "download_detour": "proxy_default",
        "update_interval": "48h0m0s"
      },
      {
        "type": "remote",
        "tag": "geosite-bing",
        "format": "binary",
        "url": "https://raw.githubusercontent.com/MetaCubeX/meta-rules-dat/sing/geo/geosite/bing.srs",
        "download_detour": "proxy_default",
        "update_interval": "48h0m0s"
      },
      {
        "type": "remote",
        "tag": "geosite-bing-cn",
        "format": "binary",
        "url": "https://raw.githubusercontent.com/MetaCubeX/meta-rules-dat/sing/geo/geosite/[email protected]",
        "download_detour": "proxy_default",
        "update_interval": "48h0m0s"
      },
      {
        "type": "remote",
        "tag": "geoip_ai",
        "format": "binary",
        "url": "https://raw.githubusercontent.com/MetaCubeX/meta-rules-dat/sing/geo/geoip/ai.srs",
        "download_detour": "proxy_default",
        "update_interval": "48h0m0s"
      },
      {
        "type": "remote",
        "tag": "geosite-google",
        "format": "binary",
        "url": "https://raw.githubusercontent.com/MetaCubeX/meta-rules-dat/sing/geo/geosite/google.srs",
        "download_detour": "proxy_default",
        "update_interval": "48h0m0s"
      },
      {
        "type": "remote",
        "tag": "geoip_google",
        "format": "binary",
        "url": "https://raw.githubusercontent.com/MetaCubeX/meta-rules-dat/sing/geo/geoip/google.srs",
        "download_detour": "proxy_default",
        "update_interval": "48h0m0s"
      },
      {
        "type": "remote",
        "tag": "geosite-googlefcm",
        "format": "binary",
        "url": "https://raw.githubusercontent.com/MetaCubeX/meta-rules-dat/sing/geo/geosite/googlefcm.srs",
        "download_detour": "proxy_default",
        "update_interval": "48h0m0s"
      },
      {
        "type": "remote",
        "tag": "geosite-google_play",
        "format": "binary",
        "url": "https://raw.githubusercontent.com/MetaCubeX/meta-rules-dat/sing/geo/geosite/google-play.srs",
        "download_detour": "proxy_default",
        "update_interval": "48h0m0s"
      },
      {
        "type": "remote",
        "tag": "geosite-google-cn",
        "format": "binary",
        "url": "https://raw.githubusercontent.com/MetaCubeX/meta-rules-dat/sing/geo/geosite/google-cn.srs",
        "download_detour": "proxy_default",
        "update_interval": "48h0m0s"
      },
      {
        "type": "remote",
        "tag": "geosite-google_trust_services-cn",
        "format": "binary",
        "url": "https://raw.githubusercontent.com/MetaCubeX/meta-rules-dat/sing/geo/geosite/[email protected]",
        "download_detour": "proxy_default",
        "update_interval": "48h0m0s"
      },
      {
        "type": "remote",
        "tag": "geosite-discord",
        "format": "binary",
        "url": "https://raw.githubusercontent.com/MetaCubeX/meta-rules-dat/sing/geo/geosite/discord.srs",
        "download_detour": "proxy_default",
        "update_interval": "48h0m0s"
      },
      {
        "type": "remote",
        "tag": "geosite-twitch",
        "format": "binary",
        "url": "https://raw.githubusercontent.com/MetaCubeX/meta-rules-dat/sing/geo/geosite/twitch.srs",
        "download_detour": "proxy_default",
        "update_interval": "48h0m0s"
      },
      {
        "type": "remote",
        "tag": "geosite-amazon",
        "format": "binary",
        "url": "https://raw.githubusercontent.com/MetaCubeX/meta-rules-dat/sing/geo/geosite/amazon.srs",
        "download_detour": "proxy_default",
        "update_interval": "48h0m0s"
      },
      {
        "type": "remote",
        "tag": "geosite-amazon-cn",
        "format": "binary",
        "url": "https://raw.githubusercontent.com/MetaCubeX/meta-rules-dat/sing/geo/geosite/[email protected]",
        "download_detour": "proxy_default",
        "update_interval": "48h0m0s"
      },
      {
        "type": "remote",
        "tag": "geosite-amazontrust",
        "format": "binary",
        "url": "https://raw.githubusercontent.com/MetaCubeX/meta-rules-dat/sing/geo/geosite/amazontrust.srs",
        "download_detour": "proxy_default",
        "update_interval": "48h0m0s"
      },
      {
        "type": "remote",
        "tag": "geosite-twitter",
        "format": "binary",
        "url": "https://raw.githubusercontent.com/MetaCubeX/meta-rules-dat/sing/geo/geosite/twitter.srs",
        "download_detour": "proxy_default",
        "update_interval": "48h0m0s"
      },
      {
        "type": "remote",
        "tag": "geoip_twitter",
        "format": "binary",
        "url": "https://raw.githubusercontent.com/MetaCubeX/meta-rules-dat/sing/geo/geoip/twitter.srs",
        "download_detour": "proxy_default",
        "update_interval": "48h0m0s"
      },
      {
        "type": "remote",
        "tag": "geosite-x",
        "format": "binary",
        "url": "https://raw.githubusercontent.com/MetaCubeX/meta-rules-dat/sing/geo/geosite/x.srs",
        "download_detour": "proxy_default",
        "update_interval": "48h0m0s"
      },
      {
        "type": "remote",
        "tag": "geosite-telegram",
        "format": "binary",
        "url": "https://raw.githubusercontent.com/MetaCubeX/meta-rules-dat/sing/geo/geosite/x.srs",
        "download_detour": "proxy_default",
        "update_interval": "48h0m0s"
      },
      {
        "type": "remote",
        "tag": "geoip_telegram",
        "format": "binary",
        "url": "https://raw.githubusercontent.com/MetaCubeX/meta-rules-dat/sing/geo/geoip/telegram.srs",
        "download_detour": "proxy_default",
        "update_interval": "48h0m0s"
      },
      {
        "type": "remote",
        "tag": "geosite-tiktok",
        "format": "binary",
        "url": "https://raw.githubusercontent.com/MetaCubeX/meta-rules-dat/sing/geo/geosite/tiktok.srs",
        "download_detour": "proxy_default",
        "update_interval": "48h0m0s"
      }
    ],
    "final": "proxy_default",
    "auto_detect_interface": true,
    "override_android_vpn": true
  },
  "experimental": {
    "cache_file": {
      "enabled": true,
      "path": "cache.db"
    },
    "clash_api": {
      "external_controller": "127.0.0.1:9090",
      "external_ui": "ui",
      "external_ui_download_url": "https://github.com/MetaCubeX/Yacd-meta/archive/gh-pages.zip",
      "external_ui_download_detour": "proxy_default",
      "default_mode": "rule"
    }
  }
}

日志

支持我们

完整性要求

  • 我保证阅读了文档,了解所有我编写的配置文件项的含义,而不是大量堆砌看似有用的选项或默认值。
  • 我保证提供了可以在本地重现该问题的服务器、客户端配置文件与流程,而不是一个脱敏的复杂客户端配置文件。
  • 我保证提供了可用于重现我报告的错误的最简配置,而不是依赖远程服务器、TUN、图形界面客户端或者其他闭源软件。
  • 我保证提供了完整的配置文件与日志,而不是出于对自身智力的自信而仅提供了部分认为有用的部分。
@choicky choicky changed the title 微信聊天无法发送图片 sing-box v1.11系列,微信聊天无法发送图片 Jan 20, 2025
@zlibfun
Copy link

zlibfun commented Jan 23, 2025

same

@AtticusZeller
Copy link

"final": "proxy_default",

it perhaps wechat images sent through proxy_server.
my personal solution is simply using the new feature-route_exclude_address_set.

"inbounds": [
    {
      "type": "tun",
      "tag": "tun-in",
      "mtu": 1492,
      "address": [
        "172.16.0.1/30",
        "fd00::1/126"
      ],
      "auto_route": true,
      "strict_route": true,
      "route_exclude_address_set": "geoip-cn",
      "stack": "system"
    }
  ],

"route_exclude_address_set": "geoip-cn",solved it for me.,it exclude proxy for wechat.

and the last router rules might be wrong?divide rule-set into "geoip-cn",and other domain

{ 
  "rule_set": [
    "geolocation-cn",
    "geosite-tencent-cn",
    "geosite-bilibili-cn",
    "geosite-youku",
    "geosite-iqiyi",
    "geosite-amazon-cn",
    "geosite-apple-cn",
    "geosite-aws-cn",
    "geosite-bing-cn"
   ],
   "outbound": "direct"
},
{
  "rule_set":"geoip-cn",
  "outbound": "direct"
}

@choicky
Copy link
Author

choicky commented Jan 24, 2025

@AtticusZeller Thank you for your reply.

It's said that route_exclude_address_set with auto_redirect enabled is only supported in Linux system and requires auto_route enabled. Alternatively, without auto_redirect enalbed, it doesn't work on the Android graphical client due to the Android VpnService not being able to handle a large number of routes (DeadSystemException). Is that true? What is your system?

Ref: https://sing-box.sagernet.org/configuration/inbound/tun/#__tabbed_2_2

@AtticusZeller
Copy link

AtticusZeller commented Jan 24, 2025

@choicky That's TRUE.Here is my configuration settings across different platforms:

  1. Linux route_exclude_address_set+ auto_redirect
  2. windows route_exclude_address_set without auto_redirect
  3. android none of them. but rule-set works.

@dyhkwong dyhkwong added need more information not following template Necessary information is not provided or is incomplete no locally reproducible process provided No basic respect for the open source community labels Jan 24, 2025
@dyhkwong
Copy link
Contributor

No minimal reproducible PoC and no log so no investigation. May be #932.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
need more information no locally reproducible process provided No basic respect for the open source community not following template Necessary information is not provided or is incomplete
Projects
None yet
Development

No branches or pull requests

4 participants