mirror of
https://github.com/XTLS/Xray-core.git
synced 2025-04-30 17:38:41 +00:00
Add tcpMptcp
to sockopt
(#2520)
This commit is contained in:
parent
853a866622
commit
c00e56c0da
5 changed files with 48 additions and 26 deletions
|
@ -81,6 +81,9 @@ func (d *DefaultSystemDialer) Dial(ctx context.Context, src net.Address, dest ne
|
|||
}
|
||||
|
||||
if sockopt != nil || len(d.controllers) > 0 {
|
||||
if sockopt != nil && sockopt.TcpMptcp {
|
||||
dialer.SetMultipathTCP(true)
|
||||
}
|
||||
dialer.Control = func(network, address string, c syscall.RawConn) error {
|
||||
for _, ctl := range d.controllers {
|
||||
if err := ctl(network, address, c); err != nil {
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue