luci-proto-openvpn: sync with proto script updates

make push(_reset) independent of server

The manual notes that push is a legal option in a client
context, i.e. the client can set these also.
Add also push_remove.

fix also the datatype for 'remote' to allow various combos.

Signed-off-by: Paul Donald <newtwen+github@gmail.com>
This commit is contained in:
Paul Donald
2026-03-11 18:04:19 +01:00
parent eaaeb6520d
commit d08ae634a8

View File

@@ -50,7 +50,7 @@ const openvpnOptions = [
tab: 'general',
type: form.DynamicList,
name: 'remote',
datatype: 'tuple(host,port,string)',
datatype: 'or(host,tuple(host,port),tuple(host,port,string))',
label: _('Remote host name or IP address'),
placeholder: '1.2.3.4'
},
@@ -381,14 +381,6 @@ const openvpnOptions = [
label: _('Run up/down scripts for all restarts'),
default: 0
},
{
tab: 'scripts',
depends: { script_security: /[1-3]/ },
type: form.Value,
name: 'route_pre_up',
placeholder: '/usr/bin/ovpn-routepreup',
label: _('Execute shell cmd before routes are added')
},
{
tab: 'scripts',
depends: { script_security: /[1-3]/ },
@@ -458,7 +450,7 @@ const openvpnOptions = [
depends: { script_security: /[1-3]/ },
type: form.Value,
name: 'tls_crypt_v2_verify',
placeholder: '/usr/bin/ovpn-tlscryp2v2verify',
placeholder: '/usr/bin/ovpn-tlscryptv2verify',
label: _('Run script cmd for client TLS verification')
},
{
@@ -1341,15 +1333,19 @@ const openvpnOptions = [
/* Push/Client */
{
tab: 'push_opt',
depends: { server: "", "!reverse": true },
type: form.DynamicList,
name: 'push',
label: _('Push options to peer'),
lvalues: ['redirect-gateway']
}, // values: ['comp-lzo']
},
{
tab: 'push_opt',
type: form.DynamicList,
name: 'push_remove',
label: _('Remove Push options'),
},
{
tab: 'push_opt',
depends: { server: "", "!reverse": true },
type: form.Flag,
name: 'push_reset',
label: _('Don\'t inherit global push options'),