add json parse rule for tcp keep alive interval

This commit is contained in:
Shelikhoo 2021-05-04 22:37:38 +01:00
parent c564c84b17
commit 8d4b4201f8
No known key found for this signature in database
GPG Key ID: C4D5E79D22B25316
1 changed files with 7 additions and 4 deletions

View File

@ -387,6 +387,8 @@ type SocketConfig struct {
TFO *bool `json:"tcpFastOpen"`
TProxy string `json:"tproxy"`
AcceptProxyProtocol bool `json:"acceptProxyProtocol"`
TcpKeepAliveInterval uint32 `json:"tcpKeepAliveInterval"`
}
// Build implements Buildable.
@ -410,10 +412,11 @@ func (c *SocketConfig) Build() (*internet.SocketConfig, error) {
}
return &internet.SocketConfig{
Mark: c.Mark,
Tfo: tfoSettings,
Tproxy: tproxy,
AcceptProxyProtocol: c.AcceptProxyProtocol,
Mark: c.Mark,
Tfo: tfoSettings,
Tproxy: tproxy,
AcceptProxyProtocol: c.AcceptProxyProtocol,
TcpKeepAliveInterval: c.TcpKeepAliveInterval,
}, nil
}