diff options
Diffstat (limited to 'luci2/htdocs/luci2/proto/6to4.js')
-rw-r--r-- | luci2/htdocs/luci2/proto/6to4.js | 35 |
1 files changed, 35 insertions, 0 deletions
diff --git a/luci2/htdocs/luci2/proto/6to4.js b/luci2/htdocs/luci2/proto/6to4.js new file mode 100644 index 0000000..4ec81b0 --- /dev/null +++ b/luci2/htdocs/luci2/proto/6to4.js @@ -0,0 +1,35 @@ +L.NetworkModel.Protocol.extend({ + protocol: '6to4', + description: L.tr('IPv6-over-IPv4 (6to4)'), + tunnel: true, + virtual: true, + + populateForm: function(section, iface) + { + 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', + optional: true + }).load = function() { + var wan = L.NetworkModel.findWAN(); + if (wan) + this.options.placeholder = wan.getIPv4Addrs()[0]; + }; + + 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 + }); + } +}); |