diff --git a/luci-app-openmptcprouter/luasrc/controller/openmptcprouter.lua b/luci-app-openmptcprouter/luasrc/controller/openmptcprouter.lua index ec876228c..5f7b1487a 100644 --- a/luci-app-openmptcprouter/luasrc/controller/openmptcprouter.lua +++ b/luci-app-openmptcprouter/luasrc/controller/openmptcprouter.lua @@ -915,7 +915,8 @@ function wizard_add() ucic:set("xray","omrout","s_vless_reality_user_security","none") ucic:set("xray","omrout","s_trojan_user_security","none") ucic:set("xray","omrout","s_socks_user_security","none") - ucic:set("xray","omrout","s_shadowsocks_method","none") + --ucic:set("xray","omrout","s_shadowsocks_method","none") + ucic:set("xray","omrout","s_shadowsocks_method","2022-blake3-aes-256-gcm") elseif encryption == "aes-256-gcm" then ucic:set("openmptcprouter","settings","encryption","aes-256-gcm") ucic:set("shadowsocks-libev","sss0","method","aes-256-gcm") @@ -974,6 +975,7 @@ function wizard_add() ucic:set("xray","omrout","s_trojan_user_security","chacha20-poly1305") ucic:set("xray","omrout","s_socks_user_security","chacha20-poly1305") ucic:set("xray","omrout","s_shadowsocks_method","2022-blake3-chacha20-poly1305") + --ucic:set("xray","omrout","s_shadowsocks_method","2022-blake3-aes-256-gcm") --ucic:set("shadowsocks-rust","sss0","method","2022-blake3-chacha20-poly1305") --ucic:set("shadowsocks-rust","sss1","method","2022-blake3-chacha20-poly1305") ucic:set("shadowsocks-rust","sss0","method","2022-blake3-aes-256-gcm") diff --git a/openmptcprouter/files/etc/init.d/openmptcprouter-vps b/openmptcprouter/files/etc/init.d/openmptcprouter-vps index 0176273ea..110b0e87d 100755 --- a/openmptcprouter/files/etc/init.d/openmptcprouter-vps +++ b/openmptcprouter/files/etc/init.d/openmptcprouter-vps @@ -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 }