summaryrefslogtreecommitdiffhomepage
path: root/protocols/luci-proto-openconnect/htdocs/luci-static/resources
diff options
context:
space:
mode:
authorNikos Mavrogiannopoulos <n.mavrogiannopoulos@gmail.com>2024-05-18 21:00:25 +0200
committerPaul Donald <newtwen+github@gmail.com>2024-05-28 11:04:40 +0200
commit03d6dec7d25cb87981b4beffe3a1d18d4cc8854c (patch)
tree72cf954ecf736ddf4dce4457a03439f14e3c6d73 /protocols/luci-proto-openconnect/htdocs/luci-static/resources
parent46a2acac92adff44eedf8bd33820c8c30e50b64d (diff)
luci-proto-openconnect: use the uri configuration option
This enables more advanced configuration by allowing complex URIs, including user groups and hidden directories (camouflage). It further simplifies the configuration by eliminating the port and usergroup parameters. Signed-off-by: Nikos Mavrogiannopoulos <n.mavrogiannopoulos@gmail.com>
Diffstat (limited to 'protocols/luci-proto-openconnect/htdocs/luci-static/resources')
-rw-r--r--protocols/luci-proto-openconnect/htdocs/luci-static/resources/protocol/openconnect.js10
1 files changed, 3 insertions, 7 deletions
diff --git a/protocols/luci-proto-openconnect/htdocs/luci-static/resources/protocol/openconnect.js b/protocols/luci-proto-openconnect/htdocs/luci-static/resources/protocol/openconnect.js
index 6ff530eb40..a3d000c953 100644
--- a/protocols/luci-proto-openconnect/htdocs/luci-static/resources/protocol/openconnect.js
+++ b/protocols/luci-proto-openconnect/htdocs/luci-static/resources/protocol/openconnect.js
@@ -101,7 +101,8 @@ return network.registerProtocol('openconnect', {
o.value('pulse', 'Pulse Connect Secure SSL VPN');
o.value('array', 'Array Networks SSL VPN');
- o = s.taboption('general', form.Value, 'server', _('VPN Server'));
+ o = s.taboption('general', form.Value, 'uri', _('VPN Server'));
+ o.placeholder = 'https://example.com:443/usergroup';
o.validate = function(section_id, value) {
var m = String(value).match(/^(?:(\w+):\/\/|)(?:\[([0-9a-f:.]{2,45})\]|([^\/:]+))(?::([0-9]{1,5}))?(?:\/.*)?$/i);
@@ -109,7 +110,7 @@ return network.registerProtocol('openconnect', {
return _('Invalid server URL');
if (m[1] != null) {
- if (!m[1].match(/^(?:http|https|socks|socks4|socks5)$/i))
+ if (!m[1].match(/^(?:https|socks|socks4|socks5)$/i))
return _('Unsupported protocol');
}
@@ -138,13 +139,8 @@ return network.registerProtocol('openconnect', {
return true;
};
- o = s.taboption('general', form.Value, 'port', _('VPN Server port'));
- o.placeholder = '443';
- o.datatype = 'port';
-
s.taboption('general', form.Value, 'serverhash', _("VPN Server's certificate SHA1 hash"));
s.taboption('general', form.Value, 'authgroup', _('Auth Group'));
- s.taboption('general', form.Value, 'usergroup', _('User Group'));
s.taboption("general", form.Value, "username", _("Username"));
o = s.taboption('general', form.Value, 'password', _('Password'));