mirror of
https://github.com/Ysurac/openmptcprouter-feeds.git
synced 2025-03-09 15:40:03 +00:00
Encryption can be changed using the wizard
This commit is contained in:
parent
eaea34503b
commit
4c28f46b06
2 changed files with 41 additions and 6 deletions
|
@ -5,6 +5,7 @@
|
|||
local net = require "luci.model.network".init()
|
||||
local fs = require "nixio.fs"
|
||||
local sys = require "luci.sys"
|
||||
local ut = require "luci.util"
|
||||
local ifaces = sys.net:devices()
|
||||
local servers_ip = {}
|
||||
local server_ip = uci:get("shadowsocks-libev","sss0","server")
|
||||
|
@ -148,6 +149,30 @@ end
|
|||
<input class="cbi-input-checkbox" type="checkbox" name="disableshadowsocks" value="1" <% if uci:get("shadowsocks-libev","sss0","disabled") == "1" then %>checked<% end %> />
|
||||
</div>
|
||||
</div>
|
||||
<div class="cbi-value">
|
||||
<label class="cbi-value-title"><%:Encryption%></label>
|
||||
<div class="cbi-value-field">
|
||||
<select class="cbi-input-select" name="encryption" size="1">
|
||||
<%
|
||||
local method=uci:get("shadowsocks-libev","sss0","method")
|
||||
%>
|
||||
<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="chacha20" <% if method == "chacha20" then %>selected="selected"<% end %>>chacha20</option>
|
||||
<option value="other" <% if method ~= "chacha20" and method ~= "aes-256-gcm" and method ~= "none" then %>selected="selected"<% end %>><%:other%></option>
|
||||
</select>
|
||||
<br />
|
||||
<div class="cbi-value-description">
|
||||
<%
|
||||
if ut.trim(sys.exec("cat /proc/cpuinfo | grep aes")) ~= "" then
|
||||
%>
|
||||
<%:An Advanced Encryption Standard (AES) instruction set is integrated in the processor.%>
|
||||
<% else %>
|
||||
<%:There is no Advanced Encryption Standard (AES) instruction set integrated in the processor, you should use chacha20.%>
|
||||
<% end %>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</fieldset>
|
||||
<fieldset class="cbi-section" id="vpn">
|
||||
<legend><%:VPN settings%></legend>
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue