mirror of
https://github.com/v2fly/v2ray-core.git
synced 2024-09-27 14:26:11 -04:00
add jsonConf support for bindToDevice, bufSize
This commit is contained in:
parent
4357719480
commit
f965d25af2
@ -14,6 +14,10 @@ type SocketConfig struct {
|
|||||||
TCPKeepAliveInterval int32 `json:"tcpKeepAliveInterval"`
|
TCPKeepAliveInterval int32 `json:"tcpKeepAliveInterval"`
|
||||||
TCPKeepAliveIdle int32 `json:"tcpKeepAliveIdle"`
|
TCPKeepAliveIdle int32 `json:"tcpKeepAliveIdle"`
|
||||||
TFOQueueLength uint32 `json:"tcpFastOpenQueueLength"`
|
TFOQueueLength uint32 `json:"tcpFastOpenQueueLength"`
|
||||||
|
BindToDevice string `json:"bindToDevice"`
|
||||||
|
RxBufSize uint64 `json:"rxBufSize"`
|
||||||
|
TxBufSize uint64 `json:"txBufSize"`
|
||||||
|
ForceBufSize bool `json:"forceBufSize"`
|
||||||
}
|
}
|
||||||
|
|
||||||
// Build implements Buildable.
|
// Build implements Buildable.
|
||||||
@ -50,5 +54,9 @@ func (c *SocketConfig) Build() (*internet.SocketConfig, error) {
|
|||||||
AcceptProxyProtocol: c.AcceptProxyProtocol,
|
AcceptProxyProtocol: c.AcceptProxyProtocol,
|
||||||
TcpKeepAliveInterval: c.TCPKeepAliveInterval,
|
TcpKeepAliveInterval: c.TCPKeepAliveInterval,
|
||||||
TcpKeepAliveIdle: c.TCPKeepAliveIdle,
|
TcpKeepAliveIdle: c.TCPKeepAliveIdle,
|
||||||
|
RxBufSize: int64(c.RxBufSize),
|
||||||
|
TxBufSize: int64(c.TxBufSize),
|
||||||
|
ForceBufSize: c.ForceBufSize,
|
||||||
|
BindToDevice: c.BindToDevice,
|
||||||
}, nil
|
}, nil
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user