Hacktoberfest 2026: những issue maintainer đã đánh dấu cho tháng Mười, đang mở và phù hợp người mới. Xem issue Hacktoberfest

🐛 HTTP/2 tunnel concurrency silently falls to 250 streams with Go 1.27

Đang mở Phù hợp với người mới
#1,777 0 bình luận 0 reaction 0 người được giao Xem trên GitHub

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ả

Priority: Normal Type: Bug

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

  1. Use cloudflared 2026.10.3, which specifies Go 1.27.3 and golang.org/x/net v0.61.0.
  2. Run a tunnel with --protocol http2.
  3. 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:

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

Bắt đầu từ đâu

  1. Đọc hết issue, rồi đọc hướng dẫn đóng góp của dự án.
  2. 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.
  3. Fork repository và làm thay đổi trên một nhánh.
  4. Mở pull request có tham chiếu số hiệu của issue.

Issue khác của cloudflare/cloudflared

Tất cả issue của cloudflare/cloudflared

Issue tương tự

Thêm issue về Go

Nhận issue mới trong hộp thư của bạn

Bản tóm tắt ngắn những issue GitHub phù hợp với người mới.