mirror of
https://github.com/Ysurac/openmptcprouter-feeds.git
synced 2025-03-09 15:40:03 +00:00
sync (#390)
This commit is contained in:
commit
edbd94e8bf
13 changed files with 113 additions and 18 deletions
|
|
@ -353,6 +353,7 @@ _set_xray_server_vps() {
|
|||
enabled=$(uci -q get xray.main.enabled)
|
||||
userid=$(uci -q get xray.omrout.s_vless_user_id)
|
||||
protocol=$(uci -q get xray.omrout.protocol)
|
||||
ss_method=$(uci -q get xray.omrout.s_shadowsocks_method)
|
||||
if [ "$protocol" = "vless-reality" ] && [ "$enabled" = "1" ]; then
|
||||
vless_reality='true'
|
||||
else
|
||||
|
|
@ -363,10 +364,11 @@ _set_xray_server_vps() {
|
|||
[ -z "$vps_config" ] && return
|
||||
current_userid="$(echo "$vps_config" | jsonfilter -q -e '@.xray.config.key')"
|
||||
current_vlessreality="$(echo "$vps_config" | jsonfilter -q -e '@.xray.config.vless_reality')"
|
||||
current_method="$(echo "$vps_config" | jsonfilter -q -e '@.xray.config.ss_method')"
|
||||
|
||||
if [ "$current_userid" != "$userid" ] || [ "$current_vlessreality" != "$vless_reality" ]; then
|
||||
if [ "$current_userid" != "$userid" ] || [ "$current_vlessreality" != "$vless_reality" ] || [ "$current_method" != "$ss_method" ]; then
|
||||
local settings
|
||||
settings='{"userid": "'$userid'","vless_reality": '$vless_reality'}'
|
||||
settings='{"userid": "'$userid'","vless_reality": '$vless_reality',"ss_method": "'$ss_method'"}'
|
||||
echo $(_set_json "xray" "$settings")
|
||||
fi
|
||||
}
|
||||
|
|
|
|||
|
|
@ -45,9 +45,18 @@ if [ "$(uci -q get openvpn.omr.proto)" != "tcp-client" ]; then
|
|||
set openvpn.omr.sndbuf=0
|
||||
set openvpn.omr.rcvbuf=0
|
||||
set openvpn.omr.route_delay=5
|
||||
set openvpn.omr.disable_dco=1
|
||||
commit openvpn
|
||||
EOF
|
||||
fi
|
||||
if [ -z "$(uci -q get openvpn.omr.disable_dco)" ]; then
|
||||
uci -q batch <<-EOF >/dev/null
|
||||
set openvpn.omr.disable_dco=1
|
||||
commit openvpn
|
||||
EOF
|
||||
|
||||
fi
|
||||
|
||||
|
||||
uci -q delete openvpn.omr.secret
|
||||
uci -q delete openvpn.omr.ncp_disable=0
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue