XHTTP/3 inbound: the default of 100 QUIC streams per connection stalls packet-up uploads
メンテナーはふだん 1 日以内に返信
まだ誰も着手していません。
- #7440 @earmark-halt による — マージされずにクローズ
評価
- 難易度
- 2/5
- 見積もり時間
- 1〜3時間
- 初心者へのやさしさ
- 62/100
- issue の種類
- バグ
- 明瞭さ
- 明確に書かれている
- 活発さ
- 活発
- 領域
- networking
調査の方向性
ストリーム数のデフォルト上限は、transport/internet/splithttp/hub.go の 494 行目付近で quic-go に渡されており、quicParams.maxIncomingStreams が QUIC 設定にコピーされています。まずそこから確認し、次に issue にある Python スクリプトをクライアントとサーバーの設定に対して実行して、セッション 100 で停止する現象を再現してください。h3 上の packet-up が 100 セッションを超えても応答を返し続け、変更が issue の表にある stream-one と h2 のケースで確認できれば完了です。
索引モデルが issue の本文から書いたものです。
説明
Integrity requirements
- I have read all the comments in the issue template and ensured that this issue meet the requirements.
- 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.
- I provided the complete config and logs, rather than just providing the truncated parts based on my own judgment.
- I searched issues and did not find any similar issues.
- The problem can be successfully reproduced in the latest Release
Description
An XHTTP/3 inbound passes quicParams.maxIncomingStreams to quic-go unchanged (transport/internet/splithttp/hub.go:494 on main). When it is not set, quic-go's default applies: 100 bidirectional streams per connection.
Every XHTTP session keeps one stream open for its whole life, and in packet-up each upload request needs one more. Once a QUIC connection carries 100 sessions, no session on it can upload any more, including the ones that had been working. In stream-one the existing sessions keep working and only new ones wait.
Results with the official v26.11.9 binary, loopback, using the configs below. The client is limited to one connection (xmux.maxConnections: 1) only to keep the test small:
| Case | Result |
|---|---|
| packet-up over h3 | session 100 gets no reply; sessions 1, 2 and 50, opened earlier, get no reply when they send again |
stream-one over h3 (same configs, mode changed) |
session 101 gets no reply; sessions 1, 2 and 50 still get replies |
| packet-up over h2 (same configs, ALPN changed) | all 110 sessions get replies |
packet-up over h3, server with finalmask.quicParams.maxIncomingStreams: 4096 |
all 110 sessions get replies |
With the client's default XMUX settings (no xmux in the config, so 3 connections), tested on main at c4561418: sessions that send one request and then stay open reached the first failure at session 254, 259 and 289 in three runs, and 99 sessions that had been working could no longer upload. Sessions that each sent 12 requests before going idle did not reach it within 700 sessions, because the client retires a connection after 600 to 900 requests.
HTTP/2 inbounds are not affected: at the server's stream limit the client opens another TCP connection.
A possible fix is a large default when the value is not set. With this change on main, 400 sessions with default client settings all kept working:
--- a/transport/internet/splithttp/hub.go
+++ b/transport/internet/splithttp/hub.go
@@ -495,6 +495,12 @@
DisablePathMTUDiscovery: quicParams.DisablePathMtuDiscovery || (runtime.GOOS != "linux" && runtime.GOOS != "windows" && runtime.GOOS != "darwin"),
}
+ if quicConfig.MaxIncomingStreams == 0 {
+ // quic-go's default of 100 is per connection, and every session holds one stream for its
+ // whole lifetime, while packet-up needs one more stream for each upload request.
+ quicConfig.MaxIncomingStreams = 1 << 16
+ }
+
var k *quic.StatelessResetKey
if !quicParams.DisableStatelessReset {
k = &quic.StatelessResetKey{}
Prepared with the assistance of Claude (Anthropic). Every result above comes from a run described here.
Reproduction Method
- Start the server and the client with the configs below (official v26.11.9
Xray-linux-64). - Run this script. It starts an echo server on 127.0.0.1:9002, opens connections one by one through the client's dokodemo-door inbound, sends
pingon each and keeps them all open.
import socket, threading
def echo_server():
s = socket.create_server(("127.0.0.1", 9002))
while True:
c, _ = s.accept()
threading.Thread(target=lambda c=c: [c.sendall(d) for d in iter(lambda: c.recv(65536), b"")], daemon=True).start()
def ping(c, timeout):
c.settimeout(timeout)
c.sendall(b"ping")
try:
return c.recv(4) == b"ping"
except socket.timeout:
return False
threading.Thread(target=echo_server, daemon=True).start()
conns = []
for i in range(1, 111):
c = socket.create_connection(("127.0.0.1", 7002)) # dokodemo-door -> VLESS + XHTTP/3 -> echo
conns.append(c)
if not ping(c, 5):
print("session", i, "got no reply")
break
else:
print("all", len(conns), "sessions got a reply")
for i in (1, 2, 50):
if i < len(conns):
print("session", i, "opened earlier, sends again:", "reply" if ping(conns[i - 1], 5) else "no reply")
Output with the configs below:
session 100 got no reply
session 1 opened earlier, sends again: no reply
session 2 opened earlier, sends again: no reply
session 50 opened earlier, sends again: no reply
Client config
{
"log": {
"loglevel": "debug",
"dnsLog": true
},
"inbounds": [
{
"listen": "127.0.0.1",
"port": 7002,
"protocol": "dokodemo-door",
"settings": {
"address": "127.0.0.1",
"port": 9002,
"network": "tcp"
}
}
],
"outbounds": [
{
"protocol": "vless",
"settings": {
"vnext": [
{
"address": "127.0.0.1",
"port": 8443,
"users": [
{
"id": "5783a3e7-e373-51cd-8642-c83782b807c5",
"encryption": "none"
}
]
}
]
},
"streamSettings": {
"network": "xhttp",
"security": "tls",
"tlsSettings": {
"serverName": "localhost",
"alpn": [
"h3"
],
"pinnedPeerCertSha256": "e08ee1e68bad3a9a890e931e6f25e6e1bd11e4de376e1d5742fa4173abb523ff"
},
"xhttpSettings": {
"path": "/xh",
"mode": "packet-up",
"xmux": {
"maxConnections": 1
}
}
}
}
]
}
Server config
{
"log": {
"loglevel": "debug",
"dnsLog": true
},
"inbounds": [
{
"listen": "127.0.0.1",
"port": 8443,
"protocol": "vless",
"settings": {
"clients": [
{
"id": "5783a3e7-e373-51cd-8642-c83782b807c5"
}
],
"decryption": "none"
},
"streamSettings": {
"network": "xhttp",
"security": "tls",
"tlsSettings": {
"alpn": [
"h3"
],
"certificates": [
{
"certificate": [
"-----BEGIN CERTIFICATE-----",
"MIIBkjCCATmgAwIBAgIUAr1AxAZbm4w0Z+7hV+BMWcHqcU4wCgYIKoZIzj0EAwIw",
"FDESMBAGA1UEAwwJbG9jYWxob3N0MB4XDTI2MTExNDA0MzIxMFoXDTI2MTIxNDA0",
"MzIxMFowFDESMBAGA1UEAwwJbG9jYWxob3N0MFkwEwYHKoZIzj0CAQYIKoZIzj0D",
"AQcDQgAEd2A6GRamf2wRCSilQRnvjCSqQfTXefCZsMdwzAdYXqjNEQLmh6w941n+",
"chw3bYap74dnhnuP1i8VPIjxSVPSI6NpMGcwHQYDVR0OBBYEFE9Viai2yha2ZF5p",
"qlBsBDLG/TKtMB8GA1UdIwQYMBaAFE9Viai2yha2ZF5pqlBsBDLG/TKtMA8GA1Ud",
"EwEB/wQFMAMBAf8wFAYDVR0RBA0wC4IJbG9jYWxob3N0MAoGCCqGSM49BAMCA0cA",
"MEQCIAplgNqNVOL6waUhuh4CIOkOKuGFqRgrq1cVnecnaUStAiBDgPQ4r+Y6sgLS",
"4IWoyNqH4q9iojDNugxURCOQrpblzQ==",
"-----END CERTIFICATE-----"
],
"key": [
"-----BEGIN PRIVATE KEY-----",
"MIGHAgEAMBMGByqGSM49AgEGCCqGSM49AwEHBG0wawIBAQQgs+4kfGaYz+7ooJkf",
"e83tzmgE23XWNrWQxYPmpsgXqeihRANCAAR3YDoZFqZ/bBEJKKVBGe+MJKpB9Nd5",
"8Jmwx3DMB1heqM0RAuaHrD3jWf5yHDdthqnvh2eGe4/WLxU8iPFJU9Ij",
"-----END PRIVATE KEY-----"
]
}
]
},
"xhttpSettings": {
"path": "/xh"
}
}
}
],
"outbounds": [
{
"protocol": "freedom",
"settings": {
"finalRules": [
{
"action": "allow"
}
]
}
}
]
}
Client log
The complete debug logs of this run are 68 KB (client) and 81 KB (server), more than an issue can hold, so they are here unmodified: https://gist.github.com/AlenHay/93571c075379b2da6a7b5360af61d089
The last 30 lines of the client log:
2026/11/14 05:32:22.071509 from 127.0.0.1:45488 accepted tcp:127.0.0.1:9002
2026/11/14 05:32:22.071514 [Info] [1058731554] proxy/dokodemo: received request for 127.0.0.1:45488
2026/11/14 05:32:22.071517 [Info] [1058731554] app/dispatcher: default route for tcp:127.0.0.1:9002
2026/11/14 05:32:22.071519 [Info] [1058731554] transport/internet/splithttp: XHTTP is dialing to udp:127.0.0.1:8443, mode packet-up, HTTP version 3, host localhost
2026/11/14 05:32:22.071522 [Info] [1058731554] proxy/vless/outbound: tunneling request to tcp:127.0.0.1:9002 via 127.0.0.1:8443
2026/11/14 05:32:22.072193 [Debug] [1724932045] proxy/dokodemo: processing connection from: 127.0.0.1:45498
2026/11/14 05:32:22.072198 [Info] [1724932045] proxy/dokodemo: received request for 127.0.0.1:45498
2026/11/14 05:32:22.072201 [Info] [1724932045] app/dispatcher: default route for tcp:127.0.0.1:9002
2026/11/14 05:32:22.072203 [Info] [1724932045] transport/internet/splithttp: XHTTP is dialing to udp:127.0.0.1:8443, mode packet-up, HTTP version 3, host localhost
2026/11/14 05:32:22.072206 [Info] [1724932045] proxy/vless/outbound: tunneling request to tcp:127.0.0.1:9002 via 127.0.0.1:8443
2026/11/14 05:32:22.072208 from 127.0.0.1:45498 accepted tcp:127.0.0.1:9002
2026/11/14 05:32:22.073731 from 127.0.0.1:45508 accepted tcp:127.0.0.1:9002
2026/11/14 05:32:22.073744 [Debug] [4048388148] proxy/dokodemo: processing connection from: 127.0.0.1:45508
2026/11/14 05:32:22.073748 [Info] [4048388148] proxy/dokodemo: received request for 127.0.0.1:45508
2026/11/14 05:32:22.073750 [Info] [4048388148] app/dispatcher: default route for tcp:127.0.0.1:9002
2026/11/14 05:32:22.073753 [Info] [4048388148] transport/internet/splithttp: XHTTP is dialing to udp:127.0.0.1:8443, mode packet-up, HTTP version 3, host localhost
2026/11/14 05:32:22.073756 [Info] [4048388148] proxy/vless/outbound: tunneling request to tcp:127.0.0.1:9002 via 127.0.0.1:8443
2026/11/14 05:32:22.075483 [Debug] [426136640] proxy/dokodemo: processing connection from: 127.0.0.1:45514
2026/11/14 05:32:22.075490 from 127.0.0.1:45514 accepted tcp:127.0.0.1:9002
2026/11/14 05:32:22.075494 [Info] [426136640] proxy/dokodemo: received request for 127.0.0.1:45514
2026/11/14 05:32:22.075502 [Info] [426136640] app/dispatcher: default route for tcp:127.0.0.1:9002
2026/11/14 05:32:22.075509 [Info] [426136640] transport/internet/splithttp: XHTTP is dialing to udp:127.0.0.1:8443, mode packet-up, HTTP version 3, host localhost
2026/11/14 05:32:22.075564 [Info] [426136640] proxy/vless/outbound: tunneling request to tcp:127.0.0.1:9002 via 127.0.0.1:8443
2026/11/14 05:32:22.076449 from 127.0.0.1:45526 accepted tcp:127.0.0.1:9002
2026/11/14 05:32:22.076462 [Debug] [149318371] proxy/dokodemo: processing connection from: 127.0.0.1:45526
2026/11/14 05:32:22.076466 [Info] [149318371] proxy/dokodemo: received request for 127.0.0.1:45526
2026/11/14 05:32:22.076469 [Info] [149318371] app/dispatcher: default route for tcp:127.0.0.1:9002
2026/11/14 05:32:22.076471 [Info] [149318371] transport/internet/splithttp: XHTTP is dialing to udp:127.0.0.1:8443, mode packet-up, HTTP version 3, host localhost
2026/11/14 05:32:22.076474 [Info] [149318371] proxy/vless/outbound: tunneling request to tcp:127.0.0.1:9002 via 127.0.0.1:8443
2026/11/14 05:32:42.103203 [Debug] app/log: Logger closing
Server log
Complete log: https://gist.github.com/AlenHay/93571c075379b2da6a7b5360af61d089
The last 30 lines of the server log:
2026/11/14 05:32:22.071796 [Info] [2917082436] transport/internet/tcp: dialing TCP to tcp:127.0.0.1:9002
2026/11/14 05:32:22.071797 [Debug] [2917082436] transport/internet: dialing to tcp:127.0.0.1:9002
2026/11/14 05:32:22.071800 from 127.0.0.1:59948 accepted tcp:127.0.0.1:9002
2026/11/14 05:32:22.071860 [Info] [2917082436] proxy/freedom: connection opened to tcp:127.0.0.1:9002, local endpoint 127.0.0.1:34752, remote endpoint 127.0.0.1:9002
2026/11/14 05:32:22.071869 [Debug] [2917082436] proxy: CopyRawConn (maybe) readv
2026/11/14 05:32:22.073169 [Info] [3947852290] proxy/vless/inbound: firstLen = 30
2026/11/14 05:32:22.073182 [Info] [3947852290] proxy/vless/inbound: received request for tcp:127.0.0.1:9002
2026/11/14 05:32:22.073185 [Info] [3947852290] app/dispatcher: default route for tcp:127.0.0.1:9002
2026/11/14 05:32:22.073188 [Info] [3947852290] transport/internet/tcp: dialing TCP to tcp:127.0.0.1:9002
2026/11/14 05:32:22.073190 [Debug] [3947852290] transport/internet: dialing to tcp:127.0.0.1:9002
2026/11/14 05:32:22.073206 from 127.0.0.1:59948 accepted tcp:127.0.0.1:9002
2026/11/14 05:32:22.073316 [Info] [3947852290] proxy/freedom: connection opened to tcp:127.0.0.1:9002, local endpoint 127.0.0.1:34766, remote endpoint 127.0.0.1:9002
2026/11/14 05:32:22.073320 [Debug] [3947852290] proxy: CopyRawConn (maybe) readv
2026/11/14 05:32:22.074474 from 127.0.0.1:59948 accepted tcp:127.0.0.1:9002
2026/11/14 05:32:22.074665 [Info] [4053786092] proxy/vless/inbound: firstLen = 30
2026/11/14 05:32:22.074702 [Info] [4053786092] proxy/vless/inbound: received request for tcp:127.0.0.1:9002
2026/11/14 05:32:22.074707 [Info] [4053786092] app/dispatcher: default route for tcp:127.0.0.1:9002
2026/11/14 05:32:22.074711 [Info] [4053786092] transport/internet/tcp: dialing TCP to tcp:127.0.0.1:9002
2026/11/14 05:32:22.074715 [Debug] [4053786092] transport/internet: dialing to tcp:127.0.0.1:9002
2026/11/14 05:32:22.074720 [Info] [4053786092] proxy/freedom: connection opened to tcp:127.0.0.1:9002, local endpoint 127.0.0.1:34782, remote endpoint 127.0.0.1:9002
2026/11/14 05:32:22.074724 [Debug] [4053786092] proxy: CopyRawConn (maybe) readv
2026/11/14 05:32:22.075897 [Info] [184499830] proxy/vless/inbound: firstLen = 30
2026/11/14 05:32:22.075904 [Info] [184499830] proxy/vless/inbound: received request for tcp:127.0.0.1:9002
2026/11/14 05:32:22.075904 from 127.0.0.1:59948 accepted tcp:127.0.0.1:9002
2026/11/14 05:32:22.075907 [Info] [184499830] app/dispatcher: default route for tcp:127.0.0.1:9002
2026/11/14 05:32:22.075915 [Info] [184499830] transport/internet/tcp: dialing TCP to tcp:127.0.0.1:9002
2026/11/14 05:32:22.075919 [Debug] [184499830] transport/internet: dialing to tcp:127.0.0.1:9002
2026/11/14 05:32:22.075975 [Info] [184499830] proxy/freedom: connection opened to tcp:127.0.0.1:9002, local endpoint 127.0.0.1:34792, remote endpoint 127.0.0.1:9002
2026/11/14 05:32:22.075980 [Debug] [184499830] proxy: CopyRawConn (maybe) readv
2026/11/14 05:32:42.103206 [Debug] app/log: Logger closing
- 主要言語
- Go
- スター
- 43.3k
- フォーク
- 6.2k
- 平均マージ
- 2日 11時間
- マージ済み PR(30日)
- 55
環境構築
- Dockerfile・Docker Compose ファイルなし
- プルリクエストのテンプレートあり
- コントリビューションガイドを読む
はじめの一歩
- issue を最後まで読み、次にプロジェクトのコントリビューションガイドを読みます。
- 着手することを issue にコメントします — 二人が同じ作業をするのを防げます。
- リポジトリをフォークし、ブランチを切って変更します。
- issue 番号を参照したプルリクエストを送ります。
XTLS/Xray-core のほかの issue
-
XHTTP over HTTP/3 with `finalmask.quicParams.congestion: "brutal"` panics at the first dial; `-test` passes対応中かも このイシューにリンクされたプルリクエストがオープン中、またはマージ済みです。 オープン
難易度 2/5 1〜3時間 初心者へのやさしさ 74/100
メンテナーはふだん 1 日以内に返信
-
Hysteria outbound without `settings.address` panics with nil pointer dereference at the first dial; `-test` passes対応中かも このイシューにリンクされたプルリクエストがオープン中、またはマージ済みです。 オープン
難易度 2/5 1〜3時間 初心者へのやさしさ 78/100
メンテナーはふだん 1 日以内に返信
-
難易度 2/5 1〜3時間 初心者へのやさしさ 76/100
メンテナーはふだん 1 日以内に返信
-
難易度 2/5 1〜3時間 初心者へのやさしさ 78/100
メンテナーはふだん 1 日以内に返信
-
難易度 2/5 1〜3時間 初心者へのやさしさ 78/100
メンテナーはふだん 1 日以内に返信
似ている issue
-
kind: for-triage
難易度 2/5 1〜3時間 初心者へのやさしさ 74/100
monumental-archive/.github#2279 ·
メンテナーはふだん 1 日以内に返信
-
難易度 2/5 1〜3時間 初心者へのやさしさ 88/100
メンテナーはふだん 1 日以内に返信
-
[Docs] Fix duplicate /gRPC protocol suffix and Kubernetes typo on Architecture page対応中かも @Apocalypse10110 が今日担当しました。 オープンarea/docs framework/hugo help wanted language/markdown
難易度 1/5 1時間未満 初心者へのやさしさ 80/100
meshery/meshery#24946 · コメント 4 件 ·
メンテナーはふだん 1 日以内に返信
-
clawsweeper:fix-shape-clear clawsweeper:queueable-fix clawsweeper:source-repro impact:other issue-rating: 🦞 diamond lobster no-stale P2
難易度 2/5 1〜3時間 初心者へのやさしさ 78/100
openclaw/crabbox#3249 · コメント 1 件 · リアクション 1 件 ·
メンテナーはふだん 1 日以内に返信
-
enhancement
難易度 2/5 1〜3時間 初心者へのやさしさ 68/100