Hacktoberfest 2026: le issue che i maintainer hanno segnato per ottobre, aperte e adatte ai principianti. Sfoglia le issue Hacktoberfest

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

Aperta Adatta ai principianti
#1,777 1 commento 5 reazioni 0 assegnatari Vedi su GitHub

I maintainer di solito rispondono entro 1 giorno

@amlaban65 ci sta già lavorando.

Dal 26/10/2026.

  • #1778 di @amlaban65 — aperta

Valutazione

Difficoltà
2/5
Tempo stimato
1-3 ore
Idoneità per principianti
85/100
Tipo di issue
Bug
Chiarezza
Specificata chiaramente
Stato di attività
Attiva
Stack tecnologico
go
Ambito
networking

Direzione di ricerca

Inizia da connection/connection.go#L25, dove il limite è impostato su math.MaxUint32, e ne vedi l'uso in connection/http2.go#L60-L62. Cambia la costante in math.MaxInt32. Aggiungi un test di regressione (ad esempio in connection/http2_test.go) che ispeziona il frame SETTINGS iniziale inviato al peer per confermare l'alto limite di stream. Fatto significa che il test passa e il frame SETTINGS mostra il valore previsto.

Scritto dal modello di indicizzazione a partire dal testo della issue.

Descrizione

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.

Lingua principale
Go
Stelle
16.3k
Fork
1.5k
Metriche di merge delle PR
Nessuna PR unita negli ultimi 30g

Preparare l'ambiente

Come iniziare

  1. Leggi tutta la issue e poi la guida ai contributi del progetto.
  2. Commenta sulla issue per dire che te ne occupi tu — evita che due persone facciano lo stesso lavoro.
  3. Fai un fork del repository e lavora su un branch.
  4. Apri una pull request che faccia riferimento al numero della issue.

Altre issue di cloudflare/cloudflared

Tutte le issue di cloudflare/cloudflared

Issue simili

Altre issue su Go

Ricevi le nuove issue nella tua casella

Un breve riepilogo di issue GitHub adatte ai principianti.