oc_ca_file = "/etc/openconnect/ca-" .. ifc .. ".pem"
server = section:taboption("general", Value, "server", translate("VPN Server"))
-server.datatype = "host"
+server.datatype = "host(0)"
port = section:taboption("general", Value, "port", translate("VPN Server port"))
port.placeholder = "443"
section:taboption("general", Value, "serverhash", translate("VPN Server's certificate SHA1 hash"))
-section:taboption("general", Value, "authgroup", translate("AuthGroup"))
+section:taboption("general", Value, "authgroup", translate("Auth Group"))
username = section:taboption("general", Value, "username", translate("Username"))
password = section:taboption("general", Value, "password", translate("Password"))
password.password = true
+password2 = section:taboption("general", Value, "password2", translate("Password2"))
+password2.password = true
cert = section:taboption("advanced", Value, "usercert", translate("User certificate (PEM encoded)"))
value = value:gsub("\r\n?", "\n")
nixio.fs.writefile(oc_ca_file, value)
end
+
+mtu = section:taboption("advanced", Value, "mtu", translate("Override MTU"))
+mtu.placeholder = "1406"
+mtu.datatype = "max(9200)"