Closed HXHGTS closed 1 year ago
日志中可以明显看到sing-box有自动重启的情况,是在访问NewBing以后稳定出现的 协议采用了vless+xtls+reality,其它协议目前未测试
我这边也是1.5.0,win11使用reality访问newbing一切正常。你再补充一下客户端和服务端可复现问题的最简配置吧。还有就是你按照issue要求排版一下,你现在这个看起来有点乱
服务器配置:
{
"inbounds":[
{
"type":"vless",
"tag":"VLESS-TCP-XTLS-REALITY-INBOUND",
"listen":"::",
"listen_port":443,
"sniff":true,
"sniff_override_destination":true,
"sniff_timeout":"300ms",
"users":[
{
"uuid":"<UUID>",
"flow":"xtls-rprx-vision"
}
],
"tls":{
"enabled":true,
"server_name":"xxx",
"reality":{
"enabled":true,
"handshake":{
"server":"xxx",
"server_port":443
},
"private_key":"xxx",
"short_id":[
""
]
}
}
}
],
"outbounds":[
{
"tag":"DNS-OUTBOUND",
"type":"dns"
},
{
"tag":"GOOGLE_OUT",
"type":"direct",
"domain_strategy":"prefer_ipv4"
},
{
"tag":"INTERNET_OUT",
"type":"direct"
}
],
"route":{
"geosite":{
"download_url":"https://github.com/soffchen/sing-geosite/releases/latest/download/geosite.db",
"download_detour":"INTERNET_OUT"
},
"geoip":{
"download_url":"https://github.com/soffchen/sing-geoip/releases/latest/download/geoip.db",
"download_detour":"INTERNET_OUT"
},
"rules":[
{
"inbound":[
"VLESS-TCP-XTLS-REALITY-INBOUND"
],
"port":[
53,
5353,
9953
],
"protocol":[
"dns"
],
"outbound":"DNS-OUTBOUND"
},
{
"geosite":[
"google"
],
"outbound":"GOOGLE_OUT"
},
{
"geoip":[
"google"
],
"outbound":"GOOGLE_OUT"
}
],
"final":"INTERNET_OUT",
"auto_detect_interface":true
},
"dns":{
"servers":[
{
"tag":"LAN-DNS",
"address":"local",
"detour":"INTERNET_OUT"
}
],
"rules":[
],
"final":"",
"reverse_mapping":true
}
}
客户端配置
{
"inbounds":[
{
"type":"http",
"tag":"HTTP-INBOUND",
"listen":"::",
"listen_port":10808,
"sniff":true,
"sniff_override_destination":true,
"sniff_timeout":"300ms"
},
{
"type":"socks",
"tag":"SOCKS5-INBOUND",
"listen":"::",
"listen_port":10809,
"sniff":true,
"sniff_override_destination":true,
"sniff_timeout":"300ms"
}
],
"outbounds":[
{
"type":"dns",
"tag":"DNS-OUTBOUND"
},
{
"type":"block",
"tag":"REJECT"
},
{
"tag":"CHINA_OUT",
"type":"direct"
},
{
"tag":"INTERNET_OUT",
"type":"vless",
"server":"<SERVER>",
"server_port":443,
"uuid":"<UUID>",
"flow":"xtls-rprx-vision",
"tls":{
"enabled":true,
"server_name":"x",
"utls":{
"enabled":true,
"fingerprint":"chrome"
},
"reality":{
"enabled":true,
"public_key":"xxx",
"short_id":""
}
},
"packet_encoding":"xudp"
}
],
"route":{
"geosite":{
"path":".//geosite.db",
"download_url":"https://github.com/soffchen/sing-geosite/releases/latest/download/geosite.db",
"download_detour":"INTERNET_OUT"
},
"geoip":{
"path":".//geoip.db",
"download_url":"https://github.com/soffchen/sing-geoip/releases/latest/download/geoip.db",
"download_detour":"INTERNET_OUT"
},
"rules":[
{
"inbound":[
"DNS-INBOUND"
],
"outbound":"DNS-OUTBOUND"
},
{
"inbound":[
"HTTP-INBOUND",
"SOCKS5-INBOUND"
],
"port":[
53,
5353,
9953
],
"protocol":[
"dns"
],
"outbound":"DNS-OUTBOUND"
},
{
"domain_suffix":[
".msftncsi.com",
".msftconnecttest.com"
],
"outbound":"INTERNET_OUT"
},
{
"inbound":[
"HTTP-INBOUND",
"SOCKS5-INBOUND"
],
"domain":[
"myip.ipip.net"
],
"outbound":"INTERNET_OUT"
},
{
"geosite":[
"bing",
"google"
],
"outbound":"INTERNET_OUT"
},
{
"geoip":[
"google",
"telegram"
],
"outbound":"INTERNET_OUT"
},
{
"domain":[
"cn.pool.ntp.org"
],
"geosite":[
"bilibili",
"win-update",
"qihoo360",
"alibaba",
"jd",
"douyu",
"huya",
"baidu",
"iqiyi",
"bytedance",
"kuaishou",
"yuewen",
"zhihu",
"tencent",
"category-bank-cn",
"category-dev-cn",
"category-documents-cn",
"category-education-cn",
"category-media-cn",
"category-mooc-cn",
"category-scholar-cn",
"category-securities-cn",
"category-social-media-cn",
"netease",
"oppo",
"oneplus",
"xiaomi",
"huawei",
"chinamobile",
"chinaunicom",
"chinatelecom",
"chinabroadnet",
"chinaz",
"csdn",
"kingsoft",
"cn",
"private"
],
"outbound":"CHINA_OUT"
},
{
"geoip":[
"cn",
"private"
],
"outbound":"CHINA_OUT"
}
],
"final":"INTERNET_OUT",
"auto_detect_interface":true
},
"ntp":{
"enabled":true,
"server":"ntp.aliyun.com",
"server_port":123,
"interval":"60m",
"detour":"CHINA_OUT"
},
"dns":{
"servers":[
{
"tag":"google",
"address":"udp://8.8.8.8:53",
"strategy":"prefer_ipv4",
"detour":"INTERNET_OUT"
},
{
"tag":"isp",
"address":"local",
"strategy":"prefer_ipv6",
"detour":"CHINA_OUT"
}
],
"rules":[
{
"domain_suffix":[
".msftncsi.com",
".msftconnecttest.com"
],
"server":"google"
},
{
"geosite":[
"bing",
"google"
],
"server":"google"
},
{
"domain":[
"cn.pool.ntp.org"
],
"geosite":[
"bilibili",
"win-update",
"qihoo360",
"alibaba",
"jd",
"douyu",
"huya",
"baidu",
"iqiyi",
"bytedance",
"kuaishou",
"yuewen",
"zhihu",
"tencent",
"category-bank-cn",
"category-dev-cn",
"category-documents-cn",
"category-education-cn",
"category-media-cn",
"category-mooc-cn",
"category-scholar-cn",
"category-securities-cn",
"category-social-media-cn",
"netease",
"oppo",
"oneplus",
"xiaomi",
"huawei",
"chinamobile",
"chinaunicom",
"chinatelecom",
"chinabroadnet",
"chinaz",
"csdn",
"kingsoft",
"cn",
"private"
],
"server":"isp"
},
{
"outbound":[
"CHINA_OUT"
],
"server":"isp"
}
],
"final":"google",
"reverse_mapping":true
}
}
这个问题只在特定的软件版本(v1.5.0以上)才出现,v1.4.6之前是没有的
v2rayN的hy2节点,之前 v2rayN\bin\sing_box\ 为sing-box-1.4.6是没问题的,现在升级到1.5的时候就报错,详情如下
2023/09/30 21:32:47 系统代理设置改变ForcedClear panic: runtime error: invalid memory address or nil pointer dereference [signal 0xc0000005 code=0x0 addr=0x18 pc=0xebb9bc] goroutine 36 [running]: github.com/sagernet/sing/protocol/socks.HandleConnection0({0x16783f8, 0xc00028a9c0}, {0x167f790?, 0xc00007a098}, 0x0?, {0x0, 0x0}, {0x1aaf57f2700?, 0xc000002000}, {{0x0, ...}, ...}) pkg/mod/github.com/sagernet/sing@v0.2.12-0.20230925124400-0531fd63eaba/protocol/socks/handshake.go:113 +0x21c github.com/sagernet/sing/protocol/socks.HandleConnection({0x16783f8, 0xc00028a9c0}, {0x167f790?, 0xc00007a098?}, {0x0, 0x0}, {0x1aaf57f2700, 0xc000002000}, {{0x0, 0x0}, ...}) pkg/mod/github.com/sagernet/sing@v0.2.12-0.20230925124400-0531fd63eaba/protocol/socks/handshake.go:101 +0xff github.com/sagernet/sing-box/inbound.(Socks).NewConnection(, {, }, {, _}, {{0xc0001357c0, 0x5}, {0x14a9539, 0x5}, 0x0, ...}) /Users/sekai/Projects/sing-box/inbound/socks.go:45 +0x353 github.com/sagernet/sing-box/inbound.(myInboundAdapter).injectTCP(, {, _}, {{0xc0001357c0, 0x5}, {0x14a9539, 0x5}, 0x0, {0x0, 0x0}, ...}) /Users/sekai/Projects/sing-box/inbound/default_tcp.go:71 +0x1f8 created by github.com/sagernet/sing-box/inbound.(*myInboundAdapter).loopTCPIn in goroutine 53 /Users/sekai/Projects/sing-box/inbound/default_tcp.go:63 +0x345
2023/09/30 21:32:21 系统代理设置改变ForcedClear panic: runtime error: invalid memory address or nil pointer dereference [signal 0xc0000005 code=0x0 addr=0x18 pc=0xebb9bc] goroutine 50 [running]: github.com/sagernet/sing/protocol/socks.HandleConnection0({0x16783f8, 0xc00028a810}, {0x167f790?, 0xc00060c008}, 0x0?, {0x0, 0x0}, {0x21a6d8a9840?, 0xc0003b2000}, {{0x0, ...}, ...}) pkg/mod/github.com/sagernet/sing@v0.2.12-0.20230925124400-0531fd63eaba/protocol/socks/handshake.go:113 +0x21c github.com/sagernet/sing/protocol/socks.HandleConnection({0x16783f8, 0xc00028a810}, {0x167f790?, 0xc00060c008?}, {0x0, 0x0}, {0x21a6d8a9840, 0xc0003b2000}, {{0x0, 0x0}, ...}) pkg/mod/github.com/sagernet/sing@v0.2.12-0.20230925124400-0531fd63eaba/protocol/socks/handshake.go:101 +0xff github.com/sagernet/sing-box/inbound.(Socks).NewConnection(, {, }, {, _}, {{0xc0001b57c0, 0x5}, {0x14a9539, 0x5}, 0x0, ...}) /Users/sekai/Projects/sing-box/inbound/socks.go:45 +0x353 github.com/sagernet/sing-box/inbound.(myInboundAdapter).injectTCP(, {, _}, {{0xc0001b57c0, 0x5}, {0x14a9539, 0x5}, 0x0, {0x0, 0x0}, ...}) /Users/sekai/Projects/sing-box/inbound/default_tcp.go:71 +0x1f8 created by github.com/sagernet/sing-box/inbound.(*myInboundAdapter).loopTCPIn in goroutine 16 /Users/sekai/Projects/sing-box/inbound/default_tcp.go:63 +0x345
补充一下,v1.6.0-alpha.1已经恢复正常,不太明白问题在哪儿
等待 1.5.1 修复。
Operating system
Windows
System version
Windows11 22H2
Installation type
Original sing-box Command Line
If you are using a graphical client, please provide the version of the client.
No response
Description
sing-box最新的5.0版本在Windows11平台上访问h2相关网页,会导致sb核心短暂停止响应,访问http/1.1网页暂未发现问题 相同配置下1.4.6核心无此问题
Reproduction
1.使用sing-box1.5.0核心 2.打开http/2网站(Github、NewBing) 3.核心卡死,问题出现
Logs