0
mirror of https://github.com/XTLS/Xray-core.git synced 2025-06-12 11:29:36 +03:00

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
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
}