The syntax block advertised POSITIVE_INTEGER for both options, but plugin/https3/setup.go:50 and :66 reject only val < 0, the parser errors say "must be a non-negative integer", plugin/https3/setup_test.go:36-43 accepts "max_streams 0" with shouldErr false, and README.md:22-23 itself tells the reader to "Set to 0". plugin/https/README.md:17-18 already uses NON_NEGATIVE_INTEGER for the same pair.
Signed-off-by: yuwk <1729065730@qq.com>
Add configurable resource limits to prevent potential DoS vectors
via connection/stream exhaustion on gRPC, HTTPS, and HTTPS/3 servers.
New configuration plugins:
- grpc_server: configure max_streams, max_connections
- https: configure max_connections
- https3: configure max_streams
Changes:
- Use netutil.LimitListener for connection limiting
- Use gRPC MaxConcurrentStreams and message size limits
- Add QUIC MaxIncomingStreams for HTTPS/3 stream limiting
- Set secure defaults: 256 max streams, 200 max connections
- Setting any limit to 0 means unbounded/fallback to previous impl
Defaults are applied automatically when plugins are omitted from
config.
Includes tests and integration tests.
Signed-off-by: Ville Vesilehto <ville@vesilehto.fi>