luci-proto-openvpn: fix 'remote' error check
authorPaul Donald <redacted>
Mon, 2 Mar 2026 15:01:47 +0000 (16:01 +0100)
committerPaul Donald <redacted>
Mon, 2 Mar 2026 15:01:47 +0000 (16:01 +0100)
remote can also take [ip|host]/port/proto

Signed-off-by: Paul Donald <redacted>
protocols/luci-proto-openvpn/htdocs/luci-static/resources/protocol/openvpn.js

index 1b4784e40e7d8e0fc809f994c5e067cfd32ca319..3f2d82a3b8055148403acea05ddd8d89005ccabb 100644 (file)
@@ -28,7 +28,7 @@ const openvpnOptions = [
        // --client Options error: specify only one of --tls-server, --tls-client, or --secret
        // --client also needs DCO(?)
        { tab: 'general', type: form.Flag, name: 'client', label: _('Configure client mode') + '<br/>' + _('Requires --tls-server, --tls-client, or --secret'), default: 0 },
-       { tab: 'general', type: form.DynamicList, name: 'remote', label: _('Remote host name or IP address'), placeholder: '1.2.3.4', datatype: 'or(hostname,ipaddr)' },
+       { tab: 'general', type: form.DynamicList, name: 'remote', datatype: 'tuple(host,port,string)', label: _('Remote host name or IP address'), placeholder: '1.2.3.4' },
        { tab: 'general', type: form.FileUpload, root_directory: '/etc/openvpn', name: 'ca', label: _('Certificate authority'), placeholder: '/etc/easy-rsa/keys/ca.crt' },
        { tab: 'general', type: form.FileUpload, root_directory: '/etc/openvpn', name: 'cert', label: _('Local certificate'), placeholder: '/etc/easy-rsa/keys/some-client.crt' },
        { tab: 'general', type: form.FileUpload, root_directory: '/etc/openvpn', name: 'key', label: _('Local private key'), placeholder: '/etc/easy-rsa/keys/some-client.key' },
git clone https://git.99rst.org/PROJECT