---[[
-LuCI - Lua Configuration Interface
-
-Copyright 2014 Nikos Mavrogiannopoulos <n.mavrogiannopoulos@gmail.com>
-
-Licensed under the Apache License, Version 2.0 (the "License");
-you may not use this file except in compliance with the License.
-You may obtain a copy of the License at
-
- http://www.apache.org/licenses/LICENSE-2.0
-
-]]--
+-- Copyright 2014 Nikos Mavrogiannopoulos <n.mavrogiannopoulos@gmail.com>
+-- Licensed to the public under the Apache License 2.0.
local fs = require "nixio.fs"
local has_ipv6 = fs.access("/proc/net/ipv6_route")
found_pki = true
elseif found_pki then
local hash = ln:match("([a-f0-9]+)")
- o_pki.default = hash and hash:upper()
+ o_pki.default = hash and "sha1:" .. hash:upper()
complete = complete + 1
found_pki = false
end
o:value("plain")
o:value("PAM")
-o = s:taboption("general", Value, "zone", translate("Firewall Zone"),
- translate("The firewall zone that the VPN clients will be set to"))
-o.nocreate = true
-o.default = "lan"
-o.template = "cbi/firewall_zonelist"
-
s:taboption("general", Value, "port", translate("Port"),
translate("The same UDP and TCP ports will be used"))
s:taboption("general", Value, "max_clients", translate("Max clients"))
translate("The assigned IPs will be selected deterministically"))
pip.default = "1"
+local compr = s:taboption("general", Flag, "compression", translate("Enable compression"),
+ translate("Enable compression"))
+compr.default = "1"
+
local udp = s:taboption("general", Flag, "udp", translate("Enable UDP"),
translate("Enable UDP channel support; this must be enabled unless you know what you are doing"))
udp.default = "1"