Commit Graph

7 Commits

Author SHA1 Message Date
Ville Vesilehto
0d8cbb1a6b Merge commit from fork
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>
2025-12-17 19:08:59 -08:00
Nico Berlee
7d7bbc8061 fix: prevent QUIC reload panic by lazily initializing the listener (#7680)
* fix: prevent QUIC reload panic by lazily initializing the listener

ServePacket on reload receives the reused PacketConn before the new
ServerQUIC has recreated its quic.Listener, so quicListener is nil and
the process panics. Lazily initialise quicListener from the provided
PacketConn when it’s nil and then proceed with ServeQUIC.

fixes: #7679
Signed-off-by: Nico Berlee <nico.berlee@on2it.net>

* test: add regression test for QUIC reload panic

Signed-off-by: Nico Berlee <nico.berlee@on2it.net>

---------

Signed-off-by: Nico Berlee <nico.berlee@on2it.net>
2025-11-18 08:34:29 -08:00
Ilya Kulakov
c90e70339c dnsserver.Server: Export timeout values (#7497)
Plugins need access to timeout values that are actually used by
TCP dns.Server

Signed-off-by: Ilya Kulakov <kulakov.ilya@gmail.com>
2025-09-09 19:06:44 -07:00
dependabot[bot]
e90db8e666 build(deps): bump github.com/quic-go/quic-go from 0.52.0 to 0.53.0 (#7392) 2025-07-14 18:57:36 -07:00
Ville Vesilehto
efaed02c6a feat: limit concurrent DoQ streams and goroutines (#7296) 2025-05-18 17:49:21 -07:00
Manuel Rüger
76ba39ffe9 chore: Upgrade to golangci-lint v2 (#7236)
Signed-off-by: Manuel Rüger <manuel@rueg.eu>
2025-04-04 14:27:39 -04:00
João Henri
cc7a364633 [RFC-9250]: Add QUIC server support (#6182)
Add DNS-over-QUIC server 

Signed-off-by: jaehnri <joao.henri.cr@gmail.com>
Signed-off-by: João Henri <joao.henri.cr@gmail.com>
2023-07-31 15:34:31 -04:00