1
0
mirror of https://github.com/v2fly/v2ray-core.git synced 2025-02-20 23:47:21 -05:00

add TCP Keep Alive support in config

This commit is contained in:
Shelikhoo 2021-11-20 17:31:50 +00:00 committed by Xiaokang Wang (Shelikhoo)
parent c9e65b941c
commit 8edf332d10

View File

@ -391,6 +391,7 @@ type SocketConfig struct {
TProxy string `json:"tproxy"`
AcceptProxyProtocol bool `json:"acceptProxyProtocol"`
TCPKeepAliveInterval int32 `json:"tcpKeepAliveInterval"`
TCPKeepAliveIdle int32 `json:"tcpKeepAliveIdle"`
}
// Build implements Buildable.
@ -426,6 +427,7 @@ func (c *SocketConfig) Build() (*internet.SocketConfig, error) {
Tproxy: tproxy,
AcceptProxyProtocol: c.AcceptProxyProtocol,
TcpKeepAliveInterval: c.TCPKeepAliveInterval,
TcpKeepAliveIdle: c.TCPKeepAliveIdle,
}, nil
}