mirror of
https://github.com/SukkaW/Surge.git
synced 2025-12-12 17:20:35 +08:00
Update AI / CDN Hosts
This commit is contained in:
parent
51262b97a9
commit
eceef112bc
@ -4,6 +4,7 @@ import path from 'path';
|
|||||||
import { task } from './trace';
|
import { task } from './trace';
|
||||||
|
|
||||||
import { exclude, merge } from 'fast-cidr-tools';
|
import { exclude, merge } from 'fast-cidr-tools';
|
||||||
|
import { getChnCidrPromise } from './build-chn-cidr';
|
||||||
|
|
||||||
// https://en.wikipedia.org/wiki/Reserved_IP_addresses
|
// https://en.wikipedia.org/wiki/Reserved_IP_addresses
|
||||||
const RESERVED_IPV4_CIDR = [
|
const RESERVED_IPV4_CIDR = [
|
||||||
@ -25,10 +26,14 @@ const RESERVED_IPV4_CIDR = [
|
|||||||
'240.0.0.0/4'
|
'240.0.0.0/4'
|
||||||
];
|
];
|
||||||
|
|
||||||
export const buildInternalReverseChnCIDR = task(import.meta.path, async () => {
|
export const buildInternalReverseChnCIDR = task(import.meta.path, async (span) => {
|
||||||
const cidr = await processLineFromReadline(await fetchRemoteTextByLine('https://raw.githubusercontent.com/misakaio/chnroutes2/master/chnroutes.txt'));
|
const cidrPromise = getChnCidrPromise();
|
||||||
|
const peeked = Bun.peek(cidrPromise);
|
||||||
|
const cidr: string[] = peeked === cidrPromise
|
||||||
|
? await span.traceChildPromise('download chnroutes2', cidrPromise)
|
||||||
|
: (peeked as string[]);
|
||||||
|
|
||||||
const reversedCidr = merge(
|
const reversedCidr = span.traceChildSync('build reversed chn cidr', () => merge(
|
||||||
exclude(
|
exclude(
|
||||||
['0.0.0.0/0'],
|
['0.0.0.0/0'],
|
||||||
RESERVED_IPV4_CIDR.concat(cidr),
|
RESERVED_IPV4_CIDR.concat(cidr),
|
||||||
@ -38,7 +43,7 @@ export const buildInternalReverseChnCIDR = task(import.meta.path, async () => {
|
|||||||
'223.118.0.0/15',
|
'223.118.0.0/15',
|
||||||
'223.120.0.0/15'
|
'223.120.0.0/15'
|
||||||
])
|
])
|
||||||
);
|
));
|
||||||
|
|
||||||
return Bun.write(path.resolve(import.meta.dir, '../List/internal/reversed-chn-cidr.txt'), `${reversedCidr.join('\n')}\n`);
|
return Bun.write(path.resolve(import.meta.dir, '../List/internal/reversed-chn-cidr.txt'), `${reversedCidr.join('\n')}\n`);
|
||||||
});
|
});
|
||||||
|
|||||||
@ -282,6 +282,7 @@ ajax.googleapis.com
|
|||||||
.storage.googleapis.com
|
.storage.googleapis.com
|
||||||
.firestore.googleapis.com
|
.firestore.googleapis.com
|
||||||
.firebasestorage.googleapis.com
|
.firebasestorage.googleapis.com
|
||||||
|
.content-storage-upload.googleapis.com
|
||||||
cdn.firebase.com
|
cdn.firebase.com
|
||||||
.ytimg.com
|
.ytimg.com
|
||||||
.ggpht.com
|
.ggpht.com
|
||||||
@ -788,6 +789,7 @@ app.viral-loops.com
|
|||||||
widget.cluster.groovehq.com
|
widget.cluster.groovehq.com
|
||||||
bot.ivy.ai
|
bot.ivy.ai
|
||||||
cdn.dotaoutpost.com
|
cdn.dotaoutpost.com
|
||||||
|
widget.uservoice.com
|
||||||
|
|
||||||
staticw2.yotpo.com
|
staticw2.yotpo.com
|
||||||
cdn-yotpo-images-production.yotpo.com
|
cdn-yotpo-images-production.yotpo.com
|
||||||
@ -2374,3 +2376,6 @@ assets.buttondown.email
|
|||||||
.xda-cdn.com
|
.xda-cdn.com
|
||||||
static.underhentai.net
|
static.underhentai.net
|
||||||
redircdn.com
|
redircdn.com
|
||||||
|
images7.design-editor.com
|
||||||
|
images8.design-editor.com
|
||||||
|
images.design-editor.com
|
||||||
|
|||||||
@ -16,5 +16,10 @@ DOMAIN-SUFFIX,claude.ai
|
|||||||
DOMAIN-SUFFIX,bard.google.com
|
DOMAIN-SUFFIX,bard.google.com
|
||||||
# Google Generative Language API
|
# Google Generative Language API
|
||||||
DOMAIN-SUFFIX,generativelanguage.googleapis.com
|
DOMAIN-SUFFIX,generativelanguage.googleapis.com
|
||||||
|
# Google AI Studio
|
||||||
|
DOMAIN,ai.google.dev
|
||||||
|
DOMAIN-SUFFIX,makersuite.google.com
|
||||||
|
DOMAIN,alkalicore-pa.clients6.google.com
|
||||||
|
DOMAIN,alkalimakersuite-pa.clients6.google.com
|
||||||
# POE
|
# POE
|
||||||
DOMAIN-SUFFIX,poe.com
|
DOMAIN-SUFFIX,poe.com
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user