mirror of
https://github.com/Ysurac/openmptcprouter-feeds.git
synced 2025-03-09 15:40:03 +00:00
add v2ray encryption support from wizard
This commit is contained in:
parent
5af7f788a4
commit
367e0dc932
1 changed files with 12 additions and 10 deletions
|
@ -486,29 +486,31 @@ function wizard_add()
|
|||
if encryption == "none" then
|
||||
ucic:set("shadowsocks-libev","sss0","method","none")
|
||||
ucic:set("openvpn","omr","cipher","none")
|
||||
ucic:save("shadowsocks-libev")
|
||||
ucic:set("v2ray","omrout","s_vmess_user_security","none")
|
||||
ucic:set("v2ray","omrout","s_vless_user_security","none")
|
||||
elseif encryption == "aes-256-gcm" then
|
||||
ucic:set("shadowsocks-libev","sss0","method","aes-256-gcm")
|
||||
ucic:set("glorytun","vpn","chacha20","0")
|
||||
ucic:set("openvpn","omr","cipher","AES-256-GCM")
|
||||
ucic:save("openvpn")
|
||||
ucic:save("glorytun")
|
||||
ucic:save("shadowsocks-libev")
|
||||
ucic:set("v2ray","omrout","s_vmess_user_security","aes-128-gcm")
|
||||
ucic:set("v2ray","omrout","s_vless_user_security","aes-128-gcm")
|
||||
elseif encryption == "aes-256-cfb" then
|
||||
ucic:set("shadowsocks-libev","sss0","method","aes-256-cfb")
|
||||
ucic:set("glorytun","vpn","chacha20","0")
|
||||
ucic:set("openvpn","omr","cipher","AES-256-CFB")
|
||||
ucic:save("openvpn")
|
||||
ucic:save("glorytun")
|
||||
ucic:save("shadowsocks-libev")
|
||||
ucic:set("v2ray","omrout","s_vmess_user_security","aes-128-gcm")
|
||||
ucic:set("v2ray","omrout","s_vless_user_security","aes-128-gcm")
|
||||
elseif encryption == "chacha20-ietf-poly1305" then
|
||||
ucic:set("shadowsocks-libev","sss0","method","chacha20-ietf-poly1305")
|
||||
ucic:set("glorytun","vpn","chacha20","1")
|
||||
ucic:set("openvpn","omr","cipher","AES-256-CBC")
|
||||
ucic:save("openvpn")
|
||||
ucic:save("glorytun")
|
||||
ucic:save("shadowsocks-libev")
|
||||
ucic:set("v2ray","omrout","s_vmess_user_security","chacha20-poly1305")
|
||||
ucic:set("v2ray","omrout","s_vless_user_security","chacha20-poly1305")
|
||||
end
|
||||
ucic:save("openvpn")
|
||||
ucic:save("glorytun")
|
||||
ucic:save("shadowsocks-libev")
|
||||
ucic:save("v2ray")
|
||||
|
||||
-- Set ShadowSocks settings
|
||||
local shadowsocks_key = luci.http.formvalue("shadowsocks_key")
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue