mirror of
https://github.com/XTLS/Xray-core.git
synced 2025-04-30 01:08:33 +00:00
Add sockopt interface setting for binding outbound to a particular device like "eth0" (#1494)
* Update sockopt_linux.go add Interface Name * Update config.pb.go add Interface Name * Update transport_internet.go add Interface Name * Update config.pb.go * update config.proto add interface * Update config.pb.go
This commit is contained in:
parent
32ce7cd730
commit
620eb63c1b
4 changed files with 43 additions and 23 deletions
|
@ -534,6 +534,7 @@ type SocketConfig struct {
|
|||
TCPKeepAliveInterval int32 `json:"tcpKeepAliveInterval"`
|
||||
TCPKeepAliveIdle int32 `json:"tcpKeepAliveIdle"`
|
||||
TCPCongestion string `json:"tcpCongestion"`
|
||||
Interface string `json:"interface"`
|
||||
}
|
||||
|
||||
// Build implements Buildable.
|
||||
|
@ -583,6 +584,7 @@ func (c *SocketConfig) Build() (*internet.SocketConfig, error) {
|
|||
TcpKeepAliveInterval: c.TCPKeepAliveInterval,
|
||||
TcpKeepAliveIdle: c.TCPKeepAliveIdle,
|
||||
TcpCongestion: c.TCPCongestion,
|
||||
Interface: c.Interface,
|
||||
}, nil
|
||||
}
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue