network: increase maxelem of the ipsets

This commit is contained in:
Girish Ramakrishnan
2023-12-07 22:39:36 +01:00
parent 93d3b24300
commit 48f0c75c57
3 changed files with 24 additions and 14 deletions

View File

@@ -92,7 +92,7 @@ async function setBlocklist(blocklist, auditSource) {
++count;
}
if (count >= 65536) throw new BoxError(BoxError.CONFLICT, 'Blocklist is too large. Max 65536 entries are allowed'); // https://ipset.netfilter.org/ipset.man.html (maxelem)
if (count >= 262144) throw new BoxError(BoxError.CONFLICT, 'Blocklist is too large. Max 262144 entries are allowed'); // see the cloudron-firewall.sh
if (constants.DEMO) throw new BoxError(BoxError.CONFLICT, 'Not allowed in demo mode');
// store in blob since the value field is TEXT and has 16kb size limit