Skip to content

Instantly share code, notes, and snippets.

@wbmins
Created May 6, 2025 14:31
Show Gist options
  • Save wbmins/7a079e3a1cd1a360a17a197cd3424e45 to your computer and use it in GitHub Desktop.
Save wbmins/7a079e3a1cd1a360a17a197cd3424e45 to your computer and use it in GitHub Desktop.
mihomo 配置
port: 8080
socks-port: 1080
redir-port: 7891
tproxy-port: 7892
mixed-port: 7890
mode: rule
allow-lan: true
log-level: warning
find-process-mode: off
ipv6: false
keep-alive-idle: 600
keep-alive-interval: 15
external-ui: ./ui
external-ui-url: https://raw.ihtw.moe/github.com/Zephyruso/zashboard/archive/refs/heads/gh-pages.zip
external-controller: '[::]:9090'
secret: ""
geox-url:
geoip: "https://raw.ihtw.moe/github.com/MetaCubeX/meta-rules-dat/releases/download/latest/geoip.dat"
geosite: "https://raw.ihtw.moe/github.com/MetaCubeX/meta-rules-dat/releases/download/latest/geosite.dat"
mmdb: "https://raw.ihtw.moe/github.com/MetaCubeX/meta-rules-dat/releases/download/latest/geoip.metadb"
profile:
store-selected: true
store-fake-ip: true
sniffer:
enable: true
force-dns-mapping: true
parse-pure-ip: true
sniff:
HTTP:
ports: [80, 8080-8880]
override-destination: true
TLS:
ports: [443, 8443]
QUIC:
ports: [443, 8443]
skip-domain:
- "Mijia Cloud"
- "+.push.apple.com"
tun:
enable: true
stack: mixed
auto-route: true
auto-redirect: true
auto-detect-interface: true
dns-hijack:
- any:53
device: nikki
dns:
enable: true
listen: 0.0.0.0:1053
enhanced-mode: redir-host
proxy-providers:
Ikuuu:
url: xxxxxxxx 订阅地址 xxxxxxxx
type: http
interval: 86400
health-check:
enable: true
url: https://www.gstatic.com/generate_204
interval: 300
proxy: 直连
proxies:
- {name: 直连, type: direct}
pr: &pr {type: select, proxies: [代理, 自动, 香港,日本, 亚洲, 欧洲, 其他, 直连]}
proxy-groups:
- {name: 代理, icon: https://raw.ihtw.moe/github.com/lige47/QuanX-icon-rule/raw/main/icon/sub(1).png, type: select, proxies: [自动, 香港,日本, 亚洲, 欧洲, 其他, 直连]}
- {name: 自动, icon: https://raw.ihtw.moe/github.com/lige47/QuanX-icon-rule/raw/main/icon/lightning(2).png, type: url-test, include-all: true, tolerance: 20, interval: 300, filter: "^((?!(直连)).)*$"}
- {name: 漏网, icon: https://raw.ihtw.moe/github.com/lige47/QuanX-icon-rule/raw/main/icon/shutiao.png, <<: *pr}
- {name: 游戏,icon: https://raw.ihtw.moe/github.com/lige47/QuanX-icon-rule/raw/main/icon/steam(1).png, type: select, proxies: [直连,代理]}
- {name: 香港, icon: https://raw.ihtw.moe/github.com/lige47/QuanX-icon-rule/raw/main/icon/Hongkong(1).png, type: select, include-all: true, filter: "(?i)香港"}
- {name: 日本, icon: https://raw.ihtw.moe/github.com/lige47/QuanX-icon-rule/raw/main/icon/Japan(2).png, type: select, include-all: true, filter: "(?i)日本"}
- {name: 亚洲, icon: https://raw.ihtw.moe/github.com/lige47/QuanX-icon-rule/raw/main/icon/singapore.png, type: select, include-all: true, filter: "(?i)新加坡|台湾|俄罗斯|韩国|印度"}
- {name: 欧洲, icon: https://raw.ihtw.moe/github.com/lige47/QuanX-icon-rule/raw/main/icon/UnitedKingdom.png, type: select, include-all: true, filter: "(?i)英国|德国|法国|乌克兰|土耳其"}
- {name: 其他, icon: https://raw.ihtw.moe/github.com/lige47/QuanX-icon-rule/raw/main/icon/Argentina.png, type: select, include-all: true, filter: "(?i)美国|加拿大|阿根廷|澳大利亚"}
rules:
- RULE-SET,custom_reject,REJECT
- RULE-SET,custom_direct,直连
- RULE-SET,private_domain,直连
- RULE-SET,github_domain,代理
- RULE-SET,ai_domain,GLOBAL
- RULE-SET,steam_domain,游戏
- RULE-SET,bilibili_domain,直连
- RULE-SET,microsoft_domain,直连
- RULE-SET,apple_domain,直连
- RULE-SET,gfw_domain,代理
- RULE-SET,geolocation-!cn,代理
- RULE-SET,cn_domain,直连
- RULE-SET,cn_ipcidr,直连
- MATCH,漏网
rule-anchor:
ipcidr: &ipcidr {type: http, interval: 86400, behavior: ipcidr, format: mrs}
domain: &domain {type: http, interval: 86400, behavior: domain, format: mrs}
classical: &classical {type: http, interval: 86400, behavior: classical, format: yaml}
rule-providers:
custom_reject: { <<: *classical, url: "https://gist.githubusercontent.com/wbmins/6999fb603ab6b31cda005bae2f82270a/raw/reject.yaml"}
custom_direct: { <<: *classical, url: "https://gist.githubusercontent.com/wbmins/15db9161b04fb3912be8738b6e8e1df4/raw/direct.yaml"}
private_domain: { <<: *domain, url: "https://raw.ihtw.moe/github.com/MetaCubeX/meta-rules-dat/raw/meta/geo/geosite/private.mrs"}
ai_domain: { <<: *domain, url: "https://github.com/MetaCubeX/meta-rules-dat/raw/refs/heads/meta/geo/geosite/category-ai-!cn.mrs" }
microsoft_domain: { <<: *domain, url: "https://raw.ihtw.moe/github.com/MetaCubeX/meta-rules-dat/raw/meta/geo/geosite/microsoft.mrs"}
github_domain: { <<: *domain, url: "https://raw.ihtw.moe/github.com/MetaCubeX/meta-rules-dat/raw/meta/geo/geosite/github.mrs"}
gfw_domain: { <<: *domain, url: "https://raw.ihtw.moe/github.com/MetaCubeX/meta-rules-dat/raw/meta/geo/geosite/gfw.mrs"}
geolocation-!cn: { <<: *domain, url: "https://raw.ihtw.moe/github.com/MetaCubeX/meta-rules-dat/raw/meta/geo/geosite/geolocation-!cn.mrs"}
cn_domain: { <<: *domain, url: "https://raw.ihtw.moe/github.com/MetaCubeX/meta-rules-dat/raw/meta/geo/geosite/cn.mrs"}
apple_domain: { <<: *domain, url: "https://raw.ihtw.moe/github.com/MetaCubeX/meta-rules-dat/raw/meta/geo/geosite/apple-cn.mrs"}
bilibili_domain: { <<: *domain, url: "https://raw.ihtw.moe/github.com/MetaCubeX/meta-rules-dat/raw/meta/geo/geosite/bilibili.mrs"}
steam_domain: { <<: *domain, url: "https://raw.ihtw.moe/github.com/MetaCubeX/meta-rules-dat/raw/meta/geo/geosite/steam.mrs"}
cn_ipcidr: { <<: *ipcidr, url: "https://raw.ihtw.moe/github.com/MetaCubeX/meta-rules-dat/raw/meta/geo/geoip/cn.mrs"}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment