77cfbc2dceb01beb8c41282f6db1b437a2931fd9
[project/luci.git] / applications / luci-app-yggdrasil / htdocs / luci-static / resources / view / yggdrasil / tunnel_routing.js
1 'use strict';
2 'require form';
3
4 return L.view.extend({
5 render: function() {
6 var m, s, o;
7
8 m = new form.Map('yggdrasil', 'Yggdrasil');
9
10 s = m.section(form.TypedSection, "yggdrasil", _("Tunnel Routing"));
11 s.anonymous = true;
12 s.option(form.Flag, "TunnelRouting_Enable", "Enable tunnel routing",
13 _("Allow tunneling non-Yggdrasil traffic over Yggdrasil. This effectively " +
14 "allows you to use Yggdrasil to route to, or to bridge other networks, " +
15 "similar to a VPN tunnel. Tunnelling works between any two nodes and " +
16 "does not require them to be directly peered."));
17
18 o = m.section(form.TableSection, "ipv4_remote_subnet", _("IPv4 remote subnet"),
19 _("IPv4 subnets belonging to remote nodes, mapped to the node's public"));
20 o.option(form.Value, "key", _("Key"), _("Public encryption key"));
21 o.option(form.Value, "subnet", _("Subnet"), _("IPv4 subnet"));
22 o.anonymous = true;
23 o.addremove = true;
24
25 o = m.section(form.TableSection, "ipv4_local_subnet", _("IPv4 local subnet"),
26 _("IPv4 subnets belonging to this node's end of the tunnels. Only traffic " +
27 "from these ranges will be tunnelled."));
28 o.option(form.Value, "subnet", _("Subnet"), _("IPv4 subnet"));
29 o.anonymous = true;
30 o.addremove = true;
31
32 o = m.section(form.TableSection, "ipv6_remote_subnet", _("IPv6 remote subnet"),
33 _("IPv6 subnets belonging to remote nodes, mapped to the node's public"));
34 o.option(form.Value, "key", _("Key"), _("Public encryption key"));
35 o.option(form.Value, "subnet", _("Subnet"), _("IPv6 subnet"));
36 o.anonymous = true;
37 o.addremove = true;
38
39 o = m.section(form.TableSection, "ipv6_local_subnet", _("IPv6 local subnet"),
40 _("IPv6 subnets belonging to this node's end of the tunnels. Only traffic " +
41 "from these ranges (or the Yggdrasil node's IPv6 address/subnet) " +
42 "will be tunnelled."));
43 o.option(form.Value, "subnet", _("Subnet"), _("IPv6 subnet"));
44 o.anonymous = true;
45 o.addremove = true;
46
47 return m.render();
48 }
49 });