diff --git a/l3config.js b/l3config.js index c9fbb85..880d4cb 100644 --- a/l3config.js +++ b/l3config.js @@ -277,8 +277,12 @@ function initForm() { const l3cfg = new L3Config(); l3cfg.addSection(new L3Section('gateway', new L3Input('Router Name','gatewayName', 'name', {type: 'search', placeholder: 'Router Name'}), - new L3Input('Router IPv4 Address','gatewayRouterIP', 'router_ip', {type: 'text', maxlength: 15}), - new L3Input('Router IPv6 Address','gatewayRouterIP6', 'router_ip6', {type: 'text', maxlength: 39}), + new L3MultiInput('+ Router IPv4 Address', () => l3cfg.handleUpdate(), function(idsuffix) { + return new L3Input(undefined,'gatewayRouterIP4'+idsuffix, 'router_ip', {type: 'search', maxlength: 15, placeholder: 'Router IPv4 Address'}); + }), + new L3MultiInput('+ Router IPv6 Address', () => l3cfg.handleUpdate(), function(idsuffix) { + return new L3Input(undefined,'gatewayRouterIP6'+idsuffix, 'router_ip6', {type: 'text', maxlength: 39, placeholder: 'Router IPv6 Address'}); + }), )); l3cfg.addSection(new L3Section('dns', new L3Input('Anycast DNS','dnsAnycast', 'server', {type: 'radio', name: 'anycast', value: 'fd43:5602:29bd:ffff:1:1:1:1', checked: ''}), @@ -292,6 +296,22 @@ function initForm() { new L3Input('Use VLAN','babelpeerVLAN', 'vlan', {type: 'number', min: 1, max: 4094}), new L3Input('Use Interface directly','babelpeerIFACE', 'iface', {type: 'text', placeholder: 'eth0, eth0.4, ...'}), )); + l3cfg.addSection(new L3Section('client', + new L3Input('Use VLAN','clientVLAN', 'vlan', {type: 'number', min: 1, max: 4094}), + new L3Input('Use Interface directly','clientIFACE', 'iface', {type: 'text', placeholder: 'eth0, eth0.4, ...'}), + new L3MultiInput('+ Client IPv6 Subnet', () => l3cfg.handleUpdate(), function(idsuffix) { + return new L3Input(undefined,'clientIP6Addr'+idsuffix, 'ip6addr', {type: 'text', maxlength: 39, placeholder: 'IPv6 CIDR, 2a0b:f4c0:XX:YYYY::/64, fd43:5602:29bd:XXXX::/64,...'}); + }), + new L3MultiInput('+ Client IPv4 Subnet', () => l3cfg.handleUpdate(), function(idsuffix) { + return new L3Input(undefined,'clientIPAddr'+idsuffix, 'ipaddr', {type: 'text', maxlength: 15, placeholder: 'IPv4 CIDR, 10.XX.YY.ZZ/24'}); + }), + new L3Input('IPv4 SNAT','clientSNAT', 'snat', {type: 'checkbox', value: 1}), + new L3Input('DHCP Start Address','clientDHCPStart', 'dhcp_start', {type: 'text', maxlength: 15, placeholder: 'IPv4 Address, 10.XX.YY.10'}), + new L3Input('DHCP Number of Addresses','clientDHCPLimit', 'dhcp_limit', {type: 'number', max: 65535}), + new L3Input('Wifi ESSID','clientESSID', 'essid', {type: 'text'}), + new L3Input('Wifi 2.4 GHz Channel','client2GHZ', 'chan2ghz', {type: 'number', min: 1, max: 13}), + new L3Input('Wifi 5 GHz Channel','client5GHZ', 'chan5ghz', {type: 'number', min: 36, max: 140}), + )); l3cfg.addSection(new L3MultiSection('+ vlan', () => l3cfg.handleUpdate(), function(idsuffix) { return new L3Section('vlan', new L3Input('Comment','vlanComment', 'comment', {type: 'text'}, ['client', 'wan']), @@ -309,7 +329,7 @@ function initForm() { l3cfg.addSection(new L3MultiSection('+ wireguardpeer', () => l3cfg.handleUpdate(), function(idsuffix) { return new L3Section('wireguardpeer', new L3Input('Endpoint Host', 'wireguardpeerEPHost'+idsuffix, 'endpoint_host', {type: 'text', required: ''}, ['peering.nue3.fff.community','ff1.zbau.f3netze.de','nsvm.f3netze.de','2a0b:f4c0:400::']), - new L3Input('Endpoint Port','wireguardpeerEPPort'+idsuffix, 'endpoint_port', {type: 'number', required: '', min:1, max: 65535}), + new L3Input('Endpoint Port','wireguardpeerEPPort'+idsuffix, 'endpoint_port', {type: 'number', required: '', min:1, max: 65535}), new L3Input('Persistent Keepalive','wireguardpeerPersistentKeepalive', 'persistent_keepalive', {type: 'number', min: 0, max: 65535, placeholder: '1 - 65535 Seconds...'}), new L3Input('Remote Public Key', 'wireguardpeerRemotePubKey'+idsuffix, 'remote_public_key', {type: 'text', minlength: 44, maxlength: 44, required: '', placeholder: 'base64 encoded public key'}), new L3Input('Local Private Key', 'wireguardpeerLocalPrivKey'+idsuffix, 'local_private_key', {type: 'text', minlength: 44, maxlength: 44, placeholder: 'base64 encoded private key'}),