🐛 HTTP/2 tunnel concurrency silently falls to 250 streams with Go 1.27
Maintainer thường phản hồi trong vòng 1 ngày
Chưa có ai nhận issue này.
Đánh giá
- Độ khó
- 2/5
- Thời gian dự kiến
- 1-3 giờ
- Mức phù hợp với người mới
- 85/100
- Loại issue
- Lỗi
- Độ rõ ràng
- Đặc tả rõ ràng
- Mức độ hoạt động
- Sôi nổi
- Công nghệ
- go
- Lĩnh vực
- networking
Hướng nghiên cứu
Bắt đầu tại connection/connection.go#L25, nơi giới hạn được đặt là math.MaxUint32, và xem cách nó được dùng trong connection/http2.go#L60-L62. Thay đổi hằng số thành math.MaxInt32. Thêm một bài kiểm thử hồi quy (ví dụ, trong connection/http2_test.go) kiểm tra frame SETTINGS ban đầu gửi cho peer để xác nhận giới hạn stream cao. Hoàn thành có nghĩa là bài kiểm thử thành công và frame SETTINGS hiển thị giá trị mong muốn.
Do mô hình lập chỉ mục viết ra từ nội dung của issue.
Mô tả
Describe the bug
Cloudflared sets its HTTP/2 tunnel server's MaxConcurrentStreams to math.MaxUint32, but its current Go HTTP/2 implementation silently replaces that value with the default of 250.
This limits each HTTP/2 tunnel connection to 250 concurrent streams. Long-lived requests can fill those slots and reduce capacity for other traffic.
To Reproduce
- Use cloudflared 2026.10.3, which specifies Go 1.27.3 and golang.org/x/net v0.61.0.
- Run a tunnel with --protocol http2.
- Inspect the tunnel server's initial HTTP/2 SETTINGS frame. The source indicates that SETTINGS_MAX_CONCURRENT_STREAMS will be 250, although cloudflared configures math.MaxUint32.
This happened in our production environment and required us to release a custom build with http2legacy tag for now.
If it's an issue with Cloudflare Tunnel:
4. Tunnel ID : N/A
5. cloudflared config: N/A
Expected behavior
The HTTP/2 tunnel server should preserve the intended high stream limit instead of silently falling back to 250.
Using math.MaxInt32 would avoid the fallback in the current Go implementation.
Environment and versions
- Architecture: The code path affects both 64-bit and 32-bit builds.
- Version: cloudflared 2026.10.3
- Go version specified in go.mod: 1.27.3
- golang.org/x/net version: v0.61.0
Logs and errors
Verified locally on macOS arm64 using Go 1.27.3 and golang.org/x/net v0.61.0:
- math.MaxUint32 advertises 250 concurrent streams.
- math.MaxInt32 correctly advertises 2147483647.
- With the http2legacy build tag, math.MaxUint32 correctly advertises 4294967295.
The local reproducer uses the same http2.Server setting and ServeConn API as cloudflared.
Additional context
The relevant code is:
- Cloudflared sets the limit to math.MaxUint32.
- The HTTP/2 tunnel server uses that limit.
- The Go 1.27 adapter converts the value to int.
- Go replaces values above math.MaxInt32 with the default.
- That default is 250.
Please consider changing the configured limit to math.MaxInt32 and adding a regression test that checks the SETTINGS frame actually sent to the peer. Checking the server's configured field alone would miss this problem.
- Ngôn ngữ chính
- Go
- Star
- 16.2k
- Fork
- 1.5k
- Chỉ số merge pull request
- Không có pull request nào được merge trong 30 ngày
Chuẩn bị môi trường
- Có Dockerfile hoặc tệp Docker Compose
- Không có mẫu pull request
- Đọc hướng dẫn đóng góp
Bắt đầu từ đâu
- Đọc hết issue, rồi đọc hướng dẫn đóng góp của dự án.
- Bình luận trên issue rằng bạn sẽ nhận — tránh hai người làm cùng một việc.
- Fork repository và làm thay đổi trên một nhánh.
- Mở pull request có tham chiếu số hiệu của issue.
Issue khác của cloudflare/cloudflared
-
🐛 --output json writes invalid JSON lines when events are logged concurrentlyCó thể đã có người làm @theolujay đã nhận 15 ngày trước. Đang mở
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 78/100
cloudflare/cloudflared#1761 · 5 bình luận ·
Maintainer thường phản hồi trong vòng 1 ngày
-
🐛 cfRay is missing from proxied request logs (newHTTPLogger discards the zerolog context)Có thể đã có người làm @pankajc46 đã nhận 17 ngày trước. Đang mở
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 82/100
cloudflare/cloudflared#1756 · 1 bình luận ·
Maintainer thường phản hồi trong vòng 1 ngày
-
🐛 After SIGTERM, `cloudflared tunnel run` uses 100% of one CPU core for the whole graceful-shutdown periodCó thể đã có người làm @cyphercodes đã nhận 18 ngày trước. Đang mởPriority: Normal Type: Bug
Độ khó 1/5 Dưới một giờ Mức phù hợp với người mới 88/100
cloudflare/cloudflared#1753 · 3 bình luận ·
Maintainer thường phản hồi trong vòng 1 ngày
-
tunnel route ip show: --filter-network-is-subset-of sends the superset filterCó thể đã có người làm @wangyusheng1985 đã nhận 18 ngày trước. Đang mở
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 92/100
cloudflare/cloudflared#1750 ·
Maintainer thường phản hồi trong vòng 1 ngày
-
🐛 QUIC Hijack() skips the status-written check that HTTP/2 enforcesCó thể đã có người làm @dedsec-terminal đã nhận 11 ngày trước. Đang mở
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 78/100
cloudflare/cloudflared#1748 · 1 bình luận ·
Maintainer thường phản hồi trong vòng 1 ngày
Tất cả issue của cloudflare/cloudflared
Issue tương tự
-
fix(handlers): explicitly set Content-Type header in static Index handlerCó thể đã có người làm @kage-zero đã nhận hôm nay. Đang mở
Độ khó 1/5 Dưới một giờ Mức phù hợp với người mới 85/100
Maintainer thường phản hồi trong vòng 1 ngày
-
Quick Open: restore dependency-directory exclusions in filesystem fallbackCó thể đã có người làm Có pull request liên kết đang mở hoặc đã được merge. Đang mở
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 82/100
eugenioenko/ttt#1206 ·
Maintainer thường phản hồi trong vòng 1 ngày
-
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 68/100
open-policy-agent/opa#9426 ·
Maintainer thường phản hồi trong vòng 1 ngày
-
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 72/100
rorkai/App-Store-Connect-CLI#3192 ·
Maintainer thường phản hồi trong vòng 1 ngày
-
t:urlDecodeUni does not map U+3002 and U+FF61 to a dot, unlike ModSecurityCó thể đã có người làm @fzipi đã nhận hôm nay. Đang mởbug
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 78/100
Maintainer thường phản hồi trong vòng 1 ngày