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

Add A Dead Simple VPN

This commit is contained in:
Ycarus (Yannick Chabanois) 2019-08-02 22:37:45 +02:00
parent cfe790f601
commit bf39d8706e
10 changed files with 668 additions and 384 deletions

View file

@ -146,7 +146,7 @@
}
if (mArray.openmptcprouter.tun_service == false)
{
statusMessage += _('GloryTUN is not running') + '<br/>';
statusMessage += _('VPN is not running') + '<br/>';
}
if (mArray.openmptcprouter.dns == false)
{

View file

@ -164,6 +164,18 @@ end
</div>
</div>
<% end %>
<% if nixio.fs.access("/usr/sbin/dsvpn") then %>
<div class="cbi-value">
<label class="cbi-value-title"><%:A Dead Simple VPN key%></label>
<div class="cbi-value-field">
<input type="text" name="dsvpn_key" placeholder="A Dead Simple VPN key" class="cbi-input-text" value="<%=uci:get("dsvpn","vpn","key")%>">
<br />
<div class="cbi-value-description">
<%:A Dead Simple VPN is a TCP VPN that can replace Glorytun TCP%>
</div>
</div>
</div>
<% end %>
<% if nixio.fs.access("/usr/sbin/mlvpn") then %>
<div class="cbi-value">
<label class="cbi-value-title"><%:MLVPN password%></label>
@ -205,6 +217,8 @@ end
<% if nixio.fs.access("/usr/sbin/glorytun") then %><option value="glorytun_tcp" <% if uci:get("glorytun","vpn","enable") == "1" and uci:get("glorytun","vpn","proto") == "tcp" then %>selected="selected"<% end %>>Glorytun TCP</option><% end %>
<% elseif vpn == "glorytun-udp" then %>
<% 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 %>
<% elseif vpn == "dsvpn" then %>
<% if nixio.fs.access("/usr/sbin/dsvpn") then %><option value="dsvpn" <% if uci:get("dsvpn","vpn","enable") == "1" then %>selected="selected"<% end %>>A Dead Simple VPN</option><% end %>
<% elseif vpn == "mlvpn" then %>
<% 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 %>
<% elseif vpn == "openvpn" then %>
@ -219,6 +233,7 @@ end
%>
<% if nixio.fs.access("/usr/sbin/glorytun") then %><option value="glorytun_tcp" <% if uci:get("glorytun","vpn","enable") == "1" and uci:get("glorytun","vpn","proto") == "tcp" then %>selected="selected"<% end %>>Glorytun TCP</option><% end %>
<% 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/dsvpn") then %><option value="dsvpn" <% if uci:get("dsvpn","vpn","enable") == "1" then %>selected="selected"<% end %>>A Dead Simple VPN</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>