diff options
author | William Fleurant <meshnet@protonmail.com> | 2023-11-30 20:30:45 +0100 |
---|---|---|
committer | William Fleurant <meshnet@protonmail.com> | 2023-11-30 20:30:45 +0100 |
commit | c9786be7518929f076ad9a1abe190b2573851128 (patch) | |
tree | 5c0dfefd43d36cb1844b2f809ca9c9a76ef127e0 /applications/luci-app-yggdrasil/htdocs/luci-static/resources/view/yggdrasil/settings.js | |
parent | 6fdafc4155899da13c17ab4a6f5d78bc90cc18ef (diff) |
luci-app-yggdrasil: revert: remove package in favor of luci-proto-yggdrasil
This reverts commit e6a1f119e6ec2eed48ea583d8176c21bf658a499.
Signed-off-by: William Fleurant <meshnet@protonmail.com>
Diffstat (limited to 'applications/luci-app-yggdrasil/htdocs/luci-static/resources/view/yggdrasil/settings.js')
-rw-r--r-- | applications/luci-app-yggdrasil/htdocs/luci-static/resources/view/yggdrasil/settings.js | 58 |
1 files changed, 58 insertions, 0 deletions
diff --git a/applications/luci-app-yggdrasil/htdocs/luci-static/resources/view/yggdrasil/settings.js b/applications/luci-app-yggdrasil/htdocs/luci-static/resources/view/yggdrasil/settings.js new file mode 100644 index 0000000000..8bc63dadc2 --- /dev/null +++ b/applications/luci-app-yggdrasil/htdocs/luci-static/resources/view/yggdrasil/settings.js @@ -0,0 +1,58 @@ +'use strict'; +'require view'; +'require form'; + +return view.extend({ + render: function() { + var m, s, o; + + m = new form.Map('yggdrasil', 'Yggdrasil'); + + s = m.section(form.TypedSection, 'yggdrasil', _('General settings')); + s.anonymous = true; + + s.option(form.Value, "IfName", _("Yggdrasil's network interface name")); + + s.option(form.Flag, "NodeInfoPrivacy", _("Enable NodeInfo privacy"), + _("By default, nodeinfo contains some defaults including the platform," + + " architecture and Yggdrasil version. These can help when surveying" + + " the network and diagnosing network routing problems. Enabling" + + " nodeinfo privacy prevents this, so that only items specified in" + + " \"NodeInfo\" are sent back if specified.")); + + o = s.option(form.Value, "NodeInfo", _("NodeInfo"), + _("Optional node info. This must be a { \"key\": \"value\", ... } map " + + "or set as null. This is entirely optional but, if set, is visible " + + "to the whole network on request.")); + o.validate = function(k, v) { + try { JSON.parse(v); return true; } catch (e) { return e.message; } + } + + s.option(form.Value, "IfMTU", _("MTU size for the interface")); + + o = m.section(form.TableSection, "listen_address", _("Listen addresses"), + _("Listen addresses for incoming connections. You will need to add " + + "listeners in order to accept incoming peerings from non-local nodes. " + + "Multicast peer discovery will work regardless of any listeners set " + + "here. Each listener should be specified in URI format as above, e.g. " + + "tcp://0.0.0.0:0 or tcp://[::]:0 to listen on all interfaces.")); + o.option(form.Value, "uri", + _("e.g. tcp://0.0.0.0:0 or tcp://[::]:0")); + o.anonymous = true; + o.addremove = true; + + o = m.section(form.TableSection, "multicast_interface", _("Multicast interface"), + _("Configuration for which interfaces multicast peer discovery should be enabled on. " + + "Regex is a regular expression which is matched against an interface name, and interfaces use the first configuration that they match gainst. " + + "Beacon configures whether or not the node should send link-local multicast beacons to advertise their presence, while listening for incoming connections on Port. " + + "Listen controls whether or not the node listens for multicast beacons and opens outgoing connections.")); + o.option(form.Value, "regex", _("Regular expression")); + o.option(form.Flag, "beacon", _("Send beacons")); + o.option(form.Flag, "listen", _("Listen for beacons")); + o.option(form.Value, "port", _("Link-local port")); + o.anonymous = true; + o.addremove = true; + + return m.render(); + } +}); |