Commit Graph

16 Commits

Author SHA1 Message Date
Andrew Beresford ac99425002 feat: extend TCP keepalive support to all TCP-based listeners and dialers
Add configurable TCP keepalive (keepalive, keepalive.idle,
keepalive.interval, keepalive.count) to all TCP-based transport types:
tls, mtls, mtcp, ws/wss, mws/mwss, http2, ssh, sshd listeners and
tls, mtls, mtcp, ws/wss, mws/mwss, ssh, sshd dialers.

For types that already use "keepalive" for an app-level protocol
(grpc listener/dialer, ws/mws dialers, ssh/sshd dialers), the TCP
keepalive parameters are exposed under the tcp.keepalive.* prefix to
avoid ambiguity.

Also extract shared helpers into internal/net/keepalive.go:
- WrapKeepaliveListener: applies KeepAliveConfig on every accepted TCPConn
- ApplyKeepalive: applies KeepAliveConfig to a single TCPConn

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
2026-05-08 14:32:53 +01:00
ginuerzh b597467858 add context for conn 2025-08-04 19:29:38 +08:00
ginuerzh ad5cf6fd61 add proxyProtocol support for dialer 2025-08-03 15:36:29 +08:00
ginuerzh 8f994ab632 add handle options for sniffer 2024-10-10 22:49:56 +08:00
ginuerzh c1d0887a9b add port range support for service 2024-07-08 22:38:21 +08:00
ginuerzh 661953e09f fix grpc dialer 2023-03-20 18:28:35 +08:00
ginuerzh f32b72ce56 fix grpc dialer 2023-03-07 23:51:27 +08:00
ginuerzh 3b245ec381 grpc: cancel stream 2022-12-30 19:34:48 +08:00
ginuerzh ee2c05494c add more options for grpc 2022-12-21 18:17:46 +08:00
ginuerzh 25c393edaf grpc.dialer: do not resolve server address 2022-12-01 19:17:48 +08:00
ginuerzh 09dbdbb03c add backup filter 2022-09-02 11:52:44 +08:00
ginuerzh 8098e9f976 fix grpc dialer 2022-08-19 22:26:40 +08:00
ginuerzh 818463260f add path option support for grpc 2022-07-27 18:01:22 +08:00
ginuerzh a3346ad246 add pkgs from core 2022-04-04 12:44:35 +08:00
ginuerzh 36947bcbd9 fix imports 2022-03-16 20:06:34 +08:00
ginuerzh 9397cb5351 initial commit 2022-03-14 20:27:14 +08:00