mirror of
https://github.com/SukkaW/Surge.git
synced 2025-12-12 17:20:35 +08:00
Update Tools & Proxy conf
This commit is contained in:
parent
6068062ac1
commit
c8dbc5fcb6
@ -5,6 +5,16 @@ const rDomain = /^(((?!\-))(xn\-\-)?[a-z0-9\-_]{0,61}[a-z0-9]{1,1}\.)*(xn\-\-)?(
|
|||||||
|
|
||||||
const DEBUG_DOMAIN_TO_FIND = null; // example.com | null
|
const DEBUG_DOMAIN_TO_FIND = null; // example.com | null
|
||||||
|
|
||||||
|
const warnOnceUrl = new Set();
|
||||||
|
const warnOnce = (url, isWhite, ...message) => {
|
||||||
|
const key = `${url}${isWhite ? 'white' : 'black'}`;
|
||||||
|
if (warnOnceUrl.has(key)) {
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
warnOnceUrl.add(key);
|
||||||
|
console.warn(url, isWhite ? '(white)' : '(black)', ...message);
|
||||||
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* @param {string | URL} domainListsUrl
|
* @param {string | URL} domainListsUrl
|
||||||
*/
|
*/
|
||||||
@ -32,7 +42,7 @@ async function processDomainLists (domainListsUrl) {
|
|||||||
const domainToAdd = line.trim();
|
const domainToAdd = line.trim();
|
||||||
|
|
||||||
if (DEBUG_DOMAIN_TO_FIND && domainToAdd.includes(DEBUG_DOMAIN_TO_FIND)) {
|
if (DEBUG_DOMAIN_TO_FIND && domainToAdd.includes(DEBUG_DOMAIN_TO_FIND)) {
|
||||||
console.log(DEBUG_DOMAIN_TO_FIND, 'found in domain list:', domainToAdd);
|
warnOnce(domainListsUrl.toString(), false, DEBUG_DOMAIN_TO_FIND);
|
||||||
}
|
}
|
||||||
|
|
||||||
domainSets.add(domainToAdd);
|
domainSets.add(domainToAdd);
|
||||||
@ -65,7 +75,7 @@ async function processHosts (hostsUrl, includeAllSubDomain = false) {
|
|||||||
const domain = domains.join(' ').trim();
|
const domain = domains.join(' ').trim();
|
||||||
|
|
||||||
if (DEBUG_DOMAIN_TO_FIND && domain.includes(DEBUG_DOMAIN_TO_FIND)) {
|
if (DEBUG_DOMAIN_TO_FIND && domain.includes(DEBUG_DOMAIN_TO_FIND)) {
|
||||||
console.log(DEBUG_DOMAIN_TO_FIND, 'found in hosts:', hostsUrl);
|
warnOnce(hostsUrl.toString(), false, DEBUG_DOMAIN_TO_FIND);
|
||||||
}
|
}
|
||||||
|
|
||||||
if (rDomain.test(domain)) {
|
if (rDomain.test(domain)) {
|
||||||
@ -119,6 +129,10 @@ async function processFilterRules (filterRulesUrl) {
|
|||||||
if (lineStartsWithDoubleVerticalBar && line.endsWith('^$badfilter')) {
|
if (lineStartsWithDoubleVerticalBar && line.endsWith('^$badfilter')) {
|
||||||
const domain = line.replace('||', '').replace('^$badfilter', '').trim();
|
const domain = line.replace('||', '').replace('^$badfilter', '').trim();
|
||||||
if (rDomain.test(domain)) {
|
if (rDomain.test(domain)) {
|
||||||
|
if (DEBUG_DOMAIN_TO_FIND && domain.includes(DEBUG_DOMAIN_TO_FIND)) {
|
||||||
|
warnOnce(filterRulesUrl.toString(), true, DEBUG_DOMAIN_TO_FIND);
|
||||||
|
}
|
||||||
|
|
||||||
whitelistDomainSets.add(domain);
|
whitelistDomainSets.add(domain);
|
||||||
}
|
}
|
||||||
} else if (line.startsWith('@@||')
|
} else if (line.startsWith('@@||')
|
||||||
@ -137,6 +151,10 @@ async function processFilterRules (filterRulesUrl) {
|
|||||||
.replaceAll('^', '')
|
.replaceAll('^', '')
|
||||||
.trim();
|
.trim();
|
||||||
if (rDomain.test(domain)) {
|
if (rDomain.test(domain)) {
|
||||||
|
if (DEBUG_DOMAIN_TO_FIND && domain.includes(DEBUG_DOMAIN_TO_FIND)) {
|
||||||
|
warnOnce(filterRulesUrl.toString(), true, DEBUG_DOMAIN_TO_FIND);
|
||||||
|
}
|
||||||
|
|
||||||
whitelistDomainSets.add(domain);
|
whitelistDomainSets.add(domain);
|
||||||
}
|
}
|
||||||
} else if (
|
} else if (
|
||||||
@ -156,7 +174,7 @@ async function processFilterRules (filterRulesUrl) {
|
|||||||
if (rDomain.test(domain)) {
|
if (rDomain.test(domain)) {
|
||||||
|
|
||||||
if (DEBUG_DOMAIN_TO_FIND && domain.includes(DEBUG_DOMAIN_TO_FIND)) {
|
if (DEBUG_DOMAIN_TO_FIND && domain.includes(DEBUG_DOMAIN_TO_FIND)) {
|
||||||
console.log(DEBUG_DOMAIN_TO_FIND, 'found in filter list:', hostsUrl);
|
warnOnce(filterRulesUrl.toString(), false, DEBUG_DOMAIN_TO_FIND);
|
||||||
}
|
}
|
||||||
|
|
||||||
blacklistDomainSets.add(`.${domain}`);
|
blacklistDomainSets.add(`.${domain}`);
|
||||||
@ -171,7 +189,7 @@ async function processFilterRules (filterRulesUrl) {
|
|||||||
if (rDomain.test(domain)) {
|
if (rDomain.test(domain)) {
|
||||||
|
|
||||||
if (DEBUG_DOMAIN_TO_FIND && domain.includes(DEBUG_DOMAIN_TO_FIND)) {
|
if (DEBUG_DOMAIN_TO_FIND && domain.includes(DEBUG_DOMAIN_TO_FIND)) {
|
||||||
console.log(DEBUG_DOMAIN_TO_FIND, 'found in filter list:', hostsUrl);
|
warnOnce(filterRulesUrl.toString(), false, DEBUG_DOMAIN_TO_FIND);
|
||||||
}
|
}
|
||||||
|
|
||||||
blacklistDomainSets.add(domain);
|
blacklistDomainSets.add(domain);
|
||||||
|
|||||||
30
List/domainset/my_proxy.conf
Normal file
30
List/domainset/my_proxy.conf
Normal file
@ -0,0 +1,30 @@
|
|||||||
|
.mikuclub.xyz
|
||||||
|
.mikuclub.cn
|
||||||
|
.saucenao.com
|
||||||
|
.fork.dev
|
||||||
|
.nextdns.io
|
||||||
|
.ibb.co
|
||||||
|
.sku.moe
|
||||||
|
.sukeycz.edu.kg
|
||||||
|
.services.googleapis.cn
|
||||||
|
.hostloc.com
|
||||||
|
.t66y.com
|
||||||
|
.zendesk.com
|
||||||
|
|
||||||
|
.services.mozilla.com
|
||||||
|
vscode-sync.trafficmanager.net
|
||||||
|
.cloudflare.com
|
||||||
|
.wakatime.com
|
||||||
|
|
||||||
|
.grammarly.com
|
||||||
|
.1password.com
|
||||||
|
.1password.eu
|
||||||
|
.1password.ca
|
||||||
|
|
||||||
|
.surge-activation.com
|
||||||
|
.yandex.com
|
||||||
|
|
||||||
|
ip.istatmenus.app
|
||||||
|
.exp-tas.com
|
||||||
|
.firefox.com
|
||||||
|
.visualstudio.com
|
||||||
@ -583,6 +583,7 @@ inside.rtbasia.com
|
|||||||
.ironbeast.io
|
.ironbeast.io
|
||||||
static.hotjar.com
|
static.hotjar.com
|
||||||
script.hotjar.com
|
script.hotjar.com
|
||||||
|
vars.hotjar.com
|
||||||
.onesignal.com
|
.onesignal.com
|
||||||
collector.xhamster.com
|
collector.xhamster.com
|
||||||
dc.services.visualstudio.com
|
dc.services.visualstudio.com
|
||||||
|
|||||||
@ -1,17 +1 @@
|
|||||||
DOMAIN-SUFFIX,mikuclub.xyz
|
# Deprecated
|
||||||
DOMAIN-SUFFIX,mikuclub.cn
|
|
||||||
DOMAIN-SUFFIX,saucenao.com
|
|
||||||
DOMAIN-SUFFIX,fork.dev
|
|
||||||
DOMAIN-SUFFIX,nextdns.io
|
|
||||||
DOMAIN-SUFFIX,ibb.co
|
|
||||||
DOMAIN-SUFFIX,sku.moe
|
|
||||||
DOMAIN-SUFFIX,sukeycz.edu.kg
|
|
||||||
DOMAIN-SUFFIX,services.googleapis.cn
|
|
||||||
DOMAIN-SUFFIX,hostloc.com
|
|
||||||
DOMAIN-SUFFIX,t66y.com
|
|
||||||
DOMAIN-SUFFIX,zendesk.com
|
|
||||||
|
|
||||||
DOMAIN-SUFFIX,services.mozilla.com
|
|
||||||
DOMAIN,vscode-sync.trafficmanager.net
|
|
||||||
DOMAIN,time.cloudflare.com
|
|
||||||
DOMAIN-SUFFIX,wakatime.com
|
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user