sing-box
sing-box copied to clipboard
Unable to connect using HTTP/gRPC + multiplex
Operating system
macOS
System version
macOS 14.2.1 23C71 arm64
Installation type
Original sing-box Command Line
If you are using a graphical client, please provide the version of the client.
No response
Version
sing-box version 1.8.0-rc.6
Environment: go1.21.5 darwin/arm64
Tags: with_quic,with_grpc,with_dhcp,with_wireguard,with_ech,with_utls,with_reality_server,with_acme,with_clash_api,with_v2ray_api,with_gvisor
CGO: enabled
Description
HTTP/gRPC + multiplex seem incompatible. Removing either of them will restore network connections.
Reproduction
On same machine:
server.json
{
"log": {
"level": "trace",
"timestamp": true
},
"inbounds": [
{
"type": "vless",
"listen": "::",
"listen_port": 443,
"users": [
{
"uuid": "48c40d66-b5ed-4181-acb4-a01ab1e59f7e"
}
],
"tls": {
"enabled": true,
"server_name": "addons.mozilla.org",
"reality": {
"enabled": true,
"handshake": {
"server": "addons.mozilla.org",
"server_port": 443
},
"private_key": "KHMkl0n-NX62PdvDePSSEm67jrQzdW8Ai_AYi64FtHY",
"short_id": [
"d34db33f"
]
}
},
"transport": {
"type": "http"
},
"multiplex": {
"enabled": true,
"padding": true
}
}
],
"outbounds": [
{
"type": "direct"
}
]
}
client.json
{
"outbounds": [
{
"type": "vless",
"server": "::1",
"server_port": 443,
"uuid": "48c40d66-b5ed-4181-acb4-a01ab1e59f7e",
"tls": {
"enabled": true,
"server_name": "addons.mozilla.org",
"utls": {
"enabled": true,
"fingerprint": "chrome"
},
"reality": {
"enabled": true,
"public_key": "RuInAfvwciF_P8AIkIEX6T45hr2t1X15a3kpX0Cx2XY",
"short_id": "d34db33f"
}
},
"transport": {
"type": "http"
},
"multiplex": {
"enabled": true,
"padding": true
}
}
]
}
sing-box run -c server.json
sing-box tools fetch baidu.com -c client.json
Logs
server
❯ sing-box run -c experiments/vless-reality-h2/server.json
+0800 2023-12-26 22:45:45 INFO router: updated default interface en0, index 15
+0800 2023-12-26 22:45:45 INFO inbound/vless[0]: tcp server started at [::]:443
+0800 2023-12-26 22:45:45 INFO sing-box started (0.00s)
+0800 2023-12-26 22:45:49 DEBUG dns: lookup domain addons.mozilla.org
+0800 2023-12-26 22:45:49 DEBUG dns: lookup succeed for addons.mozilla.org: 18.65.3.10 18.65.3.103 18.65.3.106 18.65.3.64
+0800 2023-12-26 22:45:49 INFO [3430856783 0ms] inbound/vless[0]: inbound connection from [::1]:49976
+0800 2023-12-26 22:45:49 DEBUG [3430856783 0ms] inbound/vless[0]: connection closed: process connection from [::1]:49976: use of closed network connection
client
❯ sing-box tools fetch https://www.baidu.com -c experiments/vless-reality-h2/client.j
son
INFO[0000] router: updated default interface en0, index 15
INFO[0000] sing-box pre-started (0.00s)
INFO[0000] outbound/vless[0]: outbound multiplex connection to www.baidu.com:443
INFO[0000] outbound/vless[0]: outbound connection to sp.mux.sing-box.arpa:444
FATAL[0000] Get "https://www.baidu.com": io: read/write on closed pipe
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.