dns:
  enable: true
  listen: 0.0.0.0:1053
  ipv6: true
  respect-rules: true
  enhanced-mode: fake-ip
  use-hosts: true
  default-nameserver:
    - 223.5.5.5
  nameserver:
    - tls://223.5.5.5
    - tls://223.6.6.6
  proxy-server-nameserver:
    - tls://223.5.5.5
  fallback:
    - tls://9.9.9.9
    - tls://1.1.1.1
  fallback-filter:
    geoip: true
    geoip-code: CN
  fake-ip-range: 198.18.0.1/16
  fake-ip-filter:
    - "*"
    - "+.lan"
    - "+.local"
    - "+.stun.*.*"

proxies:
  - name: CAN-4
    type: anytls
    server: cn-can4.access.moecl.com
    port: 10201
    password: b02d695b-818e-4ea9-b493-48399966ace2
    udp: true
    sni: cn-can4.access.moecl.com
    alpn:
      - h2
    client-fingerprint: chrome
    skip-cert-verify: true

  - name: HKG-1M
    type: anytls
    server: cn-szx3.access.moecl.com
    port: 9001
    password: 1653d54f-f1c6-4ab4-bb00-793dd1c3e8e8
    udp: true
    sni: hk-hkg1.access.moecl.com
    alpn:
      - h2
    client-fingerprint: chrome
    skip-cert-verify: true

  - name: HKG-1P
    type: anytls
    server: cn-can4.access.moecl.com
    port: 33000
    password: 1653d54f-f1c6-4ab4-bb00-793dd1c3e8e8
    udp: true
    sni: hk-hkg1.access.moecl.com
    alpn:
      - h2
    client-fingerprint: chrome
    skip-cert-verify: true

  - name: HKG-2M
    type: anytls
    server: cn-szx1.access.moecl.com
    port: 9031
    password: 3b0a90e9-b083-4d19-881a-4b8db672fb82
    udp: true
    sni: hk-hkg2.access.moecl.com
    alpn:
      - h2
    client-fingerprint: chrome
    skip-cert-verify: true

  - name: HKG-4M
    type: anytls
    server: cn-szx3.access.moecl.com
    port: 9041
    password: 8df2d301-a334-41ae-aa82-5eb20c3b7882
    udp: true
    sni: hk-hkg4.access.moecl.com
    alpn:
      - h2
    client-fingerprint: chrome
    skip-cert-verify: true

  - name: HKG-4P
    type: anytls
    server: cn-can4.access.moecl.com
    port: 33006
    password: 8df2d301-a334-41ae-aa82-5eb20c3b7882
    udp: true
    sni: hk-hkg4.access.moecl.com
    alpn:
      - h2
    client-fingerprint: chrome
    skip-cert-verify: true

  - name: HKG-5M
    type: anytls
    server: cn-szx3.access.moecl.com
    port: 9011
    password: 60da8a09-bd7d-404e-9753-f9b45ec71df7
    udp: true
    sni: hk-hkg5.access.moecl.com
    alpn:
      - h2
    client-fingerprint: chrome
    skip-cert-verify: true

  - name: HKG-5P
    type: anytls
    server: cn-can4.access.moecl.com
    port: 33002
    password: 60da8a09-bd7d-404e-9753-f9b45ec71df7
    udp: true
    sni: hk-hkg5.access.moecl.com
    alpn:
      - h2
    client-fingerprint: chrome
    skip-cert-verify: true

  - name: NRT-4M
    type: anytls
    server: cn-szx3.access.moecl.com
    port: 9021
    password: 3d809ee9-6ad1-4c15-b3cc-4b3f7809e02f
    udp: true
    sni: jp-nrt4.access.moecl.com
    alpn:
      - h2
    client-fingerprint: chrome
    skip-cert-verify: true

  - name: NRT-4P
    type: anytls
    server: cn-can4.access.moecl.com
    port: 33004
    password: 3d809ee9-6ad1-4c15-b3cc-4b3f7809e02f
    udp: true
    sni: jp-nrt4.access.moecl.com
    alpn:
      - h2
    client-fingerprint: chrome
    skip-cert-verify: true

  - name: TPE-1M
    type: anytls
    server: cn-szx3.access.moecl.com
    port: 9051
    password: 10576987-ed82-4e3b-bbc2-c91a08f49c80
    udp: true
    sni: tw-tpe1.access.moecl.com
    alpn:
      - h2
    client-fingerprint: chrome
    skip-cert-verify: true

  - name: TPE-1P
    type: anytls
    server: cn-can4.access.moecl.com
    port: 33008
    password: 10576987-ed82-4e3b-bbc2-c91a08f49c80
    udp: true
    sni: tw-tpe1.access.moecl.com
    alpn:
      - h2
    client-fingerprint: chrome
    skip-cert-verify: true

proxy-groups:
  - name: Global
    type: select
    proxies:
      - DIRECT
      - REJECT
      - HKG-1M
      - HKG-1P
      - HKG-2M
      - HKG-4M
      - HKG-4P
      - HKG-5M
      - HKG-5P
      - NRT-4M
      - NRT-4P
      - TPE-1M
      - TPE-1P

  - name: China
    type: select
    proxies:
      - DIRECT
      - REJECT
      - Global
      - HKG-1M
      - HKG-1P
      - HKG-2M
      - HKG-4M
      - HKG-4P
      - HKG-5M
      - HKG-5P
      - NRT-4M
      - NRT-4P
      - TPE-1M
      - TPE-1P

  - name: AI
    type: select
    proxies:
      - DIRECT
      - REJECT
      - Global
      - HKG-1M
      - HKG-1P
      - HKG-2M
      - HKG-4M
      - HKG-4P
      - HKG-5M
      - HKG-5P
      - NRT-4M
      - NRT-4P
      - TPE-1M
      - TPE-1P

  - name: Games
    type: select
    proxies:
      - DIRECT
      - REJECT
      - Global
      - HKG-1M
      - HKG-1P
      - HKG-2M
      - HKG-4M
      - HKG-4P
      - HKG-5M
      - HKG-5P
      - NRT-4M
      - NRT-4P
      - TPE-1M
      - TPE-1P

  - name: Messanger
    type: select
    proxies:
      - DIRECT
      - REJECT
      - Global
      - HKG-1M
      - HKG-1P
      - HKG-2M
      - HKG-4M
      - HKG-4P
      - HKG-5M
      - HKG-5P
      - NRT-4M
      - NRT-4P
      - TPE-1M
      - TPE-1P

  - name: Microsoft
    type: select
    proxies:
      - DIRECT
      - REJECT
      - Global
      - HKG-1M
      - HKG-1P
      - HKG-2M
      - HKG-4M
      - HKG-4P
      - HKG-5M
      - HKG-5P
      - NRT-4M
      - NRT-4P
      - TPE-1M
      - TPE-1P

  - name: RemoteD
    type: select
    proxies:
      - DIRECT
      - REJECT
      - Global
      - CAN-4
      - HKG-1M
      - HKG-1P
      - HKG-2M
      - HKG-4M
      - HKG-4P
      - HKG-5M
      - HKG-5P
      - NRT-4M
      - NRT-4P
      - TPE-1M
      - TPE-1P

  - name: RemoteG
    type: select
    proxies:
      - DIRECT
      - REJECT
      - Global
      - CAN-4
      - HKG-1M
      - HKG-1P
      - HKG-2M
      - HKG-4M
      - HKG-4P
      - HKG-5M
      - HKG-5P
      - NRT-4M
      - NRT-4P
      - TPE-1M
      - TPE-1P

  - name: Speedtest
    type: select
    proxies:
      - DIRECT
      - REJECT
      - Global
      - HKG-1M
      - HKG-1P
      - HKG-2M
      - HKG-4M
      - HKG-4P
      - HKG-5M
      - HKG-5P
      - NRT-4M
      - NRT-4P
      - TPE-1M
      - TPE-1P

  - name: Blocker
    type: select
    proxies:
      - DIRECT
      - REJECT
      - Global

rule-providers:
  ai_non_ip:
    type: http
    behavior: classical
    format: text
    interval: 43200
    url: https://ruleset.skk.moe/Clash/non_ip/ai.txt
    path: ./sukkaw_ruleset/ai_non_ip.txt
  china_ip:
    type: http
    behavior: ipcidr
    format: text
    interval: 43200
    url: https://ruleset.skk.moe/Clash/ip/china_ip.txt
    path: ./sukkaw_ruleset/china_ip.txt
  microsoft_cdn_non_ip:
    type: http
    behavior: classical
    format: text
    interval: 43200
    url: https://ruleset.skk.moe/Clash/non_ip/microsoft_cdn.txt
    path: ./sukkaw_ruleset/microsoft_cdn_non_ip.txt
  microsoft_non_ip:
    type: http
    behavior: classical
    format: text
    interval: 43200
    url: https://ruleset.skk.moe/Clash/non_ip/microsoft.txt
    path: ./sukkaw_ruleset/microsoft_non_ip.txt
  reject_non_ip_no_drop:
    type: http
    behavior: classical
    format: text
    interval: 43200
    url: https://ruleset.skk.moe/Clash/non_ip/reject-no-drop.txt
    path: ./sukkaw_ruleset/reject_non_ip_no_drop.txt
  reject_non_ip_drop:
    type: http
    behavior: classical
    format: text
    interval: 43200
    url: https://ruleset.skk.moe/Clash/non_ip/reject-drop.txt
    path: ./sukkaw_ruleset/reject_non_ip_drop.txt
  reject_non_ip:
    type: http
    behavior: classical
    format: text
    interval: 43200
    url: https://ruleset.skk.moe/Clash/non_ip/reject.txt
    path: ./sukkaw_ruleset/reject_non_ip.txt
  reject_domainset:
    type: http
    behavior: domain
    format: text
    interval: 43200
    url: https://ruleset.skk.moe/Clash/domainset/reject.txt
    path: ./sukkaw_ruleset/reject_domainset.txt
  reject_ip:
    type: http
    behavior: classical
    format: text
    interval: 43200
    url: https://ruleset.skk.moe/Clash/ip/reject.txt
    path: ./sukkaw_ruleset/reject_ip.txt
  speedtest:
    type: http
    behavior: domain
    format: text
    interval: 43200
    url: https://ruleset.skk.moe/Clash/domainset/speedtest.txt
    path: ./sukkaw_ruleset/speedtest.txt
  telegram_non_ip:
    type: http
    behavior: classical
    format: text
    interval: 43200
    url: https://ruleset.skk.moe/Clash/non_ip/telegram.txt
    path: ./sukkaw_ruleset/telegram_non_ip.txt
  telegram_ip:
    type: http
    behavior: classical
    format: text
    interval: 43200
    url: https://ruleset.skk.moe/Clash/ip/telegram.txt
    path: ./sukkaw_ruleset/telegram_ip.txt

rules:
  - DOMAIN-SUFFIX,ubi.com,Games
  - DOMAIN-SUFFIX,ubisoft.com,Games
  - DOMAIN-SUFFIX,starrails.com,Games
  - DOMAIN-SUFFIX,hoyoverse.com,Games
  - DST-PORT,23301,Games

  - RULE-SET,reject_domainset,Blocker
  - RULE-SET,reject_non_ip,Blocker
  - RULE-SET,reject_non_ip_drop,Blocker
  - RULE-SET,reject_non_ip_no_drop,Blocker

  - RULE-SET,speedtest,Speedtest
  - RULE-SET,ai_non_ip,AI
  - RULE-SET,telegram_non_ip,Messanger
  - RULE-SET,microsoft_cdn_non_ip,China
  - RULE-SET,microsoft_non_ip,Microsoft

  - DOMAIN-SUFFIX,anyviewer.cn,RemoteD
  - AND,((DST-PORT,22),(GEOIP,CN)),RemoteD
  - AND,((DST-PORT,3389),(GEOIP,CN)),RemoteD
  - IP-CIDR,100.64.0.0/10,RemoteD
  - DST-PORT,22,RemoteG
  - DST-PORT,3389,RemoteG
  - DST-PORT,8006,RemoteG

  - RULE-SET,reject_ip,Blocker
  - RULE-SET,telegram_ip,Messanger
  - RULE-SET,china_ip,China

  - MATCH,Global
