Created
July 29, 2025 08:45
-
-
Save CodeBoy2006/ac69db3835750faff0caa015a022dbc5 to your computer and use it in GitHub Desktop.
Mihomo Party Override
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| /** | |
| * ไธชไบบๅคไปฝไฝฟ็จ๏ผ่ฏฅ่ๆฌ้็จไธMihomo Partyๅ Clash Verge Rev | |
| * Clash Verge Rev ๅ จๅฑๆฉๅฑ่ๆฌ๏ผๆไบบ้ ็ฝฎ๏ผ/ Mihomo Party ่ฆๅ่ๆฌ | |
| * | |
| * V6: Applied modern DNS and performance optimizations. | |
| * - Replaced old DNS structure with a robust nameserver/fallback model to prevent leaks. | |
| * - Enabled DNS over QUIC (prefer-h3) for faster lookups. | |
| * - Removed default-nameserver to eliminate startup leaks. | |
| * - Added experimental tcp-concurrent for latency reduction. | |
| * V5: Added proxy node preprocessing to rename nodes conflicting with group names. | |
| * V4: Expanded EU country list in euKeywords. Filter logic remains V3 (negative lookarounds). | |
| */ | |
| // --- Helper Function for Creating Filter Regex --- | |
| /** | |
| * Creates a case-insensitive regex string for filtering proxy names. | |
| * Ensures keywords containing English letters are not directly adjacent to other English letters. | |
| * Allows other characters (spaces, numbers, symbols, CJK, etc.) to be adjacent. | |
| * @param {string[]} items - Array of keywords (e.g., ['HK', 'Hong Kong', '้ฆๆธฏ', '๐ญ๐ฐ']) | |
| * @returns {string} - A regex string like '(?i)((?<![a-zA-Z])HK(?![a-zA-Z])|(?<![a-zA-Z])Hong Kong(?![a-zA-Z])|้ฆๆธฏ|๐ญ๐ฐ)' | |
| */ | |
| function createFilterRegex(items) { | |
| const regexItems = items.map(item => { | |
| // Escape potential regex special characters within the item | |
| const escapedItem = item.replace(/[-\/\\^$*+?.()|[\]{}]/g, '\\$&'); | |
| // Apply lookarounds ONLY if the item contains English letters | |
| if (/[a-zA-Z]/.test(escapedItem)) { | |
| // Assert not preceded by an English letter AND not followed by an English letter | |
| return `(?<![a-zA-Z])${escapedItem}(?![a-zA-Z])`; | |
| } else { | |
| // For flags, pure CJK, etc., match literally | |
| return escapedItem; | |
| } | |
| }); | |
| // Combine with OR '|' and add case-insensitive flag (?i) | |
| return `(?i)(${regexItems.join('|')})`; | |
| } | |
| // --- End Helper Function --- | |
| // ๅค่ฎข้ ๅๅนถ๏ผ่ฟ้ๆทปๅ ้ขๅค็ๅฐๅ | |
| const proxyProviders = { | |
| }; | |
| // ็จๅบๅ ฅๅฃ | |
| function main(config) { | |
| const initialProxies = config?.proxies ?? []; | |
| const proxyCount = initialProxies.length; | |
| const originalProviders = config?.["proxy-providers"] || {}; | |
| const proxyProviderCount = typeof originalProviders === "object" ? Object.keys(originalProviders).length : 0; | |
| const addedProviderCount = typeof proxyProviders === "object" ? Object.keys(proxyProviders).length : 0; | |
| // Check if there are any proxies or providers defined at all | |
| if (proxyCount === 0 && proxyProviderCount === 0 && addedProviderCount === 0) { | |
| // Throw error only if *absolutely nothing* is defined (no initial proxies, no original providers, no added providers) | |
| // If providers exist (original or added), we assume proxies *will* be loaded later. | |
| throw new Error("้ ็ฝฎๆไปถๅ่ๆฌไธญๅๆชๆพๅฐไปปไฝไปฃ็ๆไปฃ็่ฎข้ "); | |
| } | |
| // Generate proxy groups first to get their names | |
| const generatedProxyGroups = generateProxyGroups(); // Use function to generate groups | |
| const groupNames = new Set(generatedProxyGroups.map(group => group.name)); | |
| // --- Preprocess existing proxies to avoid name conflicts --- | |
| let renamedCount = 0; | |
| if (Array.isArray(initialProxies) && initialProxies.length > 0) { | |
| config.proxies = initialProxies.map(proxy => { | |
| if (proxy && typeof proxy.name === 'string' && groupNames.has(proxy.name)) { | |
| const oldName = proxy.name; | |
| const newName = `${oldName}_node`; // Append suffix | |
| // Optional: Log the renaming action if running in an environment that supports console.log | |
| // console.log(`Renaming conflicting proxy node: "${oldName}" -> "${newName}"`); | |
| renamedCount++; | |
| return { ...proxy, name: newName }; // Return a new object with the modified name | |
| } | |
| return proxy; // Return unchanged proxy | |
| }); | |
| // Optional: Log summary if needed | |
| // if (renamedCount > 0) { | |
| // console.log(`Renamed ${renamedCount} proxy node(s) that conflicted with group names.`); | |
| // } | |
| } | |
| // --- End Preprocessing --- | |
| // Assign configurations | |
| config["proxy-providers"] = { ...originalProviders, ...proxyProviders }; | |
| config["dns"] = dnsConfig; // Assign the new, optimized DNS config | |
| config["proxy-groups"] = generatedProxyGroups; | |
| config["rule-providers"] = ruleProviders; | |
| config["rules"] = rules; | |
| config["mixed-port"] = 7890; | |
| config["allow-lan"] = true; | |
| config["bind-address"] = "*"; | |
| config["ipv6"] = true; | |
| config["unified-delay"] = true; | |
| // --- ADDED: Experimental Features for Performance --- | |
| // Enables concurrent TCP/UDP requests to reduce latency, especially on high-latency links. | |
| // For best results, TCP Fast Open support should be enabled in the OS kernel (Linux/macOS). | |
| config["experimental"] = { | |
| "tcp-concurrent": true, | |
| "udp-concurrent": true, // Enable for UDP as well if needed | |
| }; | |
| // Add tun configuration if needed for TUN mode | |
| // config["tun"] = { | |
| // "enable": true, | |
| // "stack": "system", // or "gvisor" or "mixed" | |
| // "device": "utun", // Or other name like tun0 / clash | |
| // "dns-hijack": ["any:53"] | |
| // }; | |
| return config; | |
| } | |
| // =================================================================================== | |
| // --- OPTIMIZED DNS CONFIGURATION --- | |
| // 1. fallback: If 'nameserver' (primary) returns a poisoned IP, 'fallback' is used. | |
| // 2. fallback-filter: Automatically uses 'fallback' for non-Chinese domains, preventing leaks and speeding up foreign lookups. | |
| // 3. prefer-h3: Enables DNS over QUIC/HTTP3 for faster lookups. | |
| // 4. Removed default-nameserver: Prevents potential DNS leaks on startup. | |
| // 5. IP#Host format: Bypasses simple domain-based DNS blocking. | |
| // =================================================================================== | |
| // Primary DNS for domestic domains (fast and in China) | |
| const domesticNameservers = [ | |
| "https://223.5.5.5/dns-query", // AliDNS DoH | |
| "https://doh.pub/dns-query", // Tencent DoH | |
| ]; | |
| // Fallback DNS for foreign domains (via proxy, privacy-focused) | |
| const foreignNameservers = [ | |
| "https://1.1.1.1/dns-query#host=cloudflare-dns.com", // Cloudflare DNS (IP format for robustness) | |
| "https://dns.google/dns-query", // Google DNS | |
| "https://9.9.9.9/dns-query", // Quad9 DNS | |
| ]; | |
| // The optimized DNS configuration object | |
| const dnsConfig = { | |
| "enable": true, | |
| "listen": "0.0.0.0:1053", | |
| "ipv6": true, // Keep enabled, but can be disabled if local IPv6 is poor | |
| "prefer-h3": true, // Enable DNS over QUIC for speed | |
| "respect-rules": true, // IMPORTANT: Must be true for nameserver-policy to work | |
| "use-system-hosts": false, | |
| "cache-algorithm": "arc", | |
| "enhanced-mode": "fake-ip", | |
| "fake-ip-range": "198.18.0.1/16", | |
| "fake-ip-filter": [ | |
| // ๆฌๅฐไธปๆบ/่ฎพๅค | |
| "+.lan", | |
| "+.local", | |
| // Windows็ฝ็ปๅบ็ฐๅฐๅฐ็ๅพๆ | |
| "+.msftconnecttest.com", | |
| "+.msftncsi.com", | |
| // QQๅฟซ้็ปๅฝๆฃๆตๅคฑ่ดฅ | |
| "localhost.ptlogin2.qq.com", | |
| "localhost.sec.qq.com", | |
| // ๅพฎไฟกๅฟซ้็ปๅฝๆฃๆตๅคฑ่ดฅ | |
| "localhost.work.weixin.qq.com" | |
| ], | |
| // Primary DNS servers (used for domains matching nameserver-policy) | |
| "nameserver": domesticNameservers, | |
| // Fallback DNS servers (used for everything else, queries go through proxy) | |
| "fallback": foreignNameservers, | |
| // This is the core of smart DNS routing | |
| "fallback-filter": { | |
| "geoip": true, | |
| "geoip-code": "CN", | |
| "geosite": ["geolocation-!cn"] // If a domain is not in geosite:cn, use fallback directly | |
| }, | |
| // Route specific domains to specific nameservers before fallback logic | |
| "nameserver-policy": { | |
| "geosite:cn": domesticNameservers, | |
| "geosite:apple-cn": domesticNameservers // Crucial for Apple services in China | |
| } | |
| // The old keys like 'default-nameserver', 'proxy-server-nameserver', 'direct-nameserver' | |
| // are no longer needed with this modern, robust configuration. | |
| }; | |
| // ไปฃ็็ป้็จ้ ็ฝฎ | |
| const groupBaseOption = { | |
| "interval": 300, "timeout": 3000, "url": "https://www.gstatic.com/generate_204", | |
| "max-failed-times": 3, "hidden": false | |
| }; | |
| // ้็จๆ้ค่ฟๆปคๅจ | |
| const regionalExcludeFilter = "(?i)GB|Traffic|Expire|Premium|้ข้|่ฎข้ |ๆต้|ๅฐๆ|้็ฝฎ|ไธญๅฝ|CN|๐จ๐ณ|China|ๅๅฝ"; | |
| // --- Updated EU ๅฝๅฎถๅ ณ้ฎๅญ --- | |
| const euKeywords = [ | |
| // Original set | |
| 'DE', 'FR', 'NL', 'GB', 'UK', 'IE', 'SE', 'CH', 'BE', 'ES', 'IT', 'AT', 'FI', 'DK', 'PL', | |
| 'ๅพทๅฝ', 'ๆณๅฝ', '่ทๅ ฐ', '่ฑๅฝ', '็ฑๅฐๅ ฐ', '็ๅ ธ', '็ๅฃซ', 'ๆฏๅฉๆถ', '่ฅฟ็ญ็', 'ๆๅคงๅฉ', 'ๅฅฅๅฐๅฉ', '่ฌๅ ฐ', 'ไธน้บฆ', 'ๆณขๅ ฐ', | |
| 'Germany', 'France', 'Netherlands', 'United Kingdom', 'Ireland', 'Sweden', 'Switzerland', 'Belgium', 'Spain', 'Italy', 'Austria', 'Finland', 'Denmark', 'Poland', | |
| '๐ฉ๐ช', '๐ซ๐ท', '๐ณ๐ฑ', '๐ฌ๐ง', '๐ฎ๐ช', '๐ธ๐ช', '๐จ๐ญ', '๐ง๐ช', '๐ช๐ธ', '๐ฎ๐น', '๐ฆ๐น', '๐ซ๐ฎ', '๐ฉ๐ฐ', '๐ต๐ฑ', | |
| // Added countries | |
| 'LU', 'PT', 'GR', 'CZ', 'HU', 'RO', 'BG', 'SK', 'HR', 'LT', 'LV', 'EE', 'SI', 'CY', 'MT', | |
| 'ๅขๆฃฎๅ ก', '่ก่็', 'ๅธ่ ', 'ๆทๅ ', 'ๅ็ๅฉ', '็ฝ้ฉฌๅฐผไบ', 'ไฟๅ ๅฉไบ', 'ๆฏๆดไผๅ ', 'ๅ ็ฝๅฐไบ', '็ซ้ถๅฎ', 'ๆ่ฑ็ปดไบ', '็ฑๆฒๅฐผไบ', 'ๆฏๆดๆๅฐผไบ', 'ๅกๆตฆ่ทฏๆฏ', '้ฉฌ่ณไป', | |
| 'Luxembourg', 'Portugal', 'Greece', 'Czech Republic', 'Hungary', 'Romania', 'Bulgaria', 'Slovakia', 'Croatia', 'Lithuania', 'Latvia', 'Estonia', 'Slovenia', 'Cyprus', 'Malta', | |
| '๐ฑ๐บ', '๐ต๐น', '๐ฌ๐ท', '๐จ๐ฟ', '๐ญ๐บ', '๐ท๐ด', '๐ง๐ฌ', '๐ธ๐ฐ', '๐ญ๐ท', '๐ฑ๐น', '๐ฑ๐ป', '๐ช๐ช', '๐ธ๐ฎ', '๐จ๐พ', '๐ฒ๐น' | |
| ]; | |
| const euFilter = createFilterRegex(euKeywords); | |
| // ๆๆๅบๅ็ปๅ็งฐๅ่กจ | |
| const regionalGroupNames = [ | |
| "๐ญ๐ฐ HK", "๐น๐ผ TW", "๐ฏ๐ต JP", "๐ฐ๐ท KR", "๐บ๐ธ US", | |
| "๐ธ๐ฌ SG", "๐จ๐ฆ CA", "๐ฆ๐บ AU", "๐ฌ๐ง UK", "๐ฉ๐ช DE", | |
| "๐ซ๐ท FR", "๐ณ๐ฑ NL", "๐ช๐บ EU", | |
| "๐ฒ๐พ MY", "๐ท๐บ RU" | |
| ]; | |
| // Function to generate Proxy Group Configuration | |
| function generateProxyGroups() { | |
| return [ | |
| { | |
| ...groupBaseOption, "name": "๐ Proxy", "type": "select", | |
| "proxies": [ "โ๏ธ Fixed-Proxy", "โ๏ธ LoadBalance", "๐ Chain Relay (A->B)", "DIRECT", "REJECT" ], | |
| "include-all": false, "icon": "https://cdn.jsdelivr.net/gh/Koolson/Qure@master/IconSet/Color/Global.png" | |
| }, | |
| { | |
| "name": "โ๏ธ Fixed-Proxy", "type": "select", "proxies": ["โก AUTO", ...regionalGroupNames ], | |
| "include-all": true, "icon": "https://cdn.jsdelivr.net/gh/Koolson/Qure@master/IconSet/Color/Direct.png" | |
| }, | |
| { | |
| ...groupBaseOption, "name": "โ๏ธ LoadBalance", "type": "load-balance", "strategy": "consistent-hashing", | |
| "proxies": regionalGroupNames, "icon": "https://cdn.jsdelivr.net/gh/Koolson/Qure@master/IconSet/Color/Direct.png" | |
| }, | |
| { | |
| "name": "โ๏ธ Fixed-Proxy-A", "type": "select", "proxies": [ "DIRECT", ...regionalGroupNames ], | |
| "include-all": true, "icon": "https://cdn.jsdelivr.net/gh/Koolson/Qure@master/IconSet/Color/Direct.png" | |
| }, | |
| { | |
| "name": "โ๏ธ Fixed-Proxy-B", "type": "select", "proxies": [ ...regionalGroupNames ], | |
| "include-all": true, "icon": "https://cdn.jsdelivr.net/gh/Koolson/Qure@master/IconSet/Color/Direct.png" | |
| }, | |
| { | |
| ...groupBaseOption, "name": "๐ Chain Relay (A->B)", "type": "relay", | |
| "proxies": [ "โ๏ธ Fixed-Proxy-A", "โ๏ธ Fixed-Proxy-B" ], "icon": "https://cdn.jsdelivr.net/gh/Koolson/Qure@master/IconSet/Color/Direct.png" | |
| }, | |
| { | |
| ...groupBaseOption, "name": "โก AUTO", "type": "url-test", "include-all": true, | |
| "tolerance": 50, "exclude-filter": regionalExcludeFilter, "icon": "https://cdn.jsdelivr.net/gh/Koolson/Qure@master/IconSet/Color/Speedtest.png" | |
| }, | |
| // --- Regional Groups using the createFilterRegex --- | |
| { | |
| ...groupBaseOption, "name": "๐ญ๐ฐ HK", "type": "url-test", "include-all": true, | |
| "filter": createFilterRegex(['้ฆๆธฏ', 'Hong Kong', 'HK', '๐ญ๐ฐ']), | |
| "exclude-filter": regionalExcludeFilter, "tolerance": 50, "icon": "https://cdn.jsdelivr.net/gh/Koolson/Qure@master/IconSet/Color/Hong_Kong.png" | |
| }, | |
| { | |
| ...groupBaseOption, "name": "๐น๐ผ TW", "type": "url-test", "include-all": true, | |
| "filter": createFilterRegex(['ๅฐๆนพ', 'Taiwan', 'TW', '๐น๐ผ']), | |
| "exclude-filter": regionalExcludeFilter, "tolerance": 50, "icon": "https://cdn.jsdelivr.net/gh/Koolson/Qure@master/IconSet/Color/Taiwan.png" | |
| }, | |
| { | |
| ...groupBaseOption, "name": "๐ฏ๐ต JP", "type": "url-test", "include-all": true, | |
| "filter": createFilterRegex(['ๆฅๆฌ', 'Japan', 'JP', '๐ฏ๐ต']), | |
| "exclude-filter": regionalExcludeFilter, "tolerance": 50, "icon": "https://cdn.jsdelivr.net/gh/Koolson/Qure@master/IconSet/Color/Japan.png" | |
| }, | |
| { | |
| ...groupBaseOption, "name": "๐ฐ๐ท KR", "type": "url-test", "include-all": true, | |
| "filter": createFilterRegex(['้ฉๅฝ', 'Korea', 'KR', '๐ฐ๐ท']), | |
| "exclude-filter": regionalExcludeFilter, "tolerance": 50, "icon": "https://cdn.jsdelivr.net/gh/Koolson/Qure@master/IconSet/Color/Korea.png" | |
| }, | |
| { | |
| ...groupBaseOption, "name": "๐บ๐ธ US", "type": "url-test", "include-all": true, | |
| "filter": createFilterRegex(['็พๅฝ', 'United States', 'US', '๐บ๐ธ']), | |
| "exclude-filter": regionalExcludeFilter, "tolerance": 50, "icon": "https://cdn.jsdelivr.net/gh/Koolson/Qure@master/IconSet/Color/United_States.png" | |
| }, | |
| { | |
| ...groupBaseOption, "name": "๐ฉ๐ช DE", "type": "url-test", "include-all": true, | |
| "filter": createFilterRegex(['ๅพทๅฝ', 'Germany', 'DE', '๐ฉ๐ช']), | |
| "exclude-filter": regionalExcludeFilter, "tolerance": 50, "icon": "https://cdn.jsdelivr.net/gh/Koolson/Qure@master/IconSet/Color/Germany.png" | |
| }, | |
| { | |
| ...groupBaseOption, "name": "๐ธ๐ฌ SG", "type": "url-test", "include-all": true, | |
| "filter": createFilterRegex(['ๆฐๅ ๅก', 'Singapore', 'SG', '๐ธ๐ฌ']), | |
| "exclude-filter": regionalExcludeFilter, "tolerance": 50, "icon": "https://cdn.jsdelivr.net/gh/Koolson/Qure@master/IconSet/Color/Singapore.png" | |
| }, | |
| { | |
| ...groupBaseOption, "name": "๐ซ๐ท FR", "type": "url-test", "include-all": true, | |
| "filter": createFilterRegex(['ๆณๅฝ', 'France', 'FR', '๐ซ๐ท']), | |
| "exclude-filter": regionalExcludeFilter, "tolerance": 50, "icon": "https://cdn.jsdelivr.net/gh/Koolson/Qure@master/IconSet/Color/France.png" | |
| }, | |
| { | |
| ...groupBaseOption, "name": "๐ฌ๐ง UK", "type": "url-test", "include-all": true, | |
| "filter": createFilterRegex(['่ฑๅฝ', 'United Kingdom', 'UK', 'GB', '๐ฌ๐ง']), | |
| "exclude-filter": regionalExcludeFilter, "tolerance": 50, "icon": "https://cdn.jsdelivr.net/gh/Koolson/Qure@master/IconSet/Color/United_Kingdom.png" | |
| }, | |
| { | |
| ...groupBaseOption, "name": "๐จ๐ฆ CA", "type": "url-test", "include-all": true, | |
| "filter": createFilterRegex(['ๅ ๆฟๅคง', 'Canada', 'CA', '๐จ๐ฆ']), | |
| "exclude-filter": regionalExcludeFilter, "tolerance": 50, "icon": "https://cdn.jsdelivr.net/gh/Koolson/Qure@master/IconSet/Color/Canada.png" | |
| }, | |
| { | |
| ...groupBaseOption, "name": "๐ฆ๐บ AU", "type": "url-test", "include-all": true, | |
| "filter": createFilterRegex(['ๆพณๅคงๅฉไบ', 'Australia', 'AU', '๐ฆ๐บ']), | |
| "exclude-filter": regionalExcludeFilter, "tolerance": 50, "icon": "https://cdn.jsdelivr.net/gh/Koolson/Qure@master/IconSet/Color/Australia.png" | |
| }, | |
| { | |
| ...groupBaseOption, "name": "๐ณ๐ฑ NL", "type": "url-test", "include-all": true, | |
| "filter": createFilterRegex(['่ทๅ ฐ', 'Netherlands', 'NL', '๐ณ๐ฑ']), | |
| "exclude-filter": regionalExcludeFilter, "tolerance": 50, "icon": "https://cdn.jsdelivr.net/gh/Koolson/Qure@master/IconSet/Color/Netherlands.png" | |
| }, | |
| { | |
| ...groupBaseOption, "name": "๐ช๐บ EU", "type": "url-test", "include-all": true, | |
| "filter": euFilter, | |
| "exclude-filter": regionalExcludeFilter, "tolerance": 50, "icon": "https://cdn.jsdelivr.net/gh/Koolson/Qure@master/IconSet/Color/European_Union.png" | |
| }, | |
| { | |
| ...groupBaseOption, "name": "๐ฒ๐พ MY", "type": "url-test", "include-all": true, | |
| "filter": createFilterRegex(['้ฉฌๆฅ่ฅฟไบ', 'Malaysia', 'MY', '๐ฒ๐พ']), | |
| "exclude-filter": regionalExcludeFilter, "tolerance": 50, "icon": "https://cdn.jsdelivr.net/gh/Koolson/Qure@master/IconSet/Color/Malaysia.png" | |
| }, | |
| { | |
| ...groupBaseOption, "name": "๐ท๐บ RU", "type": "url-test", "include-all": true, | |
| "filter": createFilterRegex(['ไฟ็ฝๆฏ', 'Russia', 'RU', '๐ท๐บ']), | |
| "exclude-filter": regionalExcludeFilter, "tolerance": 50, "icon": "https://cdn.jsdelivr.net/gh/Koolson/Qure@master/IconSet/Color/Russia.png" | |
| }, | |
| // --- Service Groups --- | |
| { | |
| ...groupBaseOption, "name": "Apple", "type": "select", "proxies": ["DIRECT", "๐ Proxy", ...regionalGroupNames, "REJECT"], | |
| "include-all": true, "exclude-filter": "(?i)GB|Traffic|Expire|Premium|้ข้|่ฎข้ |ISP|ๆต้|ๅฐๆ|้็ฝฎ", "icon": "https://cdn.jsdelivr.net/gh/Koolson/Qure@master/IconSet/Color/Apple.png" | |
| }, | |
| { | |
| ...groupBaseOption, "name": "Telegram", "type": "select", "proxies": ["๐ Proxy", ...regionalGroupNames, "DIRECT", "REJECT"], | |
| "include-all": true, "exclude-filter": "(?i)GB|Traffic|Expire|Premium|้ข้|่ฎข้ |ISP|ๆต้|ๅฐๆ|้็ฝฎ", "icon": "https://cdn.jsdelivr.net/gh/Koolson/Qure@master/IconSet/Color/Telegram.png" | |
| }, | |
| { | |
| ...groupBaseOption, "name": "YouTube", "type": "select", "proxies": ["๐ Proxy", ...regionalGroupNames, "DIRECT", "REJECT"], | |
| "include-all": true, "exclude-filter": "(?i)GB|Traffic|Expire|Premium|้ข้|่ฎข้ |ISP|ๆต้|ๅฐๆ|้็ฝฎ", "icon": "https://cdn.jsdelivr.net/gh/Koolson/Qure@master/IconSet/Color/YouTube.png" | |
| }, | |
| { | |
| ...groupBaseOption, "name": "BiliBili", "type": "select", "proxies": ["DIRECT", "๐ Proxy", "REJECT", ...regionalGroupNames], | |
| "include-all": true, "exclude-filter": "(?i)GB|Traffic|Expire|Premium|้ข้|่ฎข้ |ISP|ๆต้|ๅฐๆ|้็ฝฎ", "icon": "https://cdn.jsdelivr.net/gh/Koolson/Qure@master/IconSet/Color/bilibili.png" | |
| }, | |
| { | |
| ...groupBaseOption, "name": "OpenAI", "type": "select", "proxies": ["๐ Proxy", "๐บ๐ธ US", "๐น๐ผ TW", "๐ฏ๐ต JP", "๐ฐ๐ท KR", "๐ญ๐ฐ HK", ...regionalGroupNames, "DIRECT"], | |
| "include-all": true, "exclude-filter": "(?i)GB|Traffic|Expire|Premium|้ข้|่ฎข้ |ISP|ๆต้|ๅฐๆ|้็ฝฎ", "icon": "https://cdn.jsdelivr.net/gh/Koolson/Qure@master/IconSet/Color/ChatGPT.png" | |
| }, | |
| { | |
| ...groupBaseOption, "name": "Gemini", "type": "select", "proxies": ["๐ Proxy", ...regionalGroupNames, "DIRECT"], | |
| "include-all": true, "exclude-filter": "(?i)GB|Traffic|Expire|Premium|้ข้|่ฎข้ |ISP|ๆต้|ๅฐๆ|้็ฝฎ", "icon": "https://cdn.jsdelivr.net/gh/guaishouxiaoqi/icons@master/Color/Gemini.png" | |
| }, | |
| { | |
| ...groupBaseOption, "name": "Claude", "type": "select", "proxies": ["๐ Proxy", "๐บ๐ธ US", "๐ฌ๐ง UK", ...regionalGroupNames, "DIRECT"], | |
| "include-all": true, "exclude-filter": "(?i)GB|Traffic|Expire|Premium|้ข้|่ฎข้ |ISP|ๆต้|ๅฐๆ|้็ฝฎ", "icon": "https://cdn.jsdelivr.net/gh/ke1ewang/Qi@master/Claude.png" | |
| }, | |
| { | |
| ...groupBaseOption, "name": "TikTok", "type": "select", "proxies": ["๐ Proxy", "๐น๐ผ TW", "๐ญ๐ฐ HK", "๐ฏ๐ต JP", "๐ฐ๐ท KR", "๐บ๐ธ US", ...regionalGroupNames, "DIRECT"], | |
| "include-all": true, "exclude-filter": "(?i)GB|Traffic|Expire|Premium|้ข้|่ฎข้ |ISP|ๆต้|ๅฐๆ|้็ฝฎ", "icon": "https://cdn.jsdelivr.net/gh/Koolson/Qure@master/IconSet/Color/TikTok.png" | |
| }, | |
| { | |
| ...groupBaseOption, "name": "Spotify", "type": "select", "proxies": ["๐ Proxy", ...regionalGroupNames, "DIRECT"], | |
| "include-all": true, "exclude-filter": "(?i)GB|Traffic|Expire|Premium|้ข้|่ฎข้ |ISP|ๆต้|ๅฐๆ|้็ฝฎ", "icon": "https://cdn.jsdelivr.net/gh/Koolson/Qure@master/IconSet/Color/Spotify.png" | |
| }, | |
| { | |
| ...groupBaseOption, "name": "Netflix", "type": "select", "proxies": ["๐ Proxy", ...regionalGroupNames, "DIRECT"], | |
| "include-all": true, "exclude-filter": "(?i)GB|Traffic|Expire|Premium|้ข้|่ฎข้ |ISP|ๆต้|ๅฐๆ|้็ฝฎ|ๅๅฝ|ไธญ่ฝฌ", "icon": "https://cdn.jsdelivr.net/gh/Koolson/Qure@master/IconSet/Color/Netflix.png" | |
| }, | |
| { | |
| ...groupBaseOption, "name": "Disney", "type": "select", "proxies": ["๐ Proxy", ...regionalGroupNames, "DIRECT"], | |
| "include-all": true, "exclude-filter": "(?i)GB|Traffic|Expire|Premium|้ข้|่ฎข้ |ISP|ๆต้|ๅฐๆ|้็ฝฎ|ๅๅฝ|ไธญ่ฝฌ", "icon": "https://cdn.jsdelivr.net/gh/Koolson/Qure@master/IconSet/Color/Disney.png" | |
| }, | |
| { | |
| ...groupBaseOption, "name": "Google", "type": "select", "proxies": ["๐ Proxy", ...regionalGroupNames, "DIRECT"], | |
| "include-all": true, "exclude-filter": "(?i)GB|Traffic|Expire|Premium|้ข้|่ฎข้ |ISP|ๆต้|ๅฐๆ|้็ฝฎ", "icon": "https://cdn.jsdelivr.net/gh/Koolson/Qure@master/IconSet/Color/Google.png" | |
| }, | |
| { | |
| ...groupBaseOption, "name": "OneDrive", "type": "select", "proxies": ["DIRECT", "๐ Proxy", ...regionalGroupNames], | |
| "include-all": true, "exclude-filter": "(?i)GB|Traffic|Expire|Premium|้ข้|่ฎข้ |ISP|ๆต้|ๅฐๆ|้็ฝฎ", "icon": "https://cdn.jsdelivr.net/gh/Koolson/Qure@master/IconSet/Color/OneDrive.png" | |
| }, | |
| { | |
| ...groupBaseOption, "name": "Microsoft", "type": "select", "proxies": ["DIRECT", "๐ Proxy", "REJECT", ...regionalGroupNames], | |
| "include-all": true, "exclude-filter": "(?i)GB|Traffic|Expire|Premium|้ข้|่ฎข้ |ISP|ๆต้|ๅฐๆ|้็ฝฎ", "icon": "https://cdn.jsdelivr.net/gh/Koolson/Qure@master/IconSet/Color/Microsoft.png" | |
| }, | |
| { | |
| ...groupBaseOption, "name": "Twitter", "type": "select", "proxies": ["๐ Proxy", ...regionalGroupNames, "DIRECT"], | |
| "include-all": true, "exclude-filter": "(?i)GB|Traffic|Expire|Premium|้ข้|่ฎข้ |ISP|ๆต้|ๅฐๆ|้็ฝฎ", "icon": "https://cdn.jsdelivr.net/gh/Koolson/Qure@master/IconSet/Color/Twitter.png" | |
| }, | |
| { | |
| ...groupBaseOption, "name": "Emby", "type": "select", "proxies": ["๐ Proxy", ...regionalGroupNames, "DIRECT"], | |
| "include-all": true, "exclude-filter": "(?i)GB|Traffic|Expire|Premium|้ข้|่ฎข้ |ISP|ๆต้|ๅฐๆ|้็ฝฎ", "icon": "https://cdn.jsdelivr.net/gh/Koolson/Qure@master/IconSet/Color/Emby.png" | |
| }, | |
| { | |
| ...groupBaseOption, "name": "Steam", "type": "select", "proxies": ["๐ Proxy", "๐ญ๐ฐ HK", "DIRECT", ...regionalGroupNames], | |
| "include-all": true, "exclude-filter": "(?i)GB|Traffic|Expire|Premium|้ข้|่ฎข้ |ISP|ๆต้|ๅฐๆ|้็ฝฎ", "icon": "https://cdn.jsdelivr.net/gh/Koolson/Qure@master/IconSet/Color/Steam.png" | |
| } | |
| ]; | |
| } | |
| // ่งๅ้้็จ้ ็ฝฎ | |
| const ruleProviderCommon = { | |
| "type": "http", "format": "yaml", "interval": 86400, "proxy": "๐ Proxy" | |
| }; | |
| // ่งๅ้้ ็ฝฎ | |
| const ruleProviders = { | |
| "Apple": { ...ruleProviderCommon, "behavior": "classical", "url": "https://cdn.jsdelivr.net/gh/blackmatrix7/ios_rule_script@master/rule/Clash/Apple/Apple_Classical.yaml", "path": "./ruleset/Apple.yaml" }, | |
| "Telegram": { ...ruleProviderCommon, "behavior": "classical", "url": "https://cdn.jsdelivr.net/gh/blackmatrix7/ios_rule_script@master/rule/Clash/Telegram/Telegram.yaml", "path": "./ruleset/Telegram.yaml" }, | |
| "YouTube": { ...ruleProviderCommon, "behavior": "classical", "url": "https://cdn.jsdelivr.net/gh/blackmatrix7/ios_rule_script@master/rule/Clash/YouTube/YouTube.yaml", "path": "./ruleset/YouTube.yaml" }, | |
| "BiliBili": { ...ruleProviderCommon, "behavior": "classical", "url": "https://cdn.jsdelivr.net/gh/blackmatrix7/ios_rule_script@master/rule/Clash/BiliBili/BiliBili.yaml", "path": "./ruleset/BiliBili.yaml" }, | |
| "TikTok": { ...ruleProviderCommon, "behavior": "classical", "url": "https://cdn.jsdelivr.net/gh/blackmatrix7/ios_rule_script@master/rule/Clash/TikTok/TikTok.yaml", "path": "./ruleset/TikTok.yaml" }, | |
| "Spotify": { ...ruleProviderCommon, "behavior": "classical", "url": "https://cdn.jsdelivr.net/gh/blackmatrix7/ios_rule_script@master/rule/Clash/Spotify/Spotify.yaml", "path": "./ruleset/Spotify.yaml" }, | |
| "Netflix": { ...ruleProviderCommon, "behavior": "classical", "url": "https://cdn.jsdelivr.net/gh/blackmatrix7/ios_rule_script@master/rule/Clash/Netflix/Netflix.yaml", "path": "./ruleset/Netflix.yaml" }, | |
| "Disney": { ...ruleProviderCommon, "behavior": "classical", "url": "https://cdn.jsdelivr.net/gh/blackmatrix7/ios_rule_script@master/rule/Clash/Disney/Disney.yaml", "path": "./ruleset/Disney.yaml" }, | |
| "Google": { ...ruleProviderCommon, "behavior": "classical", "url": "https://cdn.jsdelivr.net/gh/blackmatrix7/ios_rule_script@master/rule/Clash/Google/Google.yaml", "path": "./ruleset/Google.yaml" }, | |
| "OpenAI": { ...ruleProviderCommon, "behavior": "classical", "url": "https://cdn.jsdelivr.net/gh/blackmatrix7/ios_rule_script@master/rule/Clash/OpenAI/OpenAI.yaml", "path": "./ruleset/OpenAI.yaml" }, | |
| "Microsoft": { ...ruleProviderCommon, "behavior": "classical", "url": "https://cdn.jsdelivr.net/gh/blackmatrix7/ios_rule_script@master/rule/Clash/Microsoft/Microsoft.yaml", "path": "./ruleset/Microsoft.yaml" }, | |
| "Twitter": { ...ruleProviderCommon, "behavior": "classical", "url": "https://cdn.jsdelivr.net/gh/blackmatrix7/ios_rule_script@master/rule/Clash/Twitter/Twitter.yaml", "path": "./ruleset/Twitter.yaml" }, | |
| "Steam": { ...ruleProviderCommon, "behavior": "classical", "url": "https://cdn.jsdelivr.net/gh/blackmatrix7/ios_rule_script@master/rule/Clash/Steam/Steam.yaml", "path": "./ruleset/Steam.yaml" }, | |
| "OneDrive": { ...ruleProviderCommon, "behavior": "classical", "url": "https://cdn.jsdelivr.net/gh/blackmatrix7/ios_rule_script@master/rule/Clash/OneDrive/OneDrive.yaml", "path": "./ruleset/OneDrive.yaml" }, | |
| "Emby": { ...ruleProviderCommon, "behavior": "classical", "url": "https://cdn.jsdelivr.net/gh/blackmatrix7/ios_rule_script@master/rule/Clash/Emby/Emby.yaml", "path": "./ruleset/Emby.yaml" }, | |
| "Gemini": { ...ruleProviderCommon, "behavior": "classical", "url": "https://cdn.jsdelivr.net/gh/blackmatrix7/ios_rule_script@master/rule/Clash/Gemini/Gemini.yaml", "path": "./ruleset/Gemini.yaml" }, | |
| "Claude": { ...ruleProviderCommon, "behavior": "classical", "url": "https://cdn.jsdelivr.net/gh/blackmatrix7/ios_rule_script@master/rule/Clash/Claude/Claude.yaml", "path": "./ruleset/Claude.yaml" }, | |
| "Github": { ...ruleProviderCommon, "behavior": "classical", "url": "https://cdn.jsdelivr.net/gh/blackmatrix7/ios_rule_script@master/rule/Clash/GitHub/GitHub_No_Resolve.yaml", "path": "./ruleset/Github.yaml" }, | |
| }; | |
| // ่งๅ | |
| const rules = [ | |
| "RULE-SET,Telegram,Telegram", "RULE-SET,YouTube,YouTube", "RULE-SET,BiliBili,BiliBili", | |
| "RULE-SET,TikTok,TikTok", "RULE-SET,Spotify,Spotify", "RULE-SET,Netflix,Netflix", | |
| "RULE-SET,Disney,Disney", "RULE-SET,Google,Google", "RULE-SET,OpenAI,OpenAI", | |
| "RULE-SET,Microsoft,Microsoft", "RULE-SET,Twitter,Twitter", "RULE-SET,Steam,Steam", | |
| "RULE-SET,OneDrive,OneDrive", "RULE-SET,Emby,Emby", "RULE-SET,Gemini,Gemini", | |
| "RULE-SET,Claude,Claude", | |
| "RULE-SET,Apple,Apple", | |
| "DOMAIN-SUFFIX,push.apple.com,Apple", | |
| // ๅฑๅ็ฝ/ๅ ้จ่งๅ | |
| "IP-CIDR,192.168.0.0/16,DIRECT", | |
| "IP-CIDR,10.0.0.0/8,DIRECT", | |
| "IP-CIDR,172.16.0.0/12,DIRECT", | |
| "IP-CIDR,127.0.0.1/32,DIRECT", | |
| "IP-CIDR,198.18.0.1/16,DIRECT", // Fake IP | |
| "DOMAIN-SUFFIX,lan,DIRECT", | |
| "DOMAIN-SUFFIX,local,DIRECT", | |
| // ๅฐ็ไฝ็ฝฎ่งๅ | |
| "GEOIP,LAN,DIRECT", | |
| "GEOIP,CN,DIRECT", | |
| // ๆ็ปๅน้ | |
| "MATCH,๐ Proxy" | |
| ]; |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment