Add tcpWindowClamp to sockopt (#1757)

Co-authored-by: RPRX <63339210+RPRX@users.noreply.github.com>
This commit is contained in:
xqzr 2023-03-09 21:51:16 +08:00 committed by GitHub
parent 836e84b851
commit c3322294be
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
4 changed files with 49 additions and 23 deletions

View file

@ -616,6 +616,7 @@ type SocketConfig struct {
TCPKeepAliveInterval int32 `json:"tcpKeepAliveInterval"`
TCPKeepAliveIdle int32 `json:"tcpKeepAliveIdle"`
TCPCongestion string `json:"tcpCongestion"`
TCPWindowClamp int32 `json:"tcpWindowClamp"`
V6only bool `json:"v6only"`
Interface string `json:"interface"`
}
@ -667,6 +668,7 @@ func (c *SocketConfig) Build() (*internet.SocketConfig, error) {
TcpKeepAliveInterval: c.TCPKeepAliveInterval,
TcpKeepAliveIdle: c.TCPKeepAliveIdle,
TcpCongestion: c.TCPCongestion,
TcpWindowClamp: c.TCPWindowClamp,
V6Only: c.V6only,
Interface: c.Interface,
}, nil