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

Fix, add proxy in status json and add encryption in uci settings

This commit is contained in:
Ycarus (Yannick Chabanois) 2023-08-04 22:22:51 +02:00
parent 89f028597d
commit 2b59c7ae22
3 changed files with 18 additions and 5 deletions

View file

@ -269,13 +269,18 @@
<div class="cbi-value-field">
<select class="cbi-input-select" name="encryption" size="1">
<%
local method=uci:get("shadowsocks-libev","sss0","method")
local method=uci:get("openmptcprouter","settings","encryption")
if method == nil and ut.trim(sys.exec("cat /proc/cpuinfo | grep aes")) ~= "" then
method="aes-256-gcm"
else
method="chacha20"
end
%>
<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-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="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>
<option value="other" <% if method == "other" or (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>
<br />
<div class="cbi-value-description">