mirror of
https://github.com/Ysurac/openmptcprouter-feeds.git
synced 2025-03-09 15:40:03 +00:00
Remove static key for openvpn
This commit is contained in:
parent
8e3a6ced89
commit
a7d41e1d6f
3 changed files with 23 additions and 60 deletions
|
@ -543,26 +543,6 @@ function wizard_add()
|
|||
ucic:save("ubond")
|
||||
ucic:commit("ubond")
|
||||
|
||||
-- Set OpenVPN settings
|
||||
local openvpn_key = luci.http.formvalue("openvpn_key")
|
||||
if openvpn_key ~= "" then
|
||||
local openvpn_key_path = "/etc/luci-uploads/openvpn.key"
|
||||
local fp
|
||||
luci.http.setfilehandler(
|
||||
function(meta, chunk, eof)
|
||||
if not fp and meta and meta.name == "openvpn_key" then
|
||||
fp = io.open(openvpn_key_path, "w")
|
||||
end
|
||||
if fp and chunk then
|
||||
fp:write(chunk)
|
||||
end
|
||||
if fp and eof then
|
||||
fp:close()
|
||||
end
|
||||
end)
|
||||
ucic:set("openvpn","omr","secret",openvpn_key_path)
|
||||
end
|
||||
|
||||
if default_vpn == "openvpn" then
|
||||
ucic:set("openvpn","omr","enabled",1)
|
||||
ucic:set("network","omrvpn","proto","dhcp")
|
||||
|
|
|
@ -236,19 +236,6 @@ end
|
|||
</div>
|
||||
</div>
|
||||
<% end %>
|
||||
<% if nixio.fs.access("/usr/sbin/openvpn") then %>
|
||||
<div class="cbi-value">
|
||||
<label class="cbi-value-title"><%:OpenVPN key%></label>
|
||||
<div class="cbi-value-field">
|
||||
<input type="file" name="openvpn_key" class="cbi-input-file">
|
||||
<input type="text" class="cbi-input-text" data-update="change" value="<%=uci:get("openvpn","omr","secret")%>" />
|
||||
<br />
|
||||
<div class="cbi-value-description">
|
||||
<%:You need to upload OpenVPN key file generated by server install script to use OpenVPN TCP%>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<% end %>
|
||||
<div class="cbi-value">
|
||||
<label class="cbi-value-title"><%:Default VPN%></label>
|
||||
<div class="cbi-value-field">
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue