From f8fb805135d9c49f7afb146a8d471e02a85d9f2b Mon Sep 17 00:00:00 2001 From: "Ycarus (Yannick Chabanois)" Date: Fri, 3 Jul 2020 17:36:29 +0200 Subject: [PATCH] Add AES-256-CFB as cipher choice --- .../luasrc/controller/openmptcprouter.lua | 12 ++++++++++++ .../luasrc/view/openmptcprouter/wizard.htm | 7 ++++--- 2 files changed, 16 insertions(+), 3 deletions(-) diff --git a/luci-app-openmptcprouter/luasrc/controller/openmptcprouter.lua b/luci-app-openmptcprouter/luasrc/controller/openmptcprouter.lua index e84428db2..89dfca39a 100644 --- a/luci-app-openmptcprouter/luasrc/controller/openmptcprouter.lua +++ b/luci-app-openmptcprouter/luasrc/controller/openmptcprouter.lua @@ -453,15 +453,27 @@ function wizard_add() local encryption = luci.http.formvalue("encryption") if encryption == "none" then ucic:set("shadowsocks-libev","sss0","method","none") + ucic:set("openvpn","omr","cipher","none") ucic:save("shadowsocks-libev") 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") + 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") 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") end diff --git a/luci-app-openmptcprouter/luasrc/view/openmptcprouter/wizard.htm b/luci-app-openmptcprouter/luasrc/view/openmptcprouter/wizard.htm index af07cdee9..f9e5d06b3 100644 --- a/luci-app-openmptcprouter/luasrc/view/openmptcprouter/wizard.htm +++ b/luci-app-openmptcprouter/luasrc/view/openmptcprouter/wizard.htm @@ -190,8 +190,9 @@ end %> + - +
@@ -202,7 +203,7 @@ end <% else %> <%:There is no Advanced Encryption Standard (AES) instruction set integrated in the processor, you should use chacha20.%> <% end %> - <%:Encryption method is also used for Glorytun.%> + <%:Encryption method is also used for Glorytun and OpenVPN.%>
@@ -303,7 +304,7 @@ end
- <%:Set the default VPN used for UDP and ICMP when ShadowSocks is enabled, for all traffic if ShadowSocks is disabled.%> <%:All VPN available here can do aggregation over MPTCP or using own internal method.%> + <%:Set the default VPN used for UDP and ICMP when ShadowSocks is enabled, for all traffic if ShadowSocks is disabled.%> <%:All VPN available here can do aggregation over MPTCP or using own internal method.%> <%:OpenVPN can't be used in multi VPS configuration.%>