mirror of
https://gitlab.com/SukkaW/ruleset.skk.moe.git
synced 2026-04-18 09:44:35 +00:00
deploy: ad542d45c826bebb42a9774f9940aca5cb74edf4
This commit is contained in:
@@ -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;
|
||||
}
|
||||
|
||||
@@ -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
@@ -35,6 +35,7 @@ DOMAIN-KEYWORD,49329d48d6c.
|
||||
DOMAIN-KEYWORD,vsvevvcca
|
||||
DOMAIN-KEYWORD,envci.
|
||||
DOMAIN-KEYWORD,aarsenvs.
|
||||
DOMAIN-SUFFIX,duckdns.org
|
||||
|
||||
# --- End of Blacklist Section
|
||||
|
||||
|
||||
@@ -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>
|
||||
|
||||
Reference in New Issue
Block a user