mirror of
https://github.com/Ysurac/openmptcprouter-feeds.git
synced 2025-03-09 15:40:03 +00:00
Don't use Nginx HA for ShadowSocks
This commit is contained in:
parent
b757773c8c
commit
5baee9a93e
2 changed files with 18 additions and 3 deletions
|
@ -3,6 +3,7 @@
|
|||
<%
|
||||
local uci = require("luci.model.uci").cursor()
|
||||
local net = require "luci.model.network".init()
|
||||
local fs = require "nixio.fs"
|
||||
local ifaces = net:get_interfaces()
|
||||
local servers_ip = {}
|
||||
local server_ip = uci:get("shadowsocks-libev","sss0","server")
|
||||
|
@ -28,8 +29,13 @@
|
|||
<div class="cbi-value cbi-value-last" id="server_ip" data-depends="[]" data-index="0">
|
||||
<label class="cbi-value-title" for="server_ip"><%:Server IP%></label>
|
||||
<div class="cbi-value-field">
|
||||
<%
|
||||
local has_nginxha = fs.access("/etc/config/nginx-ha")
|
||||
if has_nginxha then
|
||||
%>
|
||||
<div data-prefix="server_ip" data-browser-path="" data-dynlist="[[],[],null,false]" data-placeholder="123.123.123.123">
|
||||
<%
|
||||
end
|
||||
local k = 0
|
||||
for _,server in ipairs(servers_ip) do
|
||||
k = k+1
|
||||
|
@ -105,6 +111,7 @@
|
|||
<% if nixio.fs.access("/usr/sbin/glorytun-udp") then %><option value="glorytun_udp" <% if uci:get("glorytun","vpn","enable") == "1" and uci:get("glorytun","vpn","proto") == "udp" then %>selected="selected"<% end %>>Glorytun UDP</option><% end %>
|
||||
<% if nixio.fs.access("/usr/sbin/mlvpn") then %><option value="mlvpn" <% if uci:get("mlvpn","general","enable") == "1" then %>selected="selected"<% end %>>MLVPN</option><% end %>
|
||||
<% if nixio.fs.access("/usr/sbin/openvpn") then %><option value="openvpn" <% if uci:get("openvpn","omr","enabled") == "1" then %>selected="selected"<% end %>>OpenVPN</option><% end %>
|
||||
<option value="none" <% if uci:get("openmptcprouter","settings","vpn") == "none" then %>selected="selected"<% end %>>None</option>
|
||||
</select>
|
||||
<br />
|
||||
<div class="cbi-value-description">
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue