add V6Only (#1677)

* add `V6Only`

* add `V6Only`
This commit is contained in:
xqzr 2023-02-25 00:54:40 +08:00 committed by GitHub
parent 03b8c094de
commit c8b4580869
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
4 changed files with 43 additions and 23 deletions

View file

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