1
0
Fork 0
mirror of https://github.com/Ysurac/openmptcprouter-feeds.git synced 2025-03-09 15:40:03 +00:00

Update V2Ray

This commit is contained in:
Ycarus (Yannick Chabanois) 2023-09-29 14:51:42 +02:00
parent b69ee0cbcc
commit 879124665f
4 changed files with 17 additions and 48 deletions

View file

@ -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

View file

@ -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