SagerNet / sing-box

The universal proxy platform
https://sing-box.sagernet.org/
Other
18.41k stars 2.21k forks source link

关于安卓手机运行singbox问题 #1130

Closed Duan-rax closed 10 months ago

Duan-rax commented 10 months ago

Operating system

Android

System version

Android 10 (P30 Pro)

Installation type

sing-box for Android Graphical Client

If you are using a graphical client, please provide the version of the client.

1.7.0-beta.3 && v1.7.0-beta.2

Version

no output

Description

请问,本项目是否会导致安卓系统无响应直接卡死,最近在运行程序时,手机偶尔会直接卡死(无响应,卡当前界面),然后自动关机,手动可以重启

Reproduction

{
  "log": {
    "disabled": false,
    "level": "info",
    "timestamp": true
  },
  "dns": {
    "servers": [
      {
        "tag": "proxyDns",
        "address": "https://1.1.1.1/dns-query",
        "strategy": "ipv4_only",
        "address_resolver": "dns_resolver",
        "detour": "✈️ Proxy"
      },
      {
        "tag": "localDns",
        "address": "https://223.5.5.5/dns-query",
        "strategy": "ipv4_only",
        "address_resolver": "dns_resolver",
        "detour": "direct"
      },
      {
        "tag": "block",
        "address": "rcode://refused"
      },
      {
        "tag": "dns_resolver",
        "address": "223.5.5.5",
        "strategy": "ipv4_only",
        "detour": "direct"
      }
    ],
    "rules": [
      {
        "geosite": "category-ads-all",
        "server": "block",
        "disable_cache": true
      },
      {
        "domain_suffix": [
          "appcenter.ms",
          "app-measurement.com",
          "firebase.io",
          "crashlytics.com",
          "google-analytics.com"
        ],
        "server": "block",
        "disable_cache": true
      },
      {
        "geosite": [
          "private",
          "cn"
        ],
        "query_type": [
          "A",
          "HTTPS"
        ],
        "server": "localDns"
      },
      {
        "geosite": "geolocation-!cn",
        "query_type": [
          "A",
          "HTTPS"
        ],
        "server": "proxyDns"
      },
      {
        "outbound": "any",
        "server": "proxyDns",
        "query_type": [
          "A",
          "HTTPS"
        ],
        "disable_cache": true
      },
      {
        "clash_mode": "direct",
        "server": "localDns"
      },
      {
        "clash_mode": "global",
        "server": "proxyDns"
      }
    ],
    "final": "proxyDns",
    "fakeip": {
      "enabled": true,
      "inet4_range": "198.18.0.0/15",
      "inet6_range": "fc00::/18"
    },
    "strategy": "ipv4_only",
    "independent_cache": true
  },
  "ntp": {
    "enabled": true,
    "interval": "30m0s",
    "server": "time.apple.com",
    "server_port": 123,
    "detour": "direct"
  },
  "inbounds": [
    {
      "type": "tun",
      "mtu": 9000,
      "inet4_address": "172.19.0.1/30",
      "inet6_address": "fdfd:9527::1/32",
      "auto_route": true,
      "strict_route": true,
      "stack": "system",
      "sniff": true
    },
    {
      "type": "mixed",
      "listen": "127.0.0.1",
      "listen_port": 7890,
      "sniff": true
    }
  ],
  "outbounds": [
    {
      "type": "selector",
      "tag": "✈️ Proxy",
      "outbounds": [
      ]
    },
    {
      "type": "selector",
      "tag": "📹 Youtube",
      "outbounds": [
      ]
    },
    {
      "type": "selector",
      "tag": "📟 Telegram",
      "outbounds": [
      ]
    },
    {
      "type": "selector",
      "tag": "🎥 Netflix",
      "outbounds": [
      ]
    },
    {
      "type": "selector",
      "tag": "🎶 Netease Music",
      "outbounds": [
      ]
    },
    {
      "type": "selector",
      "tag": "💰 PayPal",
      "outbounds": [
      ]
    },
    {
      "type": "selector",
      "tag": "🤖 OpenAI",
      "outbounds": [
      ]
    },
    {
      "type": "selector",
      "tag": "🔄 SpeedTest",
      "outbounds": [
      ]
    },
    {
      "type": "selector",
      "tag": "🌌 Google",
      "outbounds": [
      ]
    },
    {
      "type": "selector",
      "tag": "🐦 Twitter",
      "outbounds": [
      ]
    },
    {
      "type": "selector",
      "tag": "👤 Facebook",
      "outbounds": [
      ]
    },
    {
      "type": "selector",
      "tag": "🛍️ Amazon",
      "outbounds": [
      ]
    },
    {
      "type": "selector",
      "tag": "🍎 Apple",
      "outbounds": [
      ]
    },
    {
      "type": "selector",
      "tag": "Ⓜ️ Onedrive",
      "outbounds": [
      ]
    },
    {
      "type": "selector",
      "tag": "🧩 Microsoft",
      "outbounds": [
      ]
    },
    {
      "type": "selector",
      "tag": "💬 Pornhub",
      "outbounds": [
      ]
    },
    {
      "type": "selector",
      "tag": "🎮 Game",
      "outbounds": [
      ]
    },
    {
      "type": "selector",
      "tag": "📺 Bilibili",
      "outbounds": [
      ]
    },
    {
      "type": "selector",
      "tag": "🛡️ Academic",
      "outbounds": [
      ]
    },
    {
      "type": "selector",
      "tag": "🎬 MediaVideo",
      "outbounds": [
      ]
    },
    {
      "type": "selector",
      "tag": "🌏 !cn",
      "outbounds": [
      ]
    },
    {
      "type": "selector",
      "tag": "🌏 cn",
      "outbounds": [
      ]
    },
    {
      "type": "selector",
      "tag": "🛑 AdBlock",
      "outbounds": [
        "block",
        "direct"
      ]
    },
    {
      "type": "direct",
      "tag": "direct"
    },
    {
      "type": "dns",
      "tag": "dns-out"
    },
    {
      "type": "block",
      "tag": "block"
    }
  ],
  "route": {
    "geoip": {
      "download_url": "https://github.com/soffchen/sing-geoip/releases/latest/download/geoip.db",
      "download_detour": "✈️ Proxy"
    },
    "geosite": {
      "download_url": "https://github.com/SagerNet/sing-geosite/releases/latest/download/geosite.db",
      "download_detour": "✈️ Proxy"
    },
    "rules": [
      {
        "protocol": "dns",
        "outbound": "dns-out"
      },
      {
        "network": "udp",
        "port": 443,
        "outbound": "block"
      },
      {
        "geosite": "category-ads-all",
        "outbound": "🛑 AdBlock"
      },
      {
        "protocol": [
          "quic"
        ],
        "outbound": "block"
      },
      {
        "clash_mode": "direct",
        "outbound": "direct"
      },
      {
        "clash_mode": "global",
        "outbound": "✈️ Proxy"
      },
      {
        "domain": [
          "clash.razord.top",
          "yacd.metacubex.one",
          "yacd.haishan.me"
        ],
        "outbound": "direct"
      },
      {
        "domain_suffix": [
          ".xn--ngstr-lra8j.com"
        ],
        "outbound": "direct"
      },
      {
        "process_name": [
          "qBittorrent",
          "qbittorrent.exe",
          "qbittorrent-nox",
          "transmission-daemon.exe",
          "transmission-qt.exe",
          "uTorrent",
          "uTorrent.exe",
          "xray.exe",
          "hysteria.exe",
          "tuic.exe",
          "tuic-client.exe",
          "juicity.exe",
          "juicity-client.exe"
        ],
        "outbound": "direct"
      },
      {
        "geosite": "youtube",
        "outbound": "📹 Youtube"
      },
      {
        "geosite": "category-porn",
        "outbound": "💬 Pornhub"
      },
      {
        "geosite": "netease",
        "outbound": "🎶 Netease Music"
      },
      {
        "geoip": "netflix",
        "outbound": "🎥 Netflix"
      },
      {
        "geosite": "netflix",
        "outbound": "🎥 Netflix"
      },
      {
        "geosite": "paypal",
        "outbound": "💰 PayPal"
      },
      {
        "geosite": "openai",
        "outbound": "🤖 OpenAI"
      },
      {
        "geosite": "speedtest",
        "outbound": "🔄 SpeedTest"
      },
      {
        "geosite": "category-scholar-!cn",
        "outbound": "🛡️ Academic"
      },
      {
        "geosite": "onedrive",
        "outbound": "Ⓜ️ Onedrive"
      },
      {
        "geoip": "google",
        "outbound": "🌌 Google"
      },
      {
        "geosite": [
          "google",
          "github"
        ],
        "outbound": "🌌 Google"
      },
      {
        "geoip": "telegram",
        "outbound": "📟 Telegram"
      },
      {
        "geosite": "telegram",
        "outbound": "📟 Telegram"
      },
      {
        "geoip": "twitter",
        "outbound": "🐦 Twitter"
      },
      {
        "geosite": "twitter",
        "outbound": "🐦 Twitter"
      },
      {
        "geoip": "facebook",
        "outbound": "👤 Facebook"
      },
      {
        "geosite": [
          "facebook",
          "instagram"
        ],
        "outbound": "👤 Facebook"
      },
      {
        "geosite": "amazon",
        "outbound": "🛍️ Amazon"
      },
      {
        "geosite": "apple",
        "outbound": "🍎 Apple"
      },
      {
        "geoip": "apple",
        "outbound": "🍎 Apple"
      },
      {
        "geosite": "microsoft",
        "outbound": "🧩 Microsoft"
      },
      {
        "geosite": "category-games",
        "outbound": "🎮 Game"
      },
      {
        "geosite": "bilibili",
        "outbound": "📺 Bilibili"
      },
      {
        "geosite": [
          "tiktok",
          "hbo",
          "disney",
          "primevideo"
        ],
        "outbound": "🎬 MediaVideo"
      },
      {
        "geosite": "geolocation-!cn",
        "outbound": "🌏 !cn"
      },
      {
        "geoip": [
          "private",
          "cn"
        ],
        "outbound": "🌏 cn"
      },
      {
        "geosite": "cn",
        "outbound": "🌏 cn"
      }
    ],
    "final": "✈️ Proxy",
    "auto_detect_interface": true
  },
  "experimental": {
    "clash_api": {
      "external_controller": "0.0.0.0:9090",
      "external_ui": "ui",
      "default_mode": "rule",
      "store_selected": true
    }
  }
}

