mirror of
https://github.com/SukkaW/Surge.git
synced 2026-01-29 01:51:52 +08:00
Update Reject & Domestic Rules
This commit is contained in:
@@ -386,6 +386,7 @@ export const PREDEFINED_WHITELIST = [
|
||||
'email.accounts.bitly.com', // Fuck Peter Lowe Hosts
|
||||
'adsense.google.com', // Fuck Peter Lowe Hosts
|
||||
'api.vip.miui.com', // Fuck Goodbye Xiaomi Ads
|
||||
'api.comm.miui.com', // Xiaomi MIUI phone number database update URL
|
||||
'.ai.api.xiaomi.com', // Fuck Goodbye Xiaomi Ads
|
||||
'm.stripe.com', // EasyPrivacy only blocks m.stripe.com wwith $third-party,
|
||||
// yet stupid AdGuardDNSFilter blocks all of it. Stupid AdGuard
|
||||
|
||||
@@ -241,8 +241,6 @@ export abstract class RuleOutput<TPreprocessed = unknown> {
|
||||
}
|
||||
|
||||
private guardPendingPromise() {
|
||||
console.log('Pending promise:', this.pendingPromise);
|
||||
|
||||
// reverse invariant
|
||||
if (this.pendingPromise !== null) {
|
||||
console.trace('Pending promise:', this.pendingPromise);
|
||||
|
||||
@@ -128,6 +128,27 @@ export class DomainsetOutput extends RuleOutput<Preprocessed> {
|
||||
results.push(`/${keyword}/`);
|
||||
}
|
||||
|
||||
for (const ipGroup of [this.ipcidr, this.ipcidrNoResolve]) {
|
||||
for (const ipcidr of ipGroup) {
|
||||
if (ipcidr.endsWith('/32')) {
|
||||
results.push(`||${ipcidr.slice(0, -3)}`);
|
||||
} else if (ipcidr.endsWith('.0/24')) {
|
||||
results.push(`||${ipcidr.slice(0, -6)}.*`);
|
||||
} else {
|
||||
results.push(`||${ipcidr}^`);
|
||||
}
|
||||
}
|
||||
}
|
||||
for (const ipGroup of [this.ipcidr6, this.ipcidr6NoResolve]) {
|
||||
for (const ipcidr of ipGroup) {
|
||||
if (ipcidr.endsWith('/128')) {
|
||||
results.push(`||${ipcidr.slice(0, -4)}`);
|
||||
} else {
|
||||
results.push(`||${ipcidr}`);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
return results;
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user