diff --git a/v2ray-core/Makefile b/v2ray-core/Makefile index e2195cd56..f89c9d1bd 100644 --- a/v2ray-core/Makefile +++ b/v2ray-core/Makefile @@ -13,7 +13,7 @@ PKG_RELEASE:=1 #PKG_HASH:=599fcd264537e39178b6008a11af68816dfd1609e19a9cf8adc8b2a4240ee370 PKG_SOURCE_PROTO:=git PKG_SOURCE_URL:=https://github.com/v2fly/v2ray-core.git -PKG_SOURCE_VERSION:=d58649764e3afa52234ada9a28b7ae79577a23a9 +PKG_SOURCE_VERSION:=8de2f27043b00612986d96f37975cd4aa98b49c3 PKG_LICENSE:=MIT PKG_LICENSE_FILES:=LICENSE diff --git a/v2ray-core/files/etc/init.d/v2ray b/v2ray-core/files/etc/init.d/v2ray index 7adbfa052..865297512 100755 --- a/v2ray-core/files/etc/init.d/v2ray +++ b/v2ray-core/files/etc/init.d/v2ray @@ -328,6 +328,7 @@ inbound_section_validate() { 'ss_quic_key:string' \ 'ss_quic_header_type:or("none", "srtp", "utp", "wechat-video", "dtls", "wireguard")' \ 'ss_sockopt_tcp_fast_open:or("0", "1")' \ + 'ss_sockopt_mptcp:or("0", "1")' \ 'ss_sockopt_tproxy:or("redirect", "tproxy", "off")' \ 'tag:string' \ 'sniffing_enabled:bool:0' \ @@ -426,6 +427,7 @@ outbound_section_validate() { 'ss_quic_header_type:or("none", "srtp", "utp", "wechat-video", "dtls", "wireguard")' \ 'ss_sockopt_mark:uinteger' \ 'ss_sockopt_tcp_fast_open:or("0", "1")' \ + 'ss_sockopt_mptcp:or("0", "1")' \ 'stream_settings:string' \ 'proxy_settings_tag:string' \ 'mux_enabled:bool:0' \ @@ -1371,12 +1373,13 @@ add_inbound_setting() { # else test -n "$ss_sockopt_tcp_fast_open" && \ json_add_boolean "tcpFastOpen" "$ss_sockopt_tcp_fast_open" + if version_over_5_4; then + test -n "$ss_sockopt_mptcp" && \ + json_add_boolean "mptcp" "$ss_sockopt_mptcp" + fi test -n "$ss_sockopt_tproxy" && \ json_add_string "tproxy" "$ss_sockopt_tproxy" # fi - if version_over_5_4; then - json_add_boolean "mptcp" "1" - fi json_close_object # sockopt @@ -1843,6 +1846,10 @@ add_outbound_setting() { test -n "$ss_sockopt_tcp_fast_open" && \ json_add_boolean "tcpFastOpen" "$ss_sockopt_tcp_fast_open" + if version_over_5_4; then + test -n "$ss_sockopt_mptcp" && \ + json_add_boolean "mptcp" "$ss_sockopt_mptcp" + fi json_close_object # sockopt diff --git a/v2ray-core/files/etc/uci-defaults/3010-omr-v2ray b/v2ray-core/files/etc/uci-defaults/3010-omr-v2ray index df545a5b6..64d18278d 100644 --- a/v2ray-core/files/etc/uci-defaults/3010-omr-v2ray +++ b/v2ray-core/files/etc/uci-defaults/3010-omr-v2ray @@ -75,6 +75,7 @@ if [ -z "$(uci -q get v2ray.main)" ]; then add_list v2ray.omr.s_dokodemo_door_network='udp' set v2ray.omr.ss_sockopt_tproxy='redirect' set v2ray.omr.ss_sockopt_tcp_fast_open='1' + set v2ray.omr.ss_sockopt_mptcp='1' set v2ray.omr.s_dokodemo_door_follow_redirect='1' set v2ray.omr6=inbound set v2ray.omr6.tag='omrtunnel6' @@ -196,5 +197,10 @@ if [ "$(uci -q get v2ray.omrout.s_socks_port)" = "" ]; then commit v2ray EOF fi +if [ "$(uci -q get v2ray.omrout.ss_sockopt_mptcp)" = "" ]; then + uci -q batch <<-EOF >/dev/null + set v2ray.omr.ss_sockopt_mptcp='1' + EOF +fi exit 0 \ No newline at end of file diff --git a/v2ray-core/patches/add-mptcp-support.patch b/v2ray-core/patches/add-mptcp-support.patch index 85ba7a316..deb0ac78d 100644 --- a/v2ray-core/patches/add-mptcp-support.patch +++ b/v2ray-core/patches/add-mptcp-support.patch @@ -4,50 +4,6 @@ Date: Sat, 29 Jul 2023 14:56:58 +0800 Subject: [PATCH] support mptcp --- -diff --git a/go.mod b/go.mod -index e3881e5aa..73599d927 100644 ---- a/go.mod -+++ b/go.mod -@@ -16,7 +16,7 @@ require ( - github.com/mustafaturan/bus v1.0.2 - github.com/pelletier/go-toml v1.9.5 - github.com/pires/go-proxyproto v0.7.0 -- github.com/quic-go/quic-go v0.36.2 -+ github.com/quic-go/quic-go v0.37.0 - github.com/refraction-networking/utls v1.3.3 - github.com/seiflotfy/cuckoofilter v0.0.0-20220411075957-e3b120b3f5fb - github.com/stretchr/testify v1.8.4 -@@ -65,8 +65,7 @@ require ( - github.com/pion/sctp v1.8.7 // indirect - github.com/pion/transport/v2 v2.2.1 // indirect - github.com/pmezard/go-difflib v1.0.0 // indirect -- github.com/quic-go/qtls-go1-19 v0.3.2 // indirect -- github.com/quic-go/qtls-go1-20 v0.2.2 // indirect -+ github.com/quic-go/qtls-go1-20 v0.3.0 // indirect - github.com/riobard/go-bloom v0.0.0-20200614022211-cdc8013cb5b3 // indirect - github.com/secure-io/siv-go v0.0.0-20180922214919-5ff40651e2c4 // indirect - github.com/xtaci/smux v1.5.24 // indirect -diff --git a/go.sum b/go.sum -index 0ce21101c..63298b0c1 100644 ---- a/go.sum -+++ b/go.sum -@@ -260,12 +260,10 @@ github.com/prometheus/common v0.4.0/go.mod h1:TNfzLD0ON7rHzMJeJkieUDPYmFC7Snx/y8 - github.com/prometheus/procfs v0.0.0-20181005140218-185b4288413d/go.mod h1:c3At6R/oaqEKCNdg8wHV1ftS6bRYblBhIjjI8uT2IGk= - github.com/prometheus/procfs v0.0.0-20190507164030-5867b95ac084/go.mod h1:TjEm7ze935MbeOT/UhFTIMYKhuLP4wbCsTZCD3I8kEA= - github.com/prometheus/tsdb v0.7.1/go.mod h1:qhTCs0VvXwvX/y3TZrWD7rabWM+ijKTux40TwIPHuXU= --github.com/quic-go/qtls-go1-19 v0.3.2 h1:tFxjCFcTQzK+oMxG6Zcvp4Dq8dx4yD3dDiIiyc86Z5U= --github.com/quic-go/qtls-go1-19 v0.3.2/go.mod h1:ySOI96ew8lnoKPtSqx2BlI5wCpUVPT05RMAlajtnyOI= --github.com/quic-go/qtls-go1-20 v0.2.2 h1:WLOPx6OY/hxtTxKV1Zrq20FtXtDEkeY00CGQm8GEa3E= --github.com/quic-go/qtls-go1-20 v0.2.2/go.mod h1:JKtK6mjbAVcUTN/9jZpvLbGxvdWIKS8uT7EiStoU1SM= --github.com/quic-go/quic-go v0.36.2 h1:ZX/UNQ4gvpCv2RmwdbA6lrRjF6EBm5yZ7TMoT4NQVrA= --github.com/quic-go/quic-go v0.36.2/go.mod h1:zPetvwDlILVxt15n3hr3Gf/I3mDf7LpLKPhR4Ez0AZQ= -+github.com/quic-go/qtls-go1-20 v0.3.0 h1:NrCXmDl8BddZwO67vlvEpBTwT89bJfKYygxv4HQvuDk= -+github.com/quic-go/qtls-go1-20 v0.3.0/go.mod h1:X9Nh97ZL80Z+bX/gUXMbipO6OxdiDi58b/fMC9mAL+k= -+github.com/quic-go/quic-go v0.37.0 h1:wf/Ym2yeWi98oQn4ahiBSqdnaXVxNQGj2oBQFgiVChc= -+github.com/quic-go/quic-go v0.37.0/go.mod h1:XtCUOCALTTWbPyd0IxFfHf6h0sEMubRFvEYHl3QxKw8= - github.com/refraction-networking/utls v1.3.3 h1:f/TBLX7KBciRyFH3bwupp+CE4fzoYKCirhdRcC490sw= - github.com/refraction-networking/utls v1.3.3/go.mod h1:DlecWW1LMlMJu+9qpzzQqdHDT/C2LAe03EdpLUz/RL8= - github.com/riobard/go-bloom v0.0.0-20200614022211-cdc8013cb5b3 h1:f/FNXud6gA3MNr8meMVVGxhp+QBTqY91tM8HjEuMjGg= diff --git a/transport/internet/system_dialer.go b/transport/internet/system_dialer.go index 314664a78..96bb0eca1 100644 --- a/transport/internet/system_dialer.go