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

[Bug] Singbox For Android发生崩溃

Open kogekiplay opened this issue 3 years ago • 3 comments

操作系统

Android

系统版本

ColorOS13 Android13

安装类型

sing-box for Android 图形客户端程序

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

1.5.0-beta.11

版本

```console # 使用输出内容覆盖此行 ```

描述

启动vpn service发生panic,GUI中刚看到下载geo文件的时候就闪退

image

重现方式

使用geoip相关rule,点击sfa中的启动按钮会自动下载geoip.db,此时发生崩溃

"route": { "rules": [ { "port": 53, "outbound": "dns-out" }, { "clash_mode": "direct", "outbound": "direct" }, { "clash_mode": "global", "outbound": "GLOBAL" }, { "geoip": "google", "geosite": "google", "outbound": "google" }, { "geoip": "apple", "geosite": "apple", "outbound": "apple" }, { "geoip": "telegram", "geosite": "telegram", "outbound": "telegram" }, { "geoip": "bilibili", "geosite": "bilibili", "outbound": "bilibili" }, { "geoip": "netflix", "geosite": "netflix", "outbound": "netflix" }, { "geosite": "cn", "outbound": "cn" }, { "geosite": "geolocation-!cn", "outbound": "proxy" }, { "geoip": "cn", "outbound": "cn" } ],

日志

```console panic: runtime error: invalid memory address or nil pointer dereference [signal SIGSEGV: segmentation violation code=0x1 addr=0x20 pc=0x7a5d2644a0]

goroutine 6 [running]: github.com/sagernet/sing-box/outbound.(*URLTest).DialContext(0x40002c4000, {0x7a5d5fdc38, 0x7a5dd23380}, {0x7a5c90cb50, 0x3}, {{{0x0, 0x0}, 0x0}, 0x1bb, {0x40000a10d0, ...}}) github.com/sagernet/[email protected]/outbound/urltest.go:115 +0x80 github.com/sagernet/sing-box/outbound.(*Selector).DialContext(0x40000243c0, {0x7a5d5fdc38, 0x7a5dd23380}, {0x7a5c90cb50?, 0x4000072908?}, {{{0x0, 0x0}, 0x0}, 0x1bb, {0x40000a10d0, ...}}) github.com/sagernet/[email protected]/outbound/selector.go:125 +0x60 github.com/sagernet/sing-box/route.(*Router).downloadGeoIPDatabase.func1({0x7a5d5fdc38, 0x7a5dd23380}, {0x7a5c90cb50, 0x3}, {0x40000a10d0?, 0x0?}) github.com/sagernet/[email protected]/route/router_geo_resources.go:171 +0xb8 net/http.(*Transport).dial(0x0?, {0x7a5d5fdc38?, 0x7a5dd23380?}, {0x7a5c90cb50?, 0x0?}, {0x40000a10d0?, 0x0?}) net/http/transport.go:1183 +0xdc net/http.(*Transport).dialConn(0x400014e8c0, {0x7a5d5fdc38, 0x7a5dd23380}, {{}, 0x0, {0x40001c2120, 0x5}, {0x40000a10d0, 0xe}, 0x0}) net/http/transport.go:1625 +0x61c net/http.(*Transport).dialConnFor(0x7a5d282b40?, 0x40001c89a0) net/http/transport.go:1467 +0x7c created by net/http.(*Transport).queueForDial in goroutine 18 net/http/transport.go:1436 +0x380

</details>

kogekiplay avatar Sep 17 '23 14:09 kogekiplay

配置不完整

nekohasekai avatar Sep 17 '23 14:09 nekohasekai

配置不完整

"route": {
        "rules": [
            {
                "port": 53,
                "outbound": "dns-out"
            },
            {
                "clash_mode": "direct",
                "outbound": "direct"
            },
            {
                "clash_mode": "global",
                "outbound": "GLOBAL"
            },
            {
                "geoip": "google",
                "geosite": "google",
                "outbound": "google"
            },
            {
                "geoip": "apple",
                "geosite": "apple",
                "outbound": "apple"
            },
            {
                "geoip": "telegram",
                "geosite": "telegram",
                "outbound": "telegram"
            },
            {
                "geoip": "bilibili",
                "geosite": "bilibili",
                "outbound": "bilibili"
            },
            {
                "geoip": "netflix",
                "geosite": "netflix",
                "outbound": "netflix"
            },
            {
                "geosite": "cn",
                "outbound": "cn"
            },
            {
                "geosite": "geolocation-!cn",
                "outbound": "proxy"
            },
            {
                "geoip": "cn",
                "outbound": "cn"
            }
        ],
        "final": "final",
        "auto_detect_interface": true,
        "geoip": {
            "download_url": "https:\/\/github.com\/MetaCubeX\/meta-rules-dat\/releases\/download\/latest\/geoip-lite.db",
            "download_detour": "proxy"
        },
        "geosite": {
            "download_url": "https:\/\/github.com\/MetaCubeX\/meta-rules-dat\/releases\/download\/latest\/geosite.db",
            "download_detour": "proxy"
        }
    }, 

大佬,这是我的route配置,您看看是少配置了path吗

kogekiplay avatar Sep 17 '23 15:09 kogekiplay

配置不完整

"route": {
        "rules": [
            {
                "port": 53,
                "outbound": "dns-out"
            },
            {
                "clash_mode": "direct",
                "outbound": "direct"
            },
            {
                "clash_mode": "global",
                "outbound": "GLOBAL"
            },
            {
                "geoip": "google",
                "geosite": "google",
                "outbound": "google"
            },
            {
                "geoip": "apple",
                "geosite": "apple",
                "outbound": "apple"
            },
            {
                "geoip": "telegram",
                "geosite": "telegram",
                "outbound": "telegram"
            },
            {
                "geoip": "bilibili",
                "geosite": "bilibili",
                "outbound": "bilibili"
            },
            {
                "geoip": "netflix",
                "geosite": "netflix",
                "outbound": "netflix"
            },
            {
                "geosite": "cn",
                "outbound": "cn"
            },
            {
                "geosite": "geolocation-!cn",
                "outbound": "proxy"
            },
            {
                "geoip": "cn",
                "outbound": "cn"
            }
        ],
        "final": "final",
        "auto_detect_interface": true,
        "geoip": {
            "download_url": "https:\/\/github.com\/MetaCubeX\/meta-rules-dat\/releases\/download\/latest\/geoip-lite.db",
            "download_detour": "proxy"
        },
        "geosite": {
            "download_url": "https:\/\/github.com\/MetaCubeX\/meta-rules-dat\/releases\/download\/latest\/geosite.db",
            "download_detour": "proxy"
        }
    }, 

大佬,这是我的route配置,您看看是少配置了path吗

可以了,换了个反代的geoip url

kogekiplay avatar Sep 17 '23 15:09 kogekiplay