Merge pull request #3179 from TDT-AG/pr/20191014-luci-app-openvpn
luci-app-openvpn: add missing proto param for ipv6
This commit is contained in:
commit
ce348cb0d3
1 changed files with 14 additions and 4 deletions
|
@ -47,10 +47,6 @@ local basicParams = {
|
||||||
"keepalive",
|
"keepalive",
|
||||||
"10 60",
|
"10 60",
|
||||||
translate("Helper directive to simplify the expression of --ping and --ping-restart in server mode configurations") },
|
translate("Helper directive to simplify the expression of --ping and --ping-restart in server mode configurations") },
|
||||||
{ ListValue,
|
|
||||||
"proto",
|
|
||||||
{ "udp", "tcp-client", "tcp-server" },
|
|
||||||
translate("Use protocol") },
|
|
||||||
{ Flag,
|
{ Flag,
|
||||||
"client",
|
"client",
|
||||||
0,
|
0,
|
||||||
|
@ -93,6 +89,20 @@ local basicParams = {
|
||||||
translate("Local private key") },
|
translate("Local private key") },
|
||||||
}
|
}
|
||||||
|
|
||||||
|
local has_ipv6 = fs.access("/proc/net/ipv6_route")
|
||||||
|
if has_ipv6 then
|
||||||
|
table.insert( basicParams, { ListValue,
|
||||||
|
"proto",
|
||||||
|
{ "udp", "tcp-client", "tcp-server", "udp6", "tcp6-client", "tcp6-server" },
|
||||||
|
translate("Use protocol")
|
||||||
|
})
|
||||||
|
else
|
||||||
|
table.insert( basicParams, { ListValue,
|
||||||
|
"proto",
|
||||||
|
{ "udp", "tcp-client", "tcp-server" },
|
||||||
|
translate("Use protocol")
|
||||||
|
})
|
||||||
|
end
|
||||||
|
|
||||||
local m = Map("openvpn")
|
local m = Map("openvpn")
|
||||||
m.redirect = luci.dispatcher.build_url("admin", "vpn", "openvpn")
|
m.redirect = luci.dispatcher.build_url("admin", "vpn", "openvpn")
|
||||||
|
|
Loading…
Reference in a new issue