Skip to content

Instantly share code, notes, and snippets.

@FlatMapIO
Last active July 16, 2024 05:06
Show Gist options
  • Save FlatMapIO/765d55ee1eb8647d95e19d7455433d53 to your computer and use it in GitHub Desktop.
Save FlatMapIO/765d55ee1eb8647d95e19d7455433d53 to your computer and use it in GitHub Desktop.
const groupName = '美区服务'
const usServices = [
'claude.ai',
'anthropic.com',
'openai.com',
'adobe.com',
'adobe.io',
'meta.ai',
'hume.ai',
"google.com",
"google.dev",
'googleapis.com',
"music.youtube.com"
]
const directService = [
'codeium.com',
'appstorrent.ru'
]
module.exports.parse = ({ content, name, url }, { yaml, axios, notify }) => {
content['proxy-groups'].push({
name: '🇺🇸 美区专属',
type: 'select',
interval: 1800,
proxies: content.proxies
.filter((it) => it.name.includes('🇺🇸') || it.name.includes('美国'))
.map((it) => it.name),
})
content.rules.unshift(
...usServices.map((it) => `DOMAIN-SUFFIX,${it},🇺🇸 美区专属`),
)
content.rules.unshift(
...directService.map((it) => `DOMAIN-SUFFIX,${it},DIRECT`),
)
return content
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment