# ClashMac Default - Replace YOUR_SUBSCRIPTION_URL to start

mode: rule
mixed-port: 7890
unified-delay: true
tcp-concurrent: true

profile:
  store-selected: true
  store-fake-ip: true

sniffer:
  enable: 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"

dns:
  enable: true
  enhanced-mode: fake-ip
  fake-ip-range: 198.18.0.1/16
  nameserver:
    - 223.5.5.5
    - 119.29.29.29
  fake-ip-filter:
    - "*.lan"
    - "*.local"
    - rule-set:Private
    - rule-set:China

# Add your subscription URL here
proxy-providers:
  Provider:
    type: http
    url: "YOUR_SUBSCRIPTION_URL"
    interval: 86400
    health-check:
      enable: true
      url: 'https://www.google.com/generate_204'
      interval: 300

# Or add proxies directly
proxies:
  # - {name: MyProxy, type: ss, server: example.com, port: 8388, cipher: aes-256-gcm, password: "password"}

proxy-groups:
  - name: Proxy
    type: select
    include-all: true
    proxies: [DIRECT]
  - name: China
    type: select
    proxies: [DIRECT, Proxy]

rules:
  - RULE-SET,Private,DIRECT
  - RULE-SET,PrivateIP,DIRECT,no-resolve
  - RULE-SET,Proxy,Proxy
  - RULE-SET,Direct,China
  - RULE-SET,AppleCN,China
  - RULE-SET,China,China
  - RULE-SET,ChinaIP,China,no-resolve
  - MATCH,Proxy

domain: &domain {type: http, behavior: domain, format: mrs, interval: 86400}
ipcidr: &ipcidr {type: http, behavior: ipcidr, format: mrs, interval: 86400}

rule-providers:
  Private:   {<<: *domain, url: https://github.com/666OS/rules/raw/release/mihomo/domain/Private.mrs}
  Direct:    {<<: *domain, url: https://github.com/666OS/rules/raw/release/mihomo/domain/Direct.mrs}
  AppleCN:   {<<: *domain, url: https://github.com/666OS/rules/raw/release/mihomo/domain/AppleCN.mrs}
  Proxy:     {<<: *domain, url: https://github.com/666OS/rules/raw/release/mihomo/domain/Proxy.mrs}
  China:     {<<: *domain, url: https://github.com/666OS/rules/raw/release/mihomo/domain/China.mrs}
  PrivateIP: {<<: *ipcidr, url: https://github.com/666OS/rules/raw/release/mihomo/ip/Private.mrs}
  ChinaIP:   {<<: *ipcidr, url: https://github.com/666OS/rules/raw/release/mihomo/ip/China.mrs}