Logs

no log

CHIZI-0618 commented 10 months ago

只大概看了一眼配置

    {
        "outbound": "any",
        "server": "proxyDns",
        "query_type": [
          "A",
          "HTTPS"
        ],
        "disable_cache": true
      },

如果不是你自己写的,请发 issue 到生成此配置的项目

Duan-rax commented 9 months ago

经过个人的使用,尝试了1.6.51 .7.0 beta,发现应该是 brutal导致的系统崩溃。 1.6.5下多路复用无brutal字段,在使用Hy2时仍然崩溃,变现为高网络负载情况下导致手机直接卡死。 这是一个样例视频:

系统是Android10,设备HuaWeiP30 Pro,EMUI11,请问我该如何提供更详细的信息

这是我的个人配置:

{
  "log": {
    "level": "error",
    "timestamp": true
  },
  "experimental": {
    "clash_api": {
      "external_controller": "127.0.0.1:9090",
      "external_ui": "ui",
      "default_mode": "rule",
      "store_selected": true
    }
  },
  "dns": {
    "servers": [
      {
        "tag": "proxyDns",
        "address": "https://1.1.1.1/dns-query",
        "address_resolver": "resolverDns",
        "strategy": "ipv4_only",
        "detour": "✈️ Proxy"
      },
      {
        "tag": "localDns",
        "address": "https://223.5.5.5/dns-query",
        "address_resolver": "resolverDns",
        "strategy": "ipv4_only",
        "detour": "direct"
      },
      {
        "tag": "block",
        "address": "rcode://success"
      },
      {
        "tag": "fakeDns",
        "address": "fakeip",
        "strategy": "ipv4_only"
      },
      {
        "tag": "resolverDns",
        "address": "223.5.5.5",
        "strategy": "ipv4_only",
        "detour": "direct"
      }
    ],
    "rules": [
      {
        "geosite": "category-ads-all",
        "server": "block",
        "disable_cache": true
      },
      {
        "domain_suffix": [
          "appcenter.ms",
          "app-measurement.com",
          "firebase.io",
          "crashlytics.com",
          "google-analytics.com"
        ],
        "server": "block",
        "disable_cache": true
      },
      {
        "geosite": [
          "private",
          "cn"
        ],
        "server": "localDns"
      },
      {
        "geosite": "geolocation-!cn",
        "server": "fakeDns"
      },
      {
        "geosite": "geolocation-!cn",
        "server": "proxyDns"
      },
      {
        "outbound": "any",
        "server": "proxyDns",
        "disable_cache": true
      },
      {
        "clash_mode": "direct",
        "server": "localDns"
      },
      {
        "clash_mode": "global",
        "server": "proxyDns"
      }
    ],
    "final": "proxyDns",
    "fakeip": {
      "enabled": true,
      "inet4_range": "198.18.0.0/15",
      "inet6_range": "fc00::/18"
    },
    "strategy": "ipv4_only",
    "independent_cache": true
  },
  "inbounds": [
    {
      "type": "tun",
      "mtu": 9000,
      "inet4_address": "172.19.0.1/30",
      "inet6_address": "fdfd:9527::1/32",
      "auto_route": true,
      "strict_route": true,
      "stack": "gvisor",
      "sniff": true
    },
    {
      "type": "mixed",
      "listen": "127.0.0.1",
      "listen_port": 7890,
      "sniff": true
    }
  ],
  "outbounds": [
    {
      "type": "selector",
      "tag": "✈️ Proxy",
      "outbounds": [
      ],
      "default": "Aws"
    },
    {
      "type": "selector",
      "tag": "📹 Youtube",
      "outbounds": [
      ]
    },
    {
      "type": "selector",
      "tag": "📟 Telegram",
      "outbounds": [
      ]
    },
    {
      "type": "selector",
      "tag": "🎥 Netflix",
      "outbounds": [
      ]
    },
    {
      "type": "selector",
      "tag": "🔯 PT Site",
      "outbounds": [
      ]
    },
    {
      "type": "selector",
      "tag": "🎶 Netease Music",
      "outbounds": [
        "direct"
      ]
    },
    {
      "type": "selector",
      "tag": "💰 PayPal",
      "outbounds": [
      ],
      "default": "CloudCone"
    },
    {
      "type": "selector",
      "tag": "🤖 OpenAI",
      "outbounds": [
      ]
    },
    {
      "type": "selector",
      "tag": "🔄 SpeedTest",
      "outbounds": [
      ]
    },
    {
      "type": "selector",
      "tag": "🌌 Google",
      "outbounds": [
      ]
    },
    {
      "type": "selector",
      "tag": "🐦 Twitter",
      "outbounds": [
      ]
    },
    {
      "type": "selector",
      "tag": "👤 Facebook",
      "outbounds": [
      ]
    },
    {
      "type": "selector",
      "tag": "🛍️ Amazon",
      "outbounds": [
      ]
    },
    {
      "type": "selector",
      "tag": "🍎 Apple",
      "outbounds": [
      ]
    },
    {
      "type": "selector",
      "tag": "Ⓜ️ Onedrive",
      "outbounds": [
      ]
    },
    {
      "type": "selector",
      "tag": "🧩 Microsoft",
      "outbounds": [
      ]
    },
    {
      "type": "selector",
      "tag": "💬 Pornhub",
      "outbounds": [
      ]
    },
    {
      "type": "selector",
      "tag": "🎮 Game",
      "outbounds": [
      ]
    },
    {
      "type": "selector",
      "tag": "📺 Bilibili",
      "outbounds": [
        "direct"
      ]
    },
    {
      "type": "selector",
      "tag": "🛡️ Academic",
      "outbounds": [
      ],
      "default": "✈️ Proxy"
    },
    {
      "type": "selector",
      "tag": "🎬 MediaVideo",
      "outbounds": [
      ]
    },
    {
      "type": "selector",
      "tag": "🌏 !cn",
      "outbounds": [
      ],
      "default": "✈️ Proxy"
    },
    {
      "type": "selector",
      "tag": "🌏 cn",
      "outbounds": [
        "direct"
      ]
    },
    {
      "type": "selector",
      "tag": "🛑 AdBlock",
      "outbounds": [
        "block",
        "direct"
      ]
    },
    {
      "type": "direct",
      "tag": "direct"
    },
    {
      "type": "dns",
      "tag": "dns-out"
    },
    {
      "type": "block",
      "tag": "block"
    },
    {
      "type": "vless",
      "tag": "xxx",
      "server": "xxx",
      "server_port": 443,
      "uuid": "xxx",
      "tls": {
        "enabled": true,
        "server_name": "xxx",
        "utls": {
          "enabled": true,
          "fingerprint": "chrome"
        },
        "reality": {
          "enabled": true,
          "public_key": "xxx"
        }
      },
      "multiplex": {
        "enabled": true,
        "protocol": "h2mux",
        "brutal": {
          "enabled": true,
          "up_mbps": 300,
          "down_mbps": 300
        }
      },
      "packet_encoding": "xudp"
    },
    {
      "type": "hysteria2",
      "tag": "xxx",
      "server": "xxx",
      "server_port": 443,
      "up_mbps": 300,
      "down_mbps": 300,
      "obfs": {
        "type": "salamander",
        "password": "xxx"
      },
      "password": "xxx",
      "tls": {
        "enabled": true,
        "server_name": "xxx",
        "alpn": "h3"
      }
    }
  ],
  "route": {
    "geoip": {
      "download_url": "https://github.com/soffchen/sing-geoip/releases/latest/download/geoip.db",
      "download_detour": "✈️ Proxy"
    },
    "geosite": {
      "download_url": "https://github.com/SagerNet/sing-geosite/releases/latest/download/geosite.db",
      "download_detour": "✈️ Proxy"
    },
    "rules": [
      {
        "protocol": "dns",
        "outbound": "dns-out"
      },
      {
        "protocol": "quic",
        "outbound": "block"
      },
      {
        "network": "udp",
        "port": 443,
        "outbound": "block"
      },
      {
        "geosite": "category-ads-all",
        "outbound": "🛑 AdBlock"
      },
      {
        "clash_mode": "direct",
        "outbound": "direct"
      },
      {
        "clash_mode": "global",
        "outbound": "✈️ Proxy"
      },
      {
        "domain": [
          "clash.razord.top",
          "yacd.metacubex.one",
          "yacd.haishan.me",
          "talkatone.com",
          "tktn.be",
          "d.metacubex.one",
          "services.googleapis.cn"
        ],
        "outbound": "direct"
      },
      {
        "domain_suffix": ".xn--ngstr-lra8j.com",
        "outbound": "direct"
      },
      {
        "ip_cidr": [
          "50.117.27.0/24",
          "69.46.75.0/24",
          "205.164.56.29/24",
          "63.251.124.0/24"
        ],
        "outbound": "direct"
      },
      {
        "package_name": [
          "com.talkatone.android",
          "com.tencent.mm",
          "com.tencent.mobileqq",
          "com.sinovatech.unicom.ui",
          "com.ct.client",
          "com.zhihu.android"
        ],
        "outbound": "direct"
      },
      {
        "process_name": [
          "qBittorrent",
          "qbittorrent.exe",
          "qbittorrent-nox",
          "transmission-daemon.exe",
          "transmission-qt.exe",
          "uTorrent",
          "uTorrent.exe",
          "xray.exe",
          "hysteria.exe",
          "tuic.exe",
          "tuic-client.exe",
          "juicity.exe",
          "juicity-client.exe"
        ],
        "outbound": "direct"
      },
      {
        "domain_suffix": ".v2ex.com",
        "outbound": "✈️ Proxy"
      },
      {
        "geosite": "youtube",
        "outbound": "📹 Youtube"
      },
      {
        "geosite": "category-pt",
        "outbound": "🔯 PT Site"
      },
      {
        "geosite": "category-public-tracker",
        "outbound": "🔯 PT Site"
      },
      {
        "geosite": "category-porn",
        "outbound": "💬 Pornhub"
      },
      {
        "geosite": "netease",
        "outbound": "🎶 Netease Music"
      },
      {
        "geoip": "netflix",
        "outbound": "🎥 Netflix"
      },
      {
        "geosite": "netflix",
        "outbound": "🎥 Netflix"
      },
      {
        "package_name": [
          "com.globe.gcash.android",
          "ph.com.globe.globeonesuperapp",
          "com.lazada.android",
          "com.oazn.android",
          "com.paypal.android.p2pmobile",
          "com.shopee.ph"
        ],
        "outbound": "💰 PayPal"
      },
      {
        "geosite": "paypal",
        "outbound": "💰 PayPal"
      },
      {
        "geosite": "openai",
        "outbound": "🤖 OpenAI"
      },
      {
        "geosite": "speedtest",
        "outbound": "🔄 SpeedTest"
      },
      {
        "package_name": "org.zwanoo.android.speedtest",
        "outbound": "🔄 SpeedTest"
      },
      {
        "geosite": "category-scholar-!cn",
        "outbound": "🛡️ Academic"
      },
      {
        "geosite": "onedrive",
        "outbound": "Ⓜ️ Onedrive"
      },
      {
        "package_name": [
          "com.google.android.gms"
        ],
        "outbound": "🌌 Google"
      },
      {
        "geoip": "google",
        "outbound": "🌌 Google"
      },
      {
        "geosite": [
          "google",
          "github"
        ],
        "outbound": "🌌 Google"
      },
      {
        "geoip": "telegram",
        "outbound": "📟 Telegram"
      },
      {
        "geosite": "telegram",
        "outbound": "📟 Telegram"
      },
      {
        "geoip": "twitter",
        "outbound": "🐦 Twitter"
      },
      {
        "geosite": "twitter",
        "outbound": "🐦 Twitter"
      },
      {
        "geoip": "facebook",
        "outbound": "👤 Facebook"
      },
      {
        "geosite": [
          "facebook",
          "instagram"
        ],
        "outbound": "👤 Facebook"
      },
      {
        "geosite": "amazon",
        "outbound": "🛍️ Amazon"
      },
      {
        "geosite": "apple",
        "outbound": "🍎 Apple"
      },
      {
        "geoip": "apple",
        "outbound": "🍎 Apple"
      },
      {
        "geosite": "microsoft",
        "outbound": "🧩 Microsoft"
      },
      {
        "geosite": "category-games",
        "outbound": "🎮 Game"
      },
      {
        "geosite": "bilibili",
        "outbound": "📺 Bilibili"
      },
      {
        "geosite": [
          "tiktok",
          "hbo",
          "disney",
          "primevideo"
        ],
        "outbound": "🎬 MediaVideo"
      },
      {
        "geosite": "geolocation-!cn",
        "outbound": "🌏 !cn"
      },
      {
        "geoip": [
          "private",
          "cn"
        ],
        "outbound": "🌏 cn"
      },
      {
        "geosite": "cn",
        "outbound": "🌏 cn"
      }
    ],
    "final": "✈️ Proxy",
    "auto_detect_interface": true
  }
}