feat(triple): add server http3 quic config helper#3299
Conversation
Codecov Report❌ Patch coverage is Additional details and impacted files@@ Coverage Diff @@
## develop #3299 +/- ##
===========================================
+ Coverage 46.76% 51.27% +4.50%
===========================================
Files 295 486 +191
Lines 17172 36403 +19231
===========================================
+ Hits 8031 18665 +10634
- Misses 8287 16238 +7951
- Partials 854 1500 +646 ☔ View full report in Codecov by Sentry. 🚀 New features to boost your workflow:
|
There was a problem hiding this comment.
Pull request overview
Adds minimal server-side HTTP/3 (QUIC) configuration support by extending global.Http3Config, introducing a helper to translate those settings into quic.Config, and wiring it into Triple server startup paths, with targeted unit tests.
Changes:
- Extended
global.Http3Configwith QUIC tuning fields (keep-alive period, idle timeout, incoming stream limits). - Added
newQUICConfighelper to mapHttp3Config→quic.Config(with duration parsing + errors). - Wired QUIC config helper into
startHttp3/startHttp2AndHttp3and added tests for mapping + error propagation.
Reviewed changes
Copilot reviewed 5 out of 5 changed files in this pull request and generated 2 comments.
Show a summary per file
| File | Description |
|---|---|
global/http3_config.go |
Adds new HTTP/3/QUIC config fields, defaults, and clone behavior. |
global/config_test.go |
Expands clone/default tests to cover the new HTTP/3 fields. |
protocol/triple/triple_protocol/http3_config.go |
Introduces newQUICConfig helper that parses and maps config into quic.Config. |
protocol/triple/triple_protocol/server.go |
Uses newQUICConfig in HTTP/3 startup paths instead of an empty QUIC config. |
protocol/triple/triple_protocol/server_test.go |
Adds unit tests for mapping and for startup paths returning parse errors. |
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
|
面向用户的api是不是还没暴露出去 |
分层做:PR1 先暴露配置入口并打通 server 侧实现,暂时没有新增 triple.WithXXX(...) 这类 option API,后续再补更完整的面向用户代码级入口。如果说的是 YAML/JSON / global.TripleConfig.Http3 这种已经暴露了 |
|
这个pr下个版本再考虑吧 |
|
YAML已经暴露了?我看先应该是只支持global不支持config的吧,通过yaml配置不是走的config吗 |
确实说法不准确,按 develop 现在的实现看,这 4 个新字段目前只在 global/runtime 侧生效,而本地 YAML 这条链路还会经过 global -> config -> global 的 compat,我看了下 config 当前确实还移除不彻底, config.Http3Config 还没有这 4 个字段,所以 YAML 下现在不会生效,如果后续把 Load/init 链路里对 config 的依赖彻底移除,这个问题会自然消失。因为本地 YAML 现在本来就是先反序列化到 InstanceOptions(global),只是后面还会经过 global -> config -> global 的 compat 往返,才把 config 不认识的字段丢掉了 |
build a issue to track this subject |



Summary
This PR implements PR1 of #3102 as a minimal MVP for server-side HTTP/3 QUIC config infrastructure.
It adds 4 HTTP/3 config fields to
global.Http3Config, introduces a shared helper to map them intoquic.Config, and wires that helper into Triple server startup.Included
keep-alive-periodmax-idle-timeoutmax-incoming-streamsmax-incoming-uni-streamsHttp3Config -> quic.ConfighelperstartHttp3startHttp2AndHttp3Checklist
develop