1 m = Map("cjdns", translate("cjdns"),
2 translate("Implements an encrypted IPv6 network using public-key \
3 cryptography for address allocation and a distributed hash table for \
4 routing. This provides near-zero-configuration networking, and prevents \
5 many of the security and scalability issues that plague existing \
8 dkjson = require("dkjson")
9 cjdns = require("cjdns")
12 local f = SimpleForm("cjdrouteconf", translate("Edit cjdroute.conf"),
13 translate("JSON interface to what's /etc/cjdroute.conf on other systems. \
14 Will be parsed and written to UCI by <code>cjdrouteconf set</code>."))
16 local o = f:field(Value, "_cjdrouteconf")
17 o.template = "cbi/tvalue"
20 function o.cfgvalue(self, section)
21 return dkjson.encode(cjdns.uci.get(), { indent = true })
24 function o.write(self, section, value)
25 local obj, pos, err = dkjson.decode(value, 1, nil)