Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Background
Multipath TCP or MPTCP is an extension to the standard TCP and is described in RFC 8684. It allows a device to make use of multiple interfaces at once to send and receive TCP packets over a single MPTCP connection. MPTCP can aggregate the bandwidth of multiple interfaces or prefer the one with the lowest latency.
Support for Multipath TCP was first added in Go 1.21. In a future Go release we may enable Multipath TCP by default on systems that support it.
Go 1.21 Release Note
Other proxy softwares that written in Go had add it.
Behavior
If
mptcp
is not set insockopt
, V2Ray will not do any action about MPTCP, and MPTCP is disabled by default on latest Go currently. Ifmptcp
is set totrue
, V2Ray will try to enable MPTCP, but it only works on Linux now. On other platforms, it will make any impact.If one of the server and the client does not support MPTCP, MPTCP will not work and the connection will be the same as a normal TCP connection.
Go versions
This PR can only be compiled with Go 1.21 or newer versions. The minimal Go version in
v2ray-core
andquic-go
inmain
branch is Go 1.21, so I think this PR not make any impact to this problem.v2ray-core/go.mod
Line 3 in 8191faa
Test Results
On Linux,
sudo ip mptcp monitor
can monitor the status of MPTCP connections.On other platforms, this PR will not make any impact currently. (I just tested it on macOS)