mirror of
https://github.com/kiddin9/op-packages.git
synced 2026-11-01 16:44:23 +08:00
💐 Sync 2026-09-30 01:19:34
This commit is contained in:
1 parent
67427d9030
commit
a64d55f7c5
50 files changed
+2837
-589
No files matched your search
@@ -23,7 +23,7 @@ return view.extend({
|
||||
render(fwuser) {
|
||||
return E([
|
||||
E('h2', _('Firewall - Custom Rules')),
|
||||
E('p', {}, _('Custom rules allow you to execute arbitrary iptables commands which are not otherwise covered by the firewall framework. The commands are executed after each firewall restart, right after the default ruleset has been loaded.')),
|
||||
E('p', {}, _('Custom rules allow you to define custom firewall rules which are not otherwise covered by the firewall framework. On firewall4 systems, these rules must use nftables syntax.'))
|
||||
E('p', {}, E('textarea', { 'style': 'width:100%', 'rows': 25 }, [ fwuser != null ? fwuser : '' ]))
|
||||
]);
|
||||
},
|
||||
|
||||
@@ -103,43 +103,6 @@ return view.extend({
|
||||
addTCPCCAOption();
|
||||
}
|
||||
|
||||
o = s.option(form.Flag, 'expose_wan', _('Expose WAN'), _('Danger! Proceed at your own risk.'));
|
||||
|
||||
o = s.option(form.Value, 'export', _('Ports to Expose'), _('Multiple ports can be, separated by spaces, format: 80 81 82'));
|
||||
o.depends('expose_wan', '1');
|
||||
o.validate = function(section_id, value) {
|
||||
if (value.match(/^(\d+\s*)+$/)) {
|
||||
return true;
|
||||
}
|
||||
return _('Please enter valid format.');
|
||||
};
|
||||
|
||||
o = s.option(form.ListValue, 'family', _('Restrict to address family'));
|
||||
o.modalonly = true;
|
||||
o.rmempty = true;
|
||||
o.depends('expose_wan', '1');
|
||||
o.value('', _('IPv4 and IPv6'));
|
||||
o.value('ipv4', _('IPv4 only'));
|
||||
o.value('ipv6', _('IPv6 only'));
|
||||
|
||||
o = s.option(form.ListValue, 'proto', _('Protocol'));
|
||||
o.modalonly = true;
|
||||
o.rmempty = true;
|
||||
o.default = 'tcp';
|
||||
o.depends('expose_wan', '1');
|
||||
o.value('tcp', _('TCP'));
|
||||
o.value('udp', _('UDP'));
|
||||
o.value('tudp', _('TCP+UDP'));
|
||||
|
||||
o = s.option(form.Flag, 'ex_ssh', _('Expose SSH'));
|
||||
o.depends('expose_wan', '1');
|
||||
o = s.option(form.Flag, 'ex_backend', _('Expose Backend'));
|
||||
o.depends('expose_wan', '1');
|
||||
o = s.option(form.Value, 'backend_port', _('Backend Port'), _('国内请使用除80,443外的端口'));
|
||||
o.depends('ex_backend', '1');
|
||||
o.rmempty = false;
|
||||
o.datatype = 'integer';
|
||||
|
||||
let p = [
|
||||
s.option(form.ListValue, 'input', _('Input')),
|
||||
s.option(form.ListValue, 'output', _('Output')),
|
||||
|
||||
Reference in new issue
Block a user