deploy: ad542d45c826bebb42a9774f9940aca5cb74edf4

This commit is contained in:
SukkaBot
2022-09-21 15:45:50 +00:00
parent 372f352fc1
commit 82d0782994
5 changed files with 22 additions and 8532 deletions

View File

@@ -4,7 +4,10 @@ const { workerData, move } = require('piscina');
// This avoid calling chatCodeAt repeatedly
// workerData is an array of string. Sort it by length, short first:
const fullsetDomainStartsWithADot = workerData.sort((a, b) => a.length - b.length).filter(domain => domain.charCodeAt(0) === 46);
const fullsetDomainStartsWithADot = workerData.filter(domain => (
domain.charCodeAt(0) === 46
&& !canExcludeFromDedupe(domain)
));
const totalLen = fullsetDomainStartsWithADot.length;
module.exports = ({ chunk }) => {
@@ -14,6 +17,10 @@ module.exports = ({ chunk }) => {
for (let i = 0; i < chunkLength; i++) {
const domainFromInput = chunk[i];
if (canExcludeFromDedupe(domainFromInput)) {
continue;
}
for (let j = 0; j < totalLen; j++) {
const domainFromFullSet = fullsetDomainStartsWithADot[j];
// domainFromFullSet is now startsWith a "."
@@ -56,3 +63,11 @@ module.exports = ({ chunk }) => {
return move(outputToBeRemoved);
};
// duckdns.org domain will not overlap and doesn't need dedupe
function canExcludeFromDedupe(domain) {
if (domain.length === 23 && domain.endsWith('.duckdns.org')) {
return true;
}
return false;
}

View File

@@ -767,3 +767,5 @@ assets.gumroad.com
cdn.perfops.net
img.perfops.net
assets.ipstack.com
vice-web-statics-cdn.vice.com
video-images.vice.com

File diff suppressed because it is too large Load Diff

View File

@@ -35,6 +35,7 @@ DOMAIN-KEYWORD,49329d48d6c.
DOMAIN-KEYWORD,vsvevvcca
DOMAIN-KEYWORD,envci.
DOMAIN-KEYWORD,aarsenvs.
DOMAIN-SUFFIX,duckdns.org
# --- End of Blacklist Section

View File

@@ -24,7 +24,7 @@
<main class="container">
<h1>Sukka Surge Ruleset Server</h1>
<p>Made by <a href="https://skk.moe">Sukka</a> | <a href="https://github.com/SukkaW/Surge/">Source @ GitHub</a> | Licensed under <a href="https://github.com/SukkaW/Surge/blob/master/LICENSE" target="_blank">AGPL-3.0</a></p>
<p>Last Updated: 2022-09-21T13:00:12.844Z</p>
<p>Last Updated: 2022-09-21T15:45:48.200Z</p>
<hr>
<br>
<ul>