Repository navigation
caddyhttp: expose initial_packet_size and disable_pmtud QUIC options (#8175) - #8230
Closed
ronitgupta138 wants to merge 1 commit into
Closed
ronitgupta138 wants to merge 1 commit into
ronitgupta138 wants to merge 1 commit into
Conversation
…8175) - Add InitialPacketSize and DisablePathMTUDiscovery fields to caddyhttp.Server - Pass options through caddy.ListenQUICOptions and populate quic.Config - Support initial_packet_size and disable_pmtud in Caddyfile servers block - Add unit tests for listener options, server QUIC config, JSON marshaling, and Caddyfile parsing Signed-off-by: Ronit Gupta <ronitgupta138@gmail.com>
Member
|
Fails basic correctness. Duplicate code and such all over the place. |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Description
Resolves #8175 by exposing
initial_packet_sizeanddisable_pmtudoptions incaddyhttp.Serverand the Caddyfileserversblock.When path MTU discovery (RFC 8899) overshoots or fails on certain client paths (such as cellular or fixed-wireless networks without black-hole recovery), QUIC packets get dropped and HTTP/3 connections stall. In quic-go,
InitialPacketSizeacts as a lower bound, and only disabling PMTUD prevents subsequent packet growth beyond that initial size.Changes:
modules/caddyhttp/server.go): AddedInitialPacketSize uint16(json:"initial_packet_size,omitempty") andDisablePathMTUDiscovery bool(json:"disable_pmtud,omitempty").listeners.go&modules/caddyhttp/server.go): Added options tocaddy.ListenQUICOptions, passing them totr.ListenEarlyon the underlying QUIC transport, and applied them tohttp3.Server.QUICConfiginbuildHTTP3ServerWithWebTransport.caddyconfig/httpcaddyfile/serveroptions.go): Supportedinitial_packet_size <size>anddisable_pmtudin theserversglobal block, both as direct directives and inside aquic { ... }block, with validation for byte sizes between 1200 and 65535.listeners_test.go,modules/caddyhttp/server_test.go, andmodules/caddyhttp/caddyfile_test.go.Assistance Disclosure
I authored the code and tests with AI assistance, and verified all changes against the Caddy test suite.