luci/applications/luci-app-yggdrasil/htdocs/luci-static/resources/view/yggdrasil/session_firewall.js
George Iv 277d4e3268 luci-app-yggdrasil: Add application for Yggdrasil
Signed-off-by: George Iv <57254463+zhoreeq@users.noreply.github.com>
2019-12-01 00:32:50 -05:00

38 lines
1.5 KiB
JavaScript

'use strict';
'require form';
return L.view.extend({
render: function() {
var m, s, o;
m = new form.Map('yggdrasil', 'Yggdrasil');
s = m.section(form.TypedSection, "yggdrasil", _("Session firewall settings"));
s.anonymous = true;
s.option(form.Flag, "SessionFirewall_Enable", _("Enable session firewall"),
_("If disabled, network traffic from any node will be allowed. If enabled, the below rules apply"));
s.option(form.Flag, "SessionFirewall_AllowFromDirect", _("Allow from direct"),
_("Allow network traffic from directly connected peers"));
s.option(form.Flag, "SessionFirewall_AllowFromRemote", _("Allow from remote"),
_("Allow network traffic from remote nodes on the network that you are not directly peered with"));
s.option(form.Flag, "SessionFirewall_AlwaysAllowOutbound",
_("Always allow outbound"), _("Allow outbound network traffic regardless of AllowFromDirect or AllowFromRemote"));
s = m.section(form.TableSection, "whitelisted_encryption_public_key",
_("Whitelisted public keys"),
_("Network traffic is always accepted from those peers, regardless of AllowFromDirect or AllowFromRemote"));
s.option(form.Value, "key", _("Public key"));
s.anonymous = true;
s.addremove = true;
s = m.section(form.TableSection, "blacklisted_encryption_public_key",
_("Blacklisted public keys"),
_("Network traffic is always rejected from those peers, regardless of AllowFromDirect or AllowFromRemote"));
s.option(form.Value, "key", _("Public key"));
s.anonymous = true;
s.addremove = true;
return m.render();
}
});