1
0
Fork 0
mirror of https://github.com/Ysurac/openmptcprouter-feeds.git synced 2025-03-09 15:40:03 +00:00

Add AES-256-CFB as cipher choice

This commit is contained in:
Ycarus (Yannick Chabanois) 2020-07-03 17:36:29 +02:00
parent 274e477278
commit f8fb805135
2 changed files with 16 additions and 3 deletions

View file

@ -453,15 +453,27 @@ function wizard_add()
local encryption = luci.http.formvalue("encryption") local encryption = luci.http.formvalue("encryption")
if encryption == "none" then if encryption == "none" then
ucic:set("shadowsocks-libev","sss0","method","none") ucic:set("shadowsocks-libev","sss0","method","none")
ucic:set("openvpn","omr","cipher","none")
ucic:save("shadowsocks-libev") ucic:save("shadowsocks-libev")
elseif encryption == "aes-256-gcm" then elseif encryption == "aes-256-gcm" then
ucic:set("shadowsocks-libev","sss0","method","aes-256-gcm") ucic:set("shadowsocks-libev","sss0","method","aes-256-gcm")
ucic:set("glorytun","vpn","chacha20","0") 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("glorytun")
ucic:save("shadowsocks-libev") ucic:save("shadowsocks-libev")
elseif encryption == "chacha20-ietf-poly1305" then elseif encryption == "chacha20-ietf-poly1305" then
ucic:set("shadowsocks-libev","sss0","method","chacha20-ietf-poly1305") ucic:set("shadowsocks-libev","sss0","method","chacha20-ietf-poly1305")
ucic:set("glorytun","vpn","chacha20","1") ucic:set("glorytun","vpn","chacha20","1")
ucic:set("openvpn","omr","cipher","AES-256-CBC")
ucic:save("openvpn")
ucic:save("glorytun") ucic:save("glorytun")
ucic:save("shadowsocks-libev") ucic:save("shadowsocks-libev")
end end

View file

@ -190,8 +190,9 @@ end
%> %>
<option value="none" <% if method == "none" then %>selected="selected"<% end %>><%:None%></option> <option value="none" <% if method == "none" then %>selected="selected"<% end %>><%:None%></option>
<option value="aes-256-gcm" <% if method == "aes-256-gcm" then %>selected="selected"<% end %>>AES-256-GCM</option> <option value="aes-256-gcm" <% if method == "aes-256-gcm" then %>selected="selected"<% end %>>AES-256-GCM</option>
<option value="aes-256-cfb" <% if method == "aes-256-cfb" then %>selected="selected"<% end %>>AES-256-CFB</option>
<option value="chacha20-ietf-poly1305" <% if method == "chacha20" or method == "chacha20-ietf-poly1305" then %>selected="selected"<% end %>>chacha20</option> <option value="chacha20-ietf-poly1305" <% if method == "chacha20" or method == "chacha20-ietf-poly1305" then %>selected="selected"<% end %>>chacha20</option>
<option value="other" <% if method ~= "chacha20" and method ~= "aes-256-gcm" and method ~= "chacha20-ietf-poly1305" and method ~= "none" then %>selected="selected"<% end %>><%:other%></option> <option value="other" <% if method ~= "chacha20" and method ~= "aes-256-gcm" and method ~= "aes-256-cfb" and method ~= "chacha20-ietf-poly1305" and method ~= "none" then %>selected="selected"<% end %>><%:other%></option>
</select> </select>
<br /> <br />
<div class="cbi-value-description"> <div class="cbi-value-description">
@ -202,7 +203,7 @@ end
<% else %> <% else %>
<%:There is no Advanced Encryption Standard (AES) instruction set integrated in the processor, you should use chacha20.%> <%:There is no Advanced Encryption Standard (AES) instruction set integrated in the processor, you should use chacha20.%>
<% end %> <% end %>
<%:Encryption method is also used for Glorytun.%> <%:Encryption method is also used for Glorytun and OpenVPN.%>
</div> </div>
</div> </div>
</div> </div>
@ -303,7 +304,7 @@ end
</select> </select>
<br /> <br />
<div class="cbi-value-description"> <div class="cbi-value-description">
<%: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.%>
</div> </div>
</div> </div>
</div> </div>