mirror of
https://github.com/Ysurac/openmptcprouter-feeds.git
synced 2025-03-09 15:40:03 +00:00
Allow to change encryption on XRay Shadowsocks
This commit is contained in:
parent
e41723e295
commit
b8d2414f51
2 changed files with 7 additions and 3 deletions
|
@ -915,7 +915,8 @@ function wizard_add()
|
||||||
ucic:set("xray","omrout","s_vless_reality_user_security","none")
|
ucic:set("xray","omrout","s_vless_reality_user_security","none")
|
||||||
ucic:set("xray","omrout","s_trojan_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_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
|
elseif encryption == "aes-256-gcm" then
|
||||||
ucic:set("openmptcprouter","settings","encryption","aes-256-gcm")
|
ucic:set("openmptcprouter","settings","encryption","aes-256-gcm")
|
||||||
ucic:set("shadowsocks-libev","sss0","method","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_trojan_user_security","chacha20-poly1305")
|
||||||
ucic:set("xray","omrout","s_socks_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-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","sss0","method","2022-blake3-chacha20-poly1305")
|
||||||
--ucic:set("shadowsocks-rust","sss1","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")
|
ucic:set("shadowsocks-rust","sss0","method","2022-blake3-aes-256-gcm")
|
||||||
|
|
|
@ -353,6 +353,7 @@ _set_xray_server_vps() {
|
||||||
enabled=$(uci -q get xray.main.enabled)
|
enabled=$(uci -q get xray.main.enabled)
|
||||||
userid=$(uci -q get xray.omrout.s_vless_user_id)
|
userid=$(uci -q get xray.omrout.s_vless_user_id)
|
||||||
protocol=$(uci -q get xray.omrout.protocol)
|
protocol=$(uci -q get xray.omrout.protocol)
|
||||||
|
ss_method=$(uci -q get xray.omrout.s_shadowsocks_method)
|
||||||
if [ "$protocol" = "vless-reality" ] && [ "$enabled" = "1" ]; then
|
if [ "$protocol" = "vless-reality" ] && [ "$enabled" = "1" ]; then
|
||||||
vless_reality='true'
|
vless_reality='true'
|
||||||
else
|
else
|
||||||
|
@ -363,10 +364,11 @@ _set_xray_server_vps() {
|
||||||
[ -z "$vps_config" ] && return
|
[ -z "$vps_config" ] && return
|
||||||
current_userid="$(echo "$vps_config" | jsonfilter -q -e '@.xray.config.key')"
|
current_userid="$(echo "$vps_config" | jsonfilter -q -e '@.xray.config.key')"
|
||||||
current_vlessreality="$(echo "$vps_config" | jsonfilter -q -e '@.xray.config.vless_reality')"
|
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
|
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")
|
echo $(_set_json "xray" "$settings")
|
||||||
fi
|
fi
|
||||||
}
|
}
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue