feat(firewall): add IP set blocking convenience API with CIDR interval support and optional rule comments

This commit is contained in:
2026-04-26 15:05:50 +00:00
parent 75dacef68e
commit 6e7c0d90d8
9 changed files with 106 additions and 8 deletions
+12
View File
@@ -137,4 +137,16 @@ tap.test('should build IP set match rule', async () => {
expect(cmds[0]).toInclude('drop');
});
tap.test('should build IP set match rule with comment', async () => {
const cmds = buildIPSetMatchRule('mytable', 'ip', {
setName: 'blocklist',
direction: 'input',
matchField: 'saddr',
action: 'drop',
comment: 'managed blocklist',
});
expect(cmds[0]).toInclude('comment "managed blocklist"');
});
export default tap.start();