treewide: remove rendundant proto handler options
authorJo-Philipp Wich <jo@mein.io>
Thu, 6 Aug 2020 18:58:35 +0000 (20:58 +0200)
committerJo-Philipp Wich <jo@mein.io>
Mon, 15 Mar 2021 10:41:44 +0000 (11:41 +0100)
The introduction of network device configuration support also implemented
all common, protocol-independent interface options directly in the
interface config view, so drop the redundant option definitions.

Signed-off-by: Jo-Philipp Wich <jo@mein.io>
23 files changed:
modules/luci-base/htdocs/luci-static/resources/protocol/dhcp.js
modules/luci-base/htdocs/luci-static/resources/protocol/static.js
protocols/luci-proto-3g/htdocs/luci-static/resources/protocol/3g.js
protocols/luci-proto-hnet/htdocs/luci-static/resources/protocol/hnet.js
protocols/luci-proto-ipv6/htdocs/luci-static/resources/protocol/464xlat.js
protocols/luci-proto-ipv6/htdocs/luci-static/resources/protocol/6in4.js
protocols/luci-proto-ipv6/htdocs/luci-static/resources/protocol/6rd.js
protocols/luci-proto-ipv6/htdocs/luci-static/resources/protocol/6to4.js
protocols/luci-proto-ipv6/htdocs/luci-static/resources/protocol/dhcpv6.js
protocols/luci-proto-ipv6/htdocs/luci-static/resources/protocol/dslite.js
protocols/luci-proto-ipv6/htdocs/luci-static/resources/protocol/map.js
protocols/luci-proto-modemmanager/htdocs/luci-static/resources/protocol/modemmanager.js
protocols/luci-proto-ncm/htdocs/luci-static/resources/protocol/ncm.js
protocols/luci-proto-openconnect/htdocs/luci-static/resources/protocol/openconnect.js
protocols/luci-proto-ppp/htdocs/luci-static/resources/protocol/l2tp.js
protocols/luci-proto-ppp/htdocs/luci-static/resources/protocol/ppp.js
protocols/luci-proto-ppp/htdocs/luci-static/resources/protocol/pppoa.js
protocols/luci-proto-ppp/htdocs/luci-static/resources/protocol/pppoe.js
protocols/luci-proto-ppp/htdocs/luci-static/resources/protocol/pptp.js
protocols/luci-proto-pppossh/htdocs/luci-static/resources/protocol/pppossh.js
protocols/luci-proto-sstp/htdocs/luci-static/resources/protocol/sstp.js
protocols/luci-proto-vpnc/htdocs/luci-static/resources/protocol/vpnc.js
protocols/luci-proto-wireguard/htdocs/luci-static/resources/protocol/wireguard.js

index bacbf559f9ef334e516b24b76369d752b8c22573..9a63a107cf511ff7beb07f1c04f72a29bb1fb1b9 100644 (file)
@@ -34,21 +34,6 @@ return network.registerProtocol('dhcp', {
                o = s.taboption('advanced', form.Flag, 'broadcast', _('Use broadcast flag'), _('Required for certain ISPs, e.g. Charter with DOCSIS 3'));
                o.default = o.disabled;
 
-               o = s.taboption('advanced', form.Flag, 'defaultroute', _('Use default gateway'), _('If unchecked, no default route is configured'));
-               o.default = o.enabled;
-
-               o = s.taboption('advanced', form.Flag, 'peerdns', _('Use DNS servers advertised by peer'), _('If unchecked, the advertised DNS server addresses are ignored'));
-               o.default = o.enabled;
-
-               o = s.taboption('advanced', form.DynamicList, 'dns', _('Use custom DNS servers'));
-               o.depends('peerdns', '0');
-               o.datatype = 'ipaddr';
-               o.cast     = 'string';
-
-               o = s.taboption('advanced', form.Value, 'metric', _('Use gateway metric'));
-               o.placeholder = '0';
-               o.datatype    = 'uinteger';
-
                o = s.taboption('advanced', form.Value, 'clientid', _('Client ID to send when requesting DHCP'));
                o.datatype  = 'hexstring';
 
index 2d70ae681fa394f3acb82a16bcdd83f82b0f522b..82f499d6b902b9f04ce9b63032903832f8b9695f 100644 (file)
@@ -179,28 +179,6 @@ return network.registerProtocol('static', {
                s.taboption('general', this.CBINetmaskValue, 'netmask', _('IPv4 netmask'));
                s.taboption('general', this.CBIGatewayValue, 'gateway', _('IPv4 gateway'));
                s.taboption('general', this.CBIBroadcastValue, 'broadcast', _('IPv4 broadcast'));
-               s.taboption('general', form.DynamicList, 'dns', _('Use custom DNS servers'));
-
-               o = s.taboption('general', form.Value, 'ip6assign', _('IPv6 assignment length'), _('Assign a part of given length of every public IPv6-prefix to this interface'));
-               o.value('', _('disabled'));
-               o.value('64');
-               o.datatype = 'max(64)';
-
-               o = s.taboption('general', form.Value, 'ip6hint', _('IPv6 assignment hint'), _('Assign prefix parts using this hexadecimal subprefix ID for this interface.'));
-               o.placeholder = '0';
-               o.validate = function(section_id, value) {
-                       if (value == null || value == '')
-                               return true;
-
-                       var n = parseInt(value, 16);
-
-                       if (!/^(0x)?[0-9a-fA-F]+$/.test(value) || isNaN(n) || n >= 0xffffffff)
-                               return _('Expecting a hexadecimal assignment hint');
-
-                       return true;
-               };
-               for (var i = 33; i <= 64; i++)
-                       o.depends('ip6assign', String(i));
 
                o = s.taboption('general', form.DynamicList, 'ip6addr', _('IPv6 address'));
                o.datatype = 'ip6addr';
@@ -215,10 +193,6 @@ return network.registerProtocol('static', {
                o.datatype = 'ip6addr';
                o.depends('ip6assign', '');
 
-               o = s.taboption('general', form.Value, 'ip6ifaceid', _('IPv6 suffix'), _("Optional. Allowed values: 'eui64', 'random', fixed value like '::1' or '::1:2'. When IPv6 prefix (like 'a:b:c:d::') is received from a delegating server, use the suffix (like '::1') to form the IPv6 address ('a:b:c:d::1') for the interface."));
-               o.datatype = 'ip6hostid';
-               o.placeholder = '::1';
-
                o = s.taboption('advanced', form.Value, 'macaddr', _('Override MAC address'));
                o.datatype = 'macaddr';
                o.placeholder = dev ? (dev.getMAC() || '') : '';
@@ -226,9 +200,5 @@ return network.registerProtocol('static', {
                o = s.taboption('advanced', form.Value, 'mtu', _('Override MTU'));
                o.datatype = 'max(9200)';
                o.placeholder = dev ? (dev.getMTU() || '1500') : '1500';
-
-               o = s.taboption('advanced', form.Value, 'metric', _('Use gateway metric'));
-               o.placeholder = this.getMetric() || '0';
-               o.datatype = 'uinteger';
        }
 });
index 07bed36c23aedec1fedad9d0d08ee8c40620b72c..12acb74d9f06e8c5414918af73a0f9844f3156ed 100644 (file)
@@ -113,21 +113,6 @@ return network.registerProtocol('3g', {
                o.placeholder = '10';
                o.datatype    = 'min(1)';
 
-               o = s.taboption('advanced', form.Flag, 'defaultroute', _('Use default gateway'), _('If unchecked, no default route is configured'));
-               o.default = o.enabled;
-
-               o = s.taboption('advanced', form.Value, 'metric', _('Use gateway metric'));
-               o.placeholder = '0';
-               o.datatype    = 'uinteger';
-               o.depends('defaultroute', '1');
-
-               o = s.taboption('advanced', form.Flag, 'peerdns', _('Use DNS servers advertised by peer'), _('If unchecked, the advertised DNS server addresses are ignored'));
-               o.default = o.enabled;
-
-               o = s.taboption('advanced', form.DynamicList, 'dns', _('Use custom DNS servers'));
-               o.depends('peerdns', '0');
-               o.datatype = 'ipaddr';
-
                o = s.taboption('advanced', form.Value, '_keepalive_failure', _('LCP echo failure threshold'), _('Presume peer to be dead after given amount of LCP echo failures, use 0 to ignore failures'));
                o.placeholder = '0';
                o.datatype    = 'uinteger';
index 84396ede08150668a74e885eac5f15adb165b271..b8776e873fb6f43f5979bb4f1010e1f560589ce2 100644 (file)
@@ -24,10 +24,6 @@ return network.registerProtocol('hnet', {
                o.value('hybrid', _('Hybrid'));
                o.default = 'auto';
 
-               o = s.taboption('advanced', form.Value, 'ip6assign', _('IPv6 assignment length'), _('Assign a part of given length of every public IPv6-prefix to this interface'));
-               o.datatype = 'max(128)';
-               o.default = '64';
-
                s.taboption('advanced', form.Value, 'link_id', _('IPv6 assignment hint'), _('Assign prefix parts using this hexadecimal subprefix ID for this interface.'));
 
                o = s.taboption('advanced', form.Value, 'ip4assign', _('IPv4 assignment length'));
index a74708fd012dcc0fdea975fc64c4c3ca0a5fad1a..9cfdadd9a6dd7f48ac1fd8ff15f6d3f34395bfa1 100644 (file)
@@ -45,14 +45,6 @@ return network.registerProtocol('464xlat', {
                o.nocreate = true;
                o.exclude  = s.section;
 
-               o = s.taboption('advanced', form.Flag, 'defaultroute', _('Default gateway'), _('If unchecked, no default route is configured'));
-               o.default = o.enabled;
-
-               o = s.taboption('advanced', form.Value, 'metric', _('Use gateway metric'));
-               o.placeholder = '0';
-               o.datatype    = 'uinteger';
-               o.depends('defaultroute', '1');
-
                o = s.taboption('advanced', form.Value, 'mtu', _('Use MTU on tunnel interface'));
                o.placeholder = '1280';
                o.datatype    = 'max(9200)';
index f26ced7b4011bd03608bbf2ff3c967920c293dff..92540570ef0cc81f9263b71596e5357f4c9c0dc3 100644 (file)
@@ -82,14 +82,6 @@ return network.registerProtocol('6in4', {
                o.password = true;
                o.depends('_update', '1');
 
-               o = s.taboption('advanced', form.Flag, 'defaultroute', _('Default gateway'), _('If unchecked, no default route is configured'));
-               o.default = o.enabled;
-
-               o = s.taboption('advanced', form.Value, 'metric', _('Use gateway metric'));
-               o.placeholder = '0';
-               o.datatype    = 'uinteger';
-               o.depends('defaultroute', '1');
-
                o = s.taboption('advanced', form.Value, 'ttl', _('Use TTL on tunnel interface'));
                o.placeholder = '64';
                o.datatype    = 'range(1,255)';
index 6a8f506bc90cc67abb53e536caa2fb68086f7fd3..415c3a89e795e9c04350ec7c344c99f44f5e8692 100644 (file)
@@ -62,14 +62,6 @@ return network.registerProtocol('6rd', {
                o.placeholder = '0';
                o.datatype    = 'range(0,32)';
 
-               o = s.taboption('advanced', form.Flag, 'defaultroute', _('Default gateway'), _('If unchecked, no default route is configured'));
-               o.default = o.enabled;
-
-               o = s.taboption('advanced', form.Value, 'metric', _('Use gateway metric'));
-               o.placeholder = '0';
-               o.datatype    = 'uinteger';
-               o.depends('defaultroute', '1');
-
                o = s.taboption('advanced', form.Value, 'ttl', _('Use TTL on tunnel interface'));
                o.placeholder = '64';
                o.datatype    = 'range(1,255)';
index abfe1c8fc48d560d08f85d4f4ec4cfc7edf877c8..f572562332cadc38e21f887ac38d9c36259d94bb 100644 (file)
@@ -46,14 +46,6 @@ return network.registerProtocol('6to4', {
                        }, this));
                };
 
-               o = s.taboption('advanced', form.Flag, 'defaultroute', _('Default gateway'), _('If unchecked, no default route is configured'));
-               o.default = o.enabled;
-
-               o = s.taboption('advanced', form.Value, 'metric', _('Use gateway metric'));
-               o.placeholder = '0';
-               o.datatype    = 'uinteger';
-               o.depends('defaultroute', '1');
-
                o = s.taboption('advanced', form.Value, 'ttl', _('Use TTL on tunnel interface'));
                o.placeholder = '64';
                o.datatype    = 'range(1,255)';
index eba58f42489bc5dbd2258cafd61eb885aa3bc84c..41fdc6d9d56ef84fcd51cafa8da35720ee4c5aa0 100644 (file)
@@ -30,20 +30,6 @@ return network.registerProtocol('dhcpv6', {
                o.value('64');
                o.default = 'auto';
 
-               o = s.taboption('advanced', form.Flag, 'defaultroute', _('Use default gateway'), _('If unchecked, no default route is configured'));
-               o.default = o.enabled;
-
-               o = s.taboption('advanced', form.DynamicList, 'ip6prefix', _('Custom delegated IPv6-prefix'));
-               o.datatype = 'cidr6';
-
-               o = s.taboption('advanced', form.Flag, 'peerdns', _('Use DNS servers advertised by peer'), _('If unchecked, the advertised DNS server addresses are ignored'));
-               o.default = o.enabled;
-
-               o = s.taboption('advanced', form.DynamicList, 'dns', _('Use custom DNS servers'));
-               o.depends('peerdns', '0');
-               o.datatype = 'ipaddr';
-               o.cast     = 'string';
-
                o = s.taboption('advanced', form.Value, 'clientid', _('Client ID to send when requesting DHCP'));
                o.datatype  = 'hexstring';
 
index fa0e68ddc3c9b7a23458ddcc029b28132fa14603..5f1fbf4f7a9ab1bdf1a0e9c928564a74ad79402e 100644 (file)
@@ -64,14 +64,6 @@ return network.registerProtocol('dslite', {
                for (var i = 0; i < 256; i++)
                        o.value(i);
 
-               o = s.taboption('advanced', form.Flag, 'defaultroute', _('Default gateway'), _('If unchecked, no default route is configured'));
-               o.default = o.enabled;
-
-               o = s.taboption('advanced', form.Value, 'metric', _('Use gateway metric'));
-               o.placeholder = '0';
-               o.datatype    = 'uinteger';
-               o.depends('defaultroute', '1');
-
                o = s.taboption('advanced', form.Value, 'mtu', _('Use MTU on tunnel interface'));
                o.placeholder = '1280';
                o.datatype    = 'max(9200)';
index 5c292af619d36a71a78272a2e4a9d4a53684775a..82e016921030904e085f7143f5a93a35c40e6f36 100644 (file)
@@ -77,14 +77,6 @@ return network.registerProtocol('map', {
                o.nocreate = true;
                o.exclude  = s.section;
 
-               o = s.taboption('advanced', form.Flag, 'defaultroute', _('Default gateway'), _('If unchecked, no default route is configured'));
-               o.default = o.enabled;
-
-               o = s.taboption('advanced', form.Value, 'metric', _('Use gateway metric'));
-               o.placeholder = '0';
-               o.datatype    = 'uinteger';
-               o.depends('defaultroute', '1');
-
                o = s.taboption('advanced', form.Value, 'ttl', _('Use TTL on tunnel interface'));
                o.placeholder = '64';
                o.datatype    = 'range(1,255)';
index 4a6913e8bd097700a70a7b1612ed03a805e40b5c..1851cbe1caa349058cad6b90444b35f77b7f8386 100644 (file)
@@ -120,11 +120,8 @@ return network.registerProtocol('modemmanager', {
                o = s.taboption('advanced', form.Value, 'mtu', _('Override MTU'));
                o.placeholder = dev ? (dev.getMTU() || '1500') : '1500';
                o.datatype    = 'max(9200)';
-               
+
                o = s.taboption('general', form.Value, 'signalrate', _('Signal Refresh Rate'), _("In seconds"));
                o.datatype = 'uinteger';
-               
-               s.taboption('general', form.Value, 'metric', _('Gateway metric'));
-
        }
 });
index 3ab6c01d61e631e96b4bce87f816373c665791fa..8496b7de3c84ad770cf8e6d21d00770eaf0d8716 100644 (file)
@@ -104,20 +104,5 @@ return network.registerProtocol('ncm', {
                o = s.taboption('advanced', form.Value, 'delay', _('Modem init timeout'), _('Maximum amount of seconds to wait for the modem to become ready'));
                o.placeholder = '10';
                o.datatype    = 'min(1)';
-
-               o = s.taboption('advanced', form.Flag, 'defaultroute', _('Default gateway'), _('If unchecked, no default route is configured'));
-               o.default = o.enabled;
-
-               o = s.taboption('advanced', form.Value, 'metric', _('Use gateway metric'));
-               o.placeholder = '0';
-               o.datatype    = 'uinteger';
-               o.depends('defaultroute', '1');
-
-               o = s.taboption('advanced', form.Flag, 'peerdns', _('Use DNS servers advertised by peer'), _('If unchecked, the advertised DNS server addresses are ignored'));
-               o.default = o.enabled;
-
-               o = s.taboption('advanced', form.DynamicList, 'dns', _('Use custom DNS servers'));
-               o.depends('peerdns', '0');
-               o.datatype = 'ipaddr';
        }
 });
index 388812d893f4da058e24f46b7fcd961cc39513cc..2c29614aeecc32a26901dd9b689e03b385cb0e19 100644 (file)
@@ -153,14 +153,6 @@ return network.registerProtocol('openconnect', {
                        return callSetCertificateFiles(section_id, null, null, sanitizeCert(value));
                };
 
-               o = s.taboption('advanced', form.Flag, 'defaultroute', _('Default gateway'), _('If unchecked, no default route is configured'));
-               o.default = o.enabled;
-
-               o = s.taboption('advanced', form.Value, 'metric', _('Use gateway metric'));
-               o.placeholder = '0';
-               o.datatype    = 'uinteger';
-               o.depends('defaultroute', '1');
-
                o = s.taboption('advanced', form.Value, 'mtu', _('Override MTU'));
                o.optional = true;
                o.placeholder = 1406;
index 13bb3548a7e7ed6c5196de08bb57854efdead3ab..4ea0e2f7d0f9d1bfefff6b3ab18f53e1a7e1593e 100644 (file)
@@ -53,21 +53,6 @@ return network.registerProtocol('l2tp', {
                        o.default = 'auto';
                }
 
-               o = s.taboption('advanced', form.Flag, 'defaultroute', _('Use default gateway'), _('If unchecked, no default route is configured'));
-               o.default = o.enabled;
-
-               o = s.taboption('advanced', form.Flag, 'peerdns', _('Use DNS servers advertised by peer'), _('If unchecked, the advertised DNS server addresses are ignored'));
-               o.default = o.enabled;
-
-               o = s.taboption('advanced', form.DynamicList, 'dns', _('Use custom DNS servers'));
-               o.depends('peerdns', '0');
-               o.datatype = 'ipaddr';
-               o.cast     = 'string';
-
-               o = s.taboption('advanced', form.Value, 'metric', _('Use gateway metric'));
-               o.placeholder = '0';
-               o.datatype    = 'uinteger';
-
                o = s.taboption('advanced', form.Value, 'mtu', _('Override MTU'));
                o.placeholder = dev ? (dev.getMTU() || '1500') : '1500';
                o.datatype    = 'max(9200)';
index 57a7b6a0e115a0043cb45b3e2f50044db01ce817..f5a484f3578288088006780b7b07a800ee9262b5 100644 (file)
@@ -97,21 +97,6 @@ return network.registerProtocol('ppp', {
                        o.default = 'auto';
                }
 
-               o = s.taboption('advanced', form.Flag, 'defaultroute', _('Use default gateway'), _('If unchecked, no default route is configured'));
-               o.default = o.enabled;
-
-               o = s.taboption('advanced', form.Flag, 'peerdns', _('Use DNS servers advertised by peer'), _('If unchecked, the advertised DNS server addresses are ignored'));
-               o.default = o.enabled;
-
-               o = s.taboption('advanced', form.DynamicList, 'dns', _('Use custom DNS servers'));
-               o.depends('peerdns', '0');
-               o.datatype = 'ipaddr';
-               o.cast     = 'string';
-
-               o = s.taboption('advanced', form.Value, 'metric', _('Use gateway metric'));
-               o.placeholder = '0';
-               o.datatype    = 'uinteger';
-
                o = s.taboption('advanced', form.Value, '_keepalive_failure', _('LCP echo failure threshold'), _('Presume peer to be dead after given amount of LCP echo failures, use 0 to ignore failures'));
                o.placeholder = '0';
                o.datatype    = 'uinteger';
index 483ac9e555e7887db59518c0ebf092226f38feec..495a581a6c4be6e319e9ed127b5767d35871a309 100644 (file)
@@ -84,21 +84,6 @@ return network.registerProtocol('pppoa', {
                        o.default = 'auto';
                }
 
-               o = s.taboption('advanced', form.Flag, 'defaultroute', _('Use default gateway'), _('If unchecked, no default route is configured'));
-               o.default = o.enabled;
-
-               o = s.taboption('advanced', form.Flag, 'peerdns', _('Use DNS servers advertised by peer'), _('If unchecked, the advertised DNS server addresses are ignored'));
-               o.default = o.enabled;
-
-               o = s.taboption('advanced', form.DynamicList, 'dns', _('Use custom DNS servers'));
-               o.depends('peerdns', '0');
-               o.datatype = 'ipaddr';
-               o.cast     = 'string';
-
-               o = s.taboption('advanced', form.Value, 'metric', _('Use gateway metric'));
-               o.placeholder = '0';
-               o.datatype    = 'uinteger';
-
                o = s.taboption('advanced', form.Value, '_keepalive_failure', _('LCP echo failure threshold'), _('Presume peer to be dead after given amount of LCP echo failures, use 0 to ignore failures'));
                o.placeholder = '0';
                o.datatype    = 'uinteger';
index 5d71c43376b3bc792a0307f5e7539d7b11fd76df..9ec2a81d3e59671f09c398b5296e6c7c6431c9da 100644 (file)
@@ -58,21 +58,6 @@ return network.registerProtocol('pppoe', {
                        o.default = 'auto';
                }
 
-               o = s.taboption('advanced', form.Flag, 'defaultroute', _('Use default gateway'), _('If unchecked, no default route is configured'));
-               o.default = o.enabled;
-
-               o = s.taboption('advanced', form.Flag, 'peerdns', _('Use DNS servers advertised by peer'), _('If unchecked, the advertised DNS server addresses are ignored'));
-               o.default = o.enabled;
-
-               o = s.taboption('advanced', form.DynamicList, 'dns', _('Use custom DNS servers'));
-               o.depends('peerdns', '0');
-               o.datatype = 'ipaddr';
-               o.cast     = 'string';
-
-               o = s.taboption('advanced', form.Value, 'metric', _('Use gateway metric'));
-               o.placeholder = '0';
-               o.datatype    = 'uinteger';
-
                o = s.taboption('advanced', form.Value, '_keepalive_failure', _('LCP echo failure threshold'), _('Presume peer to be dead after given amount of LCP echo failures, use 0 to ignore failures'));
                o.placeholder = '0';
                o.datatype    = 'uinteger';
index 006adc1a1e994e5df62a9a3d2cfca0956031de79..871fb34b4cd9b0f0332568846d1db9c1830746eb 100644 (file)
@@ -71,21 +71,6 @@ return network.registerProtocol('pptp', {
                        o.default = 'auto';
                }
 
-               o = s.taboption('advanced', form.Flag, 'defaultroute', _('Use default gateway'), _('If unchecked, no default route is configured'));
-               o.default = o.enabled;
-
-               o = s.taboption('advanced', form.Flag, 'peerdns', _('Use DNS servers advertised by peer'), _('If unchecked, the advertised DNS server addresses are ignored'));
-               o.default = o.enabled;
-
-               o = s.taboption('advanced', form.DynamicList, 'dns', _('Use custom DNS servers'));
-               o.depends('peerdns', '0');
-               o.datatype = 'ipaddr';
-               o.cast     = 'string';
-
-               o = s.taboption('advanced', form.Value, 'metric', _('Use gateway metric'));
-               o.placeholder = '0';
-               o.datatype    = 'uinteger';
-
                o = s.taboption('advanced', form.Value, '_keepalive_failure', _('LCP echo failure threshold'), _('Presume peer to be dead after given amount of LCP echo failures, use 0 to ignore failures'));
                o.placeholder = '0';
                o.datatype    = 'uinteger';
index ec8e8a152eb369d121d2366f75db6319287382d1..3c233f1e1bd35750b47d46b94a6395d57fe46f98 100644 (file)
@@ -94,21 +94,6 @@ return network.registerProtocol('pppossh', {
                        o.default = o.disabled;
                }
 
-               o = s.taboption('advanced', form.Flag, 'defaultroute', _('Use default gateway'), _('If unchecked, no default route is configured'));
-               o.default = o.enabled;
-
-               o = s.taboption('advanced', form.Flag, 'peerdns', _('Use DNS servers advertised by peer'), _('If unchecked, the advertised DNS server addresses are ignored'));
-               o.default = o.enabled;
-
-               o = s.taboption('advanced', form.DynamicList, 'dns', _('Use custom DNS servers'));
-               o.depends('peerdns', '0');
-               o.datatype = 'ipaddr';
-               o.cast     = 'string';
-
-               o = s.taboption('advanced', form.Value, 'metric', _('Use gateway metric'));
-               o.placeholder = '0';
-               o.datatype    = 'uinteger';
-
                o = s.taboption('advanced', form.Value, '_keepalive_failure', _('LCP echo failure threshold'), _('Presume peer to be dead after given amount of LCP echo failures, use 0 to ignore failures'));
                o.placeholder = '0';
                o.datatype    = 'uinteger';
index 55ae2f97e6e85aa3d3bcfcacd32ad5db94f24530..b568f17018fe00cc9ddc28bc07cf930bfdd3044a 100644 (file)
@@ -58,22 +58,6 @@ return network.registerProtocol('sstp', {
                o.value('4', _('4', 'sstp log level value'));
                o.default = '0';
 
-               var defaultroute = s.taboption('advanced', form.Flag, 'defaultroute', _('Use default gateway'), _('If unchecked, no default route is configured'));
-               defaultroute.default = defaultroute.enabled;
-
-               o = s.taboption('advanced', form.Value, 'metric', _('Use gateway metric'));
-               o.placeholder = '0';
-               o.datatype    = 'uinteger';
-               o.depends('defaultroute', defaultroute.enabled);
-
-               o = s.taboption('advanced', form.Flag, 'peerdns', _('Use DNS servers advertised by peer'), _('If unchecked, the advertised DNS server addresses are ignored'));
-               o.default = o.enabled;
-
-               o = s.taboption('advanced', form.DynamicList, 'dns', _('Use custom DNS servers'));
-               o.depends('peerdns', '0');
-               o.datatype = 'ipaddr';
-               o.cast     = 'string';
-
                o = s.taboption('advanced', form.Value, 'mtu', _('Override MTU'));
                o.placeholder = dev ? (dev.getMTU() || '1500') : '1500';
                o.datatype    = 'max(9200)';
index 87ccc9df1c0702eb45c7f303ff9556a22db4e08b..bec6c7ffa26cd27802b39566a241eecd69123a87 100644 (file)
@@ -103,9 +103,5 @@ return network.registerProtocol('vpnc', {
                o = s.taboption('general', form.Value, 'target_network', _('Target network'));
                o.placeholder = '0.0.0.0/0';
                o.datatype    = 'network';
-
-               o = s.taboption('general', form.ListValue, 'defaultroute', _('Default Route'), _('Set VPN as Default Route'));
-               o.value('0', _('No'));
-               o.value('1', _('Yes'));
        }
 });
index 4690ecfc7ffa1f6226366c5635a8044e1bf08cce..dd933c95447e63c19b23f4182d8bf81791f39616 100644 (file)
@@ -89,11 +89,6 @@ return network.registerProtocol('wireguard', {
 
                // -- advanced --------------------------------------------------------------------
 
-               o = s.taboption('advanced', form.Value, 'metric', _('Metric'), _('Optional'));
-               o.datatype = 'uinteger';
-               o.placeholder = '0';
-               o.optional = true;
-
                o = s.taboption('advanced', form.Value, 'mtu', _('MTU'), _('Optional. Maximum Transmission Unit of tunnel interface.'));
                o.datatype = 'range(1280,1420)';
                o.placeholder = '1420';