1 uci = require "luci.model.uci"
2 cursor = uci:cursor_state()
4 m = Map("cjdns", translate("cjdns"),
5 translate("Implements an encrypted IPv6 network using public-key \
6 cryptography for address allocation and a distributed hash table for \
7 routing. This provides near-zero-configuration networking, and prevents \
8 many of the security and scalability issues that plague existing \
11 m.on_after_commit = function(self)
12 os.execute("/etc/init.d/cjdns restart")
16 outgoing = m:section(TypedSection, "iptunnel_outgoing", translate("Outgoing IP Tunnel Connections"),
17 translate("Enter the public keys of the nodes that will provide Internet access."))
18 outgoing.anonymous = true
19 outgoing.addremove = true
20 outgoing.template = "cbi/tblsection"
22 outgoing:option(Value, "public_key", translate("Public Key")).size = 55
25 allowed = m:section(TypedSection, "iptunnel_allowed", translate("Allowed IP Tunnel Connections"),
26 translate("Enter the public key of the node you will provide Internet access to, along with the \
27 IPv4 and/or IPv6 address you will assign them."))
28 allowed.anonymous = true
29 allowed.addremove = true
31 public_key = allowed:option(Value, "public_key", translate("Public Key"))
32 public_key.template = "cjdns/value"
35 ipv4 = allowed:option(Value, "ipv4", translate("IPv4"))
36 ipv4.template = "cjdns/value"
37 ipv4.datatype = 'ipaddr'
40 ipv6 = allowed:option(Value, "ipv6", translate("IPv6"),
41 translate("IPv6 addresses should be entered <em>without</em> brackets here, e.g. <code>2001:123:ab::10</code>."))
42 ipv6.template = "cjdns/value"
43 ipv6.datatype = 'ip6addr'