X-Git-Url: http://git.archive.openwrt.org/?a=blobdiff_plain;f=luci2%2Fhtdocs%2Fluci2%2Fproto%2F6rd.js;fp=luci2%2Fhtdocs%2Fluci2%2Fproto%2F6rd.js;h=47f6d29c9aadd52fb399e3a86582c1d169489c8e;hb=e6523658e2e2aa60d85b88cd4634bb2917d030cc;hp=0000000000000000000000000000000000000000;hpb=f90935da6e6d84e5f98a90c02a63a45ffea613a1;p=project%2Fluci2%2Fui.git diff --git a/luci2/htdocs/luci2/proto/6rd.js b/luci2/htdocs/luci2/proto/6rd.js new file mode 100644 index 0000000..47f6d29 --- /dev/null +++ b/luci2/htdocs/luci2/proto/6rd.js @@ -0,0 +1,63 @@ +L.NetworkModel.Protocol.extend({ + protocol: '6rd', + description: L.tr('IPv6-over-IPv4 (6rd)'), + tunnel: true, + virtual: true, + + populateForm: function(section, iface) + { + var wan = L.NetworkModel.findWAN(); + + section.taboption('general', L.cbi.InputValue, 'peeraddr', { + caption: L.tr('6RD Gateway'), + datatype: 'ip4addr', + optional: false + }); + + section.taboption('general', L.cbi.InputValue, 'ipaddr', { + caption: L.tr('Local IPv4 address'), + description: L.tr('Leave empty to use the current WAN address'), + datatype: 'ip4addr', + placeholder: wan ? wan.getIPv4Addrs()[0] : undefined, + optional: true + }); + + section.taboption('general', L.cbi.InputValue, 'ip4prefixlen', { + caption: L.tr('IPv4 prefix length'), + description: L.tr('The length of the IPv4 prefix in bits, the remainder is used in the IPv6 addresses'), + datatype: 'range(0, 32)', + placeholder: 0, + optional: true + }); + + section.taboption('general', L.cbi.InputValue, 'ip6prefix', { + caption: L.tr('IPv6 prefix'), + description: L.tr('The IPv6 prefix assigned to the provider, usually ends with "::"'), + datatype: 'ip6addr', + optional: false + }); + + section.taboption('general', L.cbi.InputValue, 'ip6prefixlen', { + caption: L.tr('IPv6 prefix length'), + description: L.tr('The length of the IPv6 prefix in bits'), + datatype: 'range(0, 128)', + placeholder: 16, + optional: true + }); + + section.taboption('advanced', L.cbi.CheckboxValue, 'defaultroute', { + caption: L.tr('Default route'), + description: L.tr('Create IPv6 default route via tunnel'), + optional: true, + initial: true + }); + + section.taboption('advanced', L.cbi.InputValue, 'ttl', { + caption: L.tr('Override TTL'), + description: L.tr('Specifies the Time-to-Live on the tunnel interface'), + datatype: 'range(1,255)', + placeholder: 64, + optional: true + }); + } +});