ipv6: true
unified-delay: true

dns:
  enable: true
  listen: 0.0.0.0:1053
  ipv6: true
  respect-rules: true
  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://1.1.1.1
    - tls://8.8.8.8
  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-szx1.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: 33001
    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-5M
    type: anytls
    server: cn-szx1.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: 33003
    password: 60da8a09-bd7d-404e-9753-f9b45ec71df7
    udp: true
    sni: hk-hkg5.access.moecl.com
    alpn:
      - h2
    client-fingerprint: chrome
    skip-cert-verify: true

  - name: LAX-3D
    type: anytls
    server: 104.168.103.62
    port: 10201
    password: 47f0aa39-2d6a-40cc-848c-bb8fd7959d1c
    udp: true
    sni: us-lax3.access.moecl.com
    alpn:
      - h2
    client-fingerprint: chrome
    skip-cert-verify: true

  - name: NRT-1P
    type: anytls
    server: cn-can4.access.moecl.com
    port: 33005
    password: 192564ee-e291-4128-9992-069507d6452d
    udp: true
    sni: jp-nrt1.access.moecl.com
    alpn:
      - h2
    client-fingerprint: chrome
    skip-cert-verify: true

  - name: NRT-3M
    type: anytls
    server: cn-szx1.access.moecl.com
    port: 9051
    password: 1ab7d721-97ba-4287-823d-1c8389397dad
    udp: true
    sni: jp-nrt3.access.moecl.com
    alpn:
      - h2
    client-fingerprint: chrome
    skip-cert-verify: true

  - name: TPE-1P
    type: anytls
    server: cn-can4.access.moecl.com
    port: 33009
    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
      - Oversea

  - name: Oversea
    type: select
    proxies:
      - HKG-1M
      - HKG-1P
      - HKG-2M
      - HKG-5M
      - HKG-5P
      - LAX-3D
      - NRT-1P
      - NRT-3M
      - TPE-1P

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

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

  - name: Game
    type: select
    proxies:
      - DIRECT
      - REJECT
      - Global
      - HKG-1M
      - HKG-1P
      - HKG-2M
      - HKG-5M
      - HKG-5P
      - LAX-3D
      - NRT-1P
      - NRT-3M
      - TPE-1P

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

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

  - name: Volume
    type: select
    proxies:
      - DIRECT
      - REJECT
      - Global
      - HKG-1M
      - HKG-1P
      - HKG-2M
      - HKG-5M
      - HKG-5P
      - LAX-3D
      - NRT-1P
      - NRT-3M
      - TPE-1P

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
  local_ip:
    type: http
    behavior: ipcidr
    format: text
    interval: 43200
    url: https://misc-pkgs.moecl.com/subscriptions/local_ip.txt
    path: ./sukkaw_ruleset/local_ip.txt

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

  - RULE-SET,ai_non_ip,AI
  - DOMAIN-KEYWORD,leigod,China
  - DOMAIN,mypikpak.com,Volume
  - DOMAIN,mypikpak.net,Volume
  - DOMAIN,user.mypikpak.com,Volume
  - DOMAIN,access.mypikpak.com,Volume
  - DOMAIN,api-drive.mypikpak.com,Volume
  - DOMAIN-SUFFIX,mypikpak.com,Volume
  - DOMAIN-SUFFIX,mypikpak.net,Volume
  - DOMAIN,secure.insex.com,Volume
  - IP-CIDR,152.53.130.20/32,Volume

  - AND,((DST-PORT,853),(NOT,((GEOIP,CN)))),Oversea
  - 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,china_ip,China
  - MATCH,Global
