From 4cf9992f8949ea8a625547012e7bb772da77892c Mon Sep 17 00:00:00 2001 From: Shelikhoo Date: Sat, 20 Nov 2021 17:31:50 +0000 Subject: [PATCH] add TCP Keep Alive support in config --- infra/conf/cfgcommon/socketcfg/socket.go | 2 ++ 1 file changed, 2 insertions(+) diff --git a/infra/conf/cfgcommon/socketcfg/socket.go b/infra/conf/cfgcommon/socketcfg/socket.go index 12c4a95d2..3ef858f46 100644 --- a/infra/conf/cfgcommon/socketcfg/socket.go +++ b/infra/conf/cfgcommon/socketcfg/socket.go @@ -12,6 +12,7 @@ type SocketConfig struct { TProxy string `json:"tproxy"` AcceptProxyProtocol bool `json:"acceptProxyProtocol"` TCPKeepAliveInterval int32 `json:"tcpKeepAliveInterval"` + TCPKeepAliveIdle int32 `json:"tcpKeepAliveIdle"` TFOQueueLength uint32 `json:"tcpFastOpenQueueLength"` } @@ -48,5 +49,6 @@ func (c *SocketConfig) Build() (*internet.SocketConfig, error) { Tproxy: tproxy, AcceptProxyProtocol: c.AcceptProxyProtocol, TcpKeepAliveInterval: c.TCPKeepAliveInterval, + TcpKeepAliveIdle: c.TCPKeepAliveIdle, }, nil }