Skip to content

Instantly share code, notes, and snippets.

@swordspoet
Last active December 25, 2024 05:37
Show Gist options
  • Save swordspoet/6f18128e9d7b9c9b76de03d19c36c178 to your computer and use it in GitHub Desktop.
Save swordspoet/6f18128e9d7b9c9b76de03d19c36c178 to your computer and use it in GitHub Desktop.
mihomo init config file
proxy-groups:
#分流分组
- {name: 手动切换, type: select, include-all: true, icon: https://ghp.ci/https://raw.githubusercontent.com/Orz-3/mini/master/Color/Static.png }
- {name: 苹果服务, type: select, proxies: [DIRECT, 手动切换, 自动选择, 香港节点, 日本节点, 美国节点], icon: https://ghp.ci/https://raw.githubusercontent.com/Koolson/Qure/master/IconSet/Color/Apple.png }
- {name: 油管视频, type: select, proxies: [DIRECT, 负载均衡, 自动选择, 香港节点, 日本节点, 台湾节点, 美国节点, 狮城节点], icon: https://ghp.ci/https://raw.githubusercontent.com/Koolson/Qure/master/IconSet/Color/YouTube.png }
- {name: OpenAi, type: select, proxies: [美国节点, 日本节点, 手动切换], icon: https://ghp.ci/https://raw.githubusercontent.com/Orz-3/mini/master/Color/OpenAI.png }
- {name: 国际媒体, type: select, proxies: [自动选择, 香港节点, 日本节点, 美国节点], icon: https://ghp.ci/https://raw.githubusercontent.com/Orz-3/mini/master/Color/Streaming.png }
- {name: 谷歌服务, type: select, proxies: [手动切换, DIRECT, 自动选择, 香港节点, 日本节点, 台湾节点, 美国节点, 狮城节点], icon: https://ghp.ci/https://raw.githubusercontent.com/Orz-3/mini/master/Color/Google.png }
- {name: 电报消息, type: select, proxies: [自动选择], icon: https://ghp.ci/https://raw.githubusercontent.com/Orz-3/mini/master/Color/Telegram.png }
- {name: 海外社交, type: select, proxies: [自动选择, 日本节点, 香港节点], icon: https://ghp.ci/https://raw.githubusercontent.com/Orz-3/mini/master/Color/Twitter.png }
- {name: 微软服务, type: select, proxies: [手动切换, DIRECT, 自动选择, 香港节点, 日本节点, 台湾节点, 美国节点, 狮城节点], icon: https://ghp.ci/https://raw.githubusercontent.com/Orz-3/mini/master/Color/Microsoft.png }
- {name: AdBlock, hidden: true, type: select, proxies: [REJECT], icon: https://ghp.ci/https://raw.githubusercontent.com/Orz-3/mini/master/Color/Adblock.png }
- {name: 兜底分流, type: select, proxies: [手动切换, DIRECT, 自动选择], icon: https://ghp.ci/https://raw.githubusercontent.com/Orz-3/mini/master/Color/Final.png }
#节点分组
- {name: 自动选择, type: url-test, include-all: true, interval: 600, tolerance: 50, icon: https://ghp.ci/https://raw.githubusercontent.com/Orz-3/mini/master/Color/Urltest.png }
- {name: 负载均衡, type: load-balance, strategy: round-robin, include-all: true, interval: 600, tolerance: 50, icon: https://ghp.ci/https://raw.githubusercontent.com/Orz-3/mini/refs/heads/master/Color/Speedtest.png }
- {name: 香港节点, hidden: true, type: url-test, include-all: true, interval: 600, tolerance: 50, filter: "港|HK|(?i)Hong", icon: https://ghp.ci/https://raw.githubusercontent.com/Orz-3/mini/master/Color/HK.png }
- {name: 日本节点, hidden: true, type: url-test, include-all: true, interval: 600, tolerance: 50, filter: "日|东京|JP|(?i)Japan", icon: https://ghp.ci/https://raw.githubusercontent.com/Orz-3/mini/master/Color/JP.png }
- {name: 台湾节点, hidden: true, type: url-test, include-all: true, interval: 600, tolerance: 50, filter: "台|湾|TW|(?i)Taiwan", icon: https://ghp.ci/https://raw.githubusercontent.com/Orz-3/mini/master/Color/TW.png }
- {name: 英国节点, hidden: true, type: url-test, include-all: true, interval: 600, tolerance: 50, filter: "英|伦敦|UK", icon: https://ghp.ci/https://raw.githubusercontent.com/Orz-3/mini/master/Color/UK.png }
- {name: 美国节点, hidden: true, type: url-test, include-all: true, interval: 600, tolerance: 50, filter: "美|US|(?i)States|American", icon: https://ghp.ci/https://raw.githubusercontent.com/Orz-3/mini/master/Color/US.png }
- {name: 狮城节点, hidden: true, type: url-test, include-all: true, interval: 600, tolerance: 50, filter: "新|坡|SG|(?i)Singapore", icon: https://ghp.ci/https://raw.githubusercontent.com/Orz-3/mini/master/Color/SG.png }
- {name: 韩国节点, hidden: true, type: url-test, include-all: true, interval: 600, tolerance: 50, filter: "韩|韩国|KR|Korea|🇰🇷|(?i)Singapore", icon: https://ghp.ci/https://raw.githubusercontent.com/Orz-3/mini/master/Color/KR.png }
- {name: 俄罗斯节点, hidden: true, type: url-test, include-all: true, interval: 600, tolerance: 50, filter: "俄|俄罗斯|ru|(?i)Russian", icon: https://ghp.ci/https://raw.githubusercontent.com/Orz-3/mini/master/Color/RU.png }
# 分流规则
rule-providers:
AdBlock: {behavior: domain, interval: 86400, format: text, type: http, url: https://ghp.ci/https://raw.githubusercontent.com/Cats-Team/AdRules/main/adrules_domainset.txt , path: ./ruleset/anti-ad-clash.txt }
OpenAi: {behavior: classical, interval: 86400, format: yaml, type: http, url: https://ghp.ci/https://raw.githubusercontent.com/blackmatrix7/ios_rule_script/master/rule/Clash/OpenAI/OpenAI.yaml , path: ./ruleset/OpenAi.yaml }
GlobalMedia: {behavior: classical, interval: 86400, format: yaml, type: http, url: https://ghp.ci/https://raw.githubusercontent.com/blackmatrix7/ios_rule_script/master/rule/Clash/GlobalMedia/GlobalMedia_Classical.yaml , path: ./ruleset/GlobalMedia.yaml }
Apple: {behavior: classical, interval: 86400, format: yaml, type: http, url: https://ghp.ci/https://raw.githubusercontent.com/blackmatrix7/ios_rule_script/master/rule/Clash/Apple/Apple_Classical.yaml , path: ./ruleset/Apple.yaml }
YouTube: {behavior: classical, interval: 86400, format: yaml, type: http, url: https://ghp.ci/https://raw.githubusercontent.com/blackmatrix7/ios_rule_script/refs/heads/master/rule/Clash/YouTube/YouTube.yaml , path: ./ruleset/YouTube.yaml }
Github: {behavior: classical, interval: 86400, format: yaml, type: http, url: https://ghp.ci/https://raw.githubusercontent.com/blackmatrix7/ios_rule_script/master/rule/Clash/GitHub/GitHub.yaml , path: ./ruleset/Github.yaml }
Microsoft: {behavior: classical, interval: 86400, format: yaml, type: http, url: https://ghp.ci/https://raw.githubusercontent.com/blackmatrix7/ios_rule_script/master/rule/Clash/Microsoft/Microsoft.yaml , path: ./ruleset/Microsoft.yaml }
Google: {behavior: classical, interval: 86400, format: yaml, type: http, url: https://ghp.ci/https://raw.githubusercontent.com/blackmatrix7/ios_rule_script/master/rule/Clash/Google/Google.yaml , path: ./ruleset/Google.yaml }
Telegram: {behavior: classical, interval: 86400, format: yaml, type: http, url: https://ghp.ci/https://raw.githubusercontent.com/blackmatrix7/ios_rule_script/master/rule/Clash/Telegram/Telegram.yaml , path: ./ruleset/Telegram.yaml }
Twitter: {behavior: classical, interval: 86400, format: yaml, type: http, url: https://ghp.ci/https://raw.githubusercontent.com/blackmatrix7/ios_rule_script/master/rule/Clash/Twitter/Twitter.yaml , path: ./ruleset/Twitter.yaml }
Game: {behavior: classical, interval: 86400, format: yaml, type: http, url: https://ghp.ci/https://raw.githubusercontent.com/blackmatrix7/ios_rule_script/master/rule/Clash/Game/Game.yaml , path: ./ruleset/Game.yaml }
ProxyLite: {behavior: classical, interval: 86400, format: yaml, type: http, url: https://ghp.ci/https://raw.githubusercontent.com/blackmatrix7/ios_rule_script/master/rule/Clash/ProxyLite/ProxyLite.yaml , path: ./ruleset/ProxyLite.yaml }
Direct: {behavior: classical, interval: 86400, format: yaml, type: http, url: https://ghp.ci/https://raw.githubusercontent.com/blackmatrix7/ios_rule_script/master/rule/Clash/Direct/Direct.yaml , path: ./ruleset/Direct.yaml }
Lan: {behavior: classical, interval: 86400, format: yaml, type: http, url: https://ghp.ci/https://raw.githubusercontent.com/blackmatrix7/ios_rule_script/master/rule/Clash/Lan/Lan.yaml , path: ./ruleset/Lan.yaml }
Download: {behavior: classical, interval: 86400, format: yaml, type: http, url: https://ghp.ci/https://raw.githubusercontent.com/blackmatrix7/ios_rule_script/master/rule/Clash/Download/Download.yaml , path: ./ruleset/Download.yaml }
ChinaIP: {behavior: ipcidr, interval: 86400, format: yaml, type: http, url: https://ghp.ci/https://raw.githubusercontent.com/soffchen/GeoIP2-CN/release/clash-rule-provider.yml , path: ./ruleset/ChinaIP.yaml }
cdn_domain: {behavior: domain, interval: 86400, format: text, type: http, url: https://ruleset.skk.moe/Clash/domainset/cdn.txt , path: ./ruleset/cdn_domainset.yaml}
# 分流Policy
rules:
- RULE-SET,AdBlock,AdBlock
- RULE-SET,Google,谷歌服务
- RULE-SET,Twitter,海外社交
- RULE-SET,OpenAi,OpenAi
- RULE-SET,YouTube,油管视频
- RULE-SET,GlobalMedia,国际媒体
- RULE-SET,Apple,苹果服务
- RULE-SET,Github,微软服务
- RULE-SET,Microsoft,微软服务
- RULE-SET,Telegram,电报消息
- RULE-SET,ProxyLite,国际媒体
- RULE-SET,cdn_domain,DIRECT
- RULE-SET,ChinaIP,DIRECT
- RULE-SET,Direct,DIRECT
- RULE-SET,Lan,DIRECT
- RULE-SET,Download,DIRECT
- GEOIP,CN,DIRECT
- MATCH,兜底分流
# dns 设置
dns:
enable: true
ipv6: true
enhanced-mode: fake-ip
fake-ip-range: 198.18.0.1/16
prefer-h3: true
fake-ip-filter:
- "*"
- +.lan
- +.local
- time.*.com
- ntp.*.com
- +.market.xiaomi.com
use-hosts: false
use-system-hosts: false
nameserver:
- https://223.5.5.5/dns-query
proxy-server-nameserver:
- 223.5.5.5
- 1.1.1.1
respect-rules: true
fallback:
- https://1.1.1.1/dns-query#h3=true
fallback-filter: {}
direct-nameserver:
- https://223.5.5.5/dns-query
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment