1 L
.network
.Protocol
.extend({
3 description
: L
.tr('IPv6-in-IPv4 (RFC4213)'),
7 populateForm: function(section
, iface
)
9 var wan
= L
.network
.findWAN();
11 section
.taboption('general', L
.cbi
.InputValue
, 'ipaddr', {
12 caption
: L
.tr('Local IPv4 address'),
13 description
: L
.tr('Leave empty to use the current WAN address'),
15 placeholder
: wan
? wan
.getIPv4Addrs()[0] : undefined,
19 section
.taboption('general', L
.cbi
.InputValue
, 'peeraddr', {
20 caption
: L
.tr('Remote IPv4 address'),
21 description
: L
.tr('This is usually the address of the nearest PoP operated by the tunnel broker'),
26 section
.taboption('general', L
.cbi
.InputValue
, 'ip6addr', {
27 caption
: L
.tr('Local IPv6 address'),
28 description
: L
.tr('This is the local endpoint address assigned by the tunnel broker'),
33 section
.taboption('general', L
.cbi
.InputValue
, 'ip6prefix', {
34 caption
: L
.tr('IPv6 routed prefix'),
35 description
: L
.tr('This is the prefix routed to you by the tunnel broker for use by clients'),
40 var update
= section
.taboption('general', L
.cbi
.CheckboxValue
, '_update', {
41 caption
: L
.tr('Dynamic tunnel'),
42 description
: L
.tr('Enable HE.net dynamic endpoint update'),
47 update
.save = function(sid
) { };
48 update
.ucivalue = function(sid
) {
49 var n
= parseInt(this.ownerMap
.get('network', sid
, 'tunnelid'));
53 section
.taboption('general', L
.cbi
.InputValue
, 'tunnelid', {
54 caption
: L
.tr('Tunnel ID'),
58 }).depends('_update', true);
60 section
.taboption('general', L
.cbi
.InputValue
, 'username', {
61 caption
: L
.tr('HE.net user ID'),
62 description
: L
.tr('The login name of the HE.net account'),
66 }).depends('_update', true);
68 section
.taboption('general', L
.cbi
.PasswordValue
, 'password', {
69 caption
: L
.tr('Password'),
70 description
: L
.tr('Tunnel update key or HE.net account password'),
73 }).depends('_update', true);
75 section
.taboption('advanced', L
.cbi
.CheckboxValue
, 'defaultroute', {
76 caption
: L
.tr('Default route'),
77 description
: L
.tr('Create IPv6 default route via tunnel'),
82 section
.taboption('advanced', L
.cbi
.InputValue
, 'ttl', {
83 caption
: L
.tr('Override TTL'),
84 description
: L
.tr('Specifies the Time-to-Live on the tunnel interface'),
85 datatype
: 'range(1,255)',