1
0

settings.lua 3.4 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667
  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 \
  6. networks."))
  7. m.on_after_commit = function(self)
  8. os.execute("/etc/init.d/cjdns restart")
  9. end
  10. s = m:section(NamedSection, "cjdns", nil, translate("Settings"))
  11. s.addremove = false
  12. -- Identity
  13. s:tab("identity", translate("Identity"))
  14. node6 = s:taboption("identity", Value, "ipv6", translate("IPv6 address"),
  15. translate("This node's IPv6 address within the cjdns network."))
  16. node6.datatype = "ip6addr"
  17. pbkey = s:taboption("identity", Value, "public_key", translate("Public key"),
  18. translate("Used for packet encryption and authentication."))
  19. pbkey.datatype = "string"
  20. prkey = s:taboption("identity", Value, "private_key", translate("Private key"),
  21. translate("Keep this private. When compromised, generate a new keypair and IPv6."))
  22. prkey.datatype = "string"
  23. -- Admin Interface
  24. s:tab("admin", translate("Admin API"), translate("The Admin API can be used by other applications or services to configure and inspect cjdns' routing and peering.<br/><br/>Documentation: <a href=\"https://github.com/cjdelisle/cjdns/tree/master/admin#cjdns-admin-api\">admin/README.md</a>"))
  25. aip = s:taboption("admin", Value, "admin_address", translate("IP Address"),
  26. translate("IPv6 addresses should be entered like so: <code>[2001::1]</code>."))
  27. apt = s:taboption("admin", Value, "admin_port", translate("Port"))
  28. apt.datatype = "port"
  29. apw = s:taboption("admin", Value, "admin_password", translate("Password"))
  30. apw.datatype = "string"
  31. -- Security
  32. s:tab("security", translate("Security"), translate("Functionality related to hardening the cjdroute process."))
  33. s:taboption("security", Flag, "seccomp", translate("SecComp sandboxing"))
  34. -- UDP Interfaces
  35. udp_interfaces = m:section(TypedSection, "udp_interface", translate("UDP Interfaces"),
  36. translate("These interfaces allow peering via public IP networks, such as the Internet, or many community-operated wireless networks. IPv6 addresses should be entered with square brackets, like so: <code>[2001::1]</code>."))
  37. udp_interfaces.anonymous = true
  38. udp_interfaces.addremove = true
  39. udp_interfaces.template = "cbi/tblsection"
  40. udp_address = udp_interfaces:option(Value, "address", translate("IP Address"))
  41. udp_address.placeholder = "0.0.0.0"
  42. udp_interfaces:option(Value, "port", translate("Port")).datatype = "portrange"
  43. -- Ethernet Interfaces
  44. eth_interfaces = m:section(TypedSection, "eth_interface", translate("Ethernet Interfaces"),
  45. translate("These interfaces allow peering via local Ethernet networks, such as home or office networks, or phone tethering. If an interface name is set to \"all\" each available device will be used."))
  46. eth_interfaces.anonymous = true
  47. eth_interfaces.addremove = true
  48. eth_interfaces.template = "cbi/tblsection"
  49. eth_bind = eth_interfaces:option(Value, "bind", translate("Network Interface"))
  50. eth_bind.placeholder = "br-lan"
  51. eth_beacon = eth_interfaces:option(Value, "beacon", translate("Beacon Mode"))
  52. eth_beacon:value(0, translate("0 -- Disabled"))
  53. eth_beacon:value(1, translate("1 -- Accept beacons"))
  54. eth_beacon:value(2, translate("2 -- Accept and send beacons"))
  55. eth_beacon.default = 2
  56. eth_beacon.datatype = "integer(range(0,2))"
  57. return m