#---------------------------------------------------#
## 配置文件需要放置在 $HOME/.config/clash/*.yaml

## 这份文件是clashX的基础配置文件，请尽量新建配置文件进行修改。
## ！！！只有这份文件的端口设置会随ClashX启动生效

## 如果您不知道如何操作，请参阅 官方Github文档 https://github.com/Dreamacro/clash/blob/dev/README.md
#---------------------------------------------------#

# (HTTP and SOCKS5 in one port)
mixed-port: 7890
# RESTful API for clash
external-controller: 127.0.0.1:9090
allow-lan: false
mode: rule
log-level: warning
# define: &cf_better_ip 172.64.147.128
proxies:
  # - {name: 🇯🇵 ajp.dogex.ga, server: ajp.dogex.ga, port: 443, type: vmess, uuid: *key, alterId: 0, cipher: auto, tls: true, skip-cert-verify: false, network: ws, ws-opts: {path: /api, headers: {Host: ajp.dogex.ga}}, udp: true}
  # - {name: 🇯🇵 armjp.dogex.ga, server: armjp.dogex.ga, port: 443, type: vmess, uuid: *key, alterId: 0, cipher: auto, tls: true, skip-cert-verify: false, network: ws, ws-opts: {path: /api, headers: {Host: armjp.dogex.ga}}, udp: true}
  # - {name: 🇰🇷 akr.dogex.ga, server: akr.dogex.ga, port: 443, type: vmess, uuid: *key, alterId: 0, cipher: auto, tls: true, skip-cert-verify: false, network: ws, ws-opts: {path: /api, headers: {Host: akr.dogex.ga}}, udp: true}
  # - {name: 🇦🇺 aau.dogex.ga, server: aau.dogex.ga, port: 443, type: vmess, uuid: *key, alterId: 0, cipher: auto, tls: true, skip-cert-verify: false, network: ws, ws-opts: {path: /api, headers: {Host: aau.dogex.ga}}, udp: true}

  # - name: "router"
  #   type: socks5
  #   server: 192.168.2.1
  #   port: 1080
  #   # username: username
  #   # password: password
  #   # tls: true
  #   # skip-cert-verify: true
  #   udp: true
  - alterId: 0
    cipher: auto
    name: 澳大利亚ipv6
    port: 9095
    server: 2603:c023:c001:cdee:e13d:2fb9:f633:ab45
    type: vmess
    uuid: efe53dde-9d7d-9c7d-ef0f-7a84d50318f1
    network: http

  - alterId: 0
    cipher: auto
    name: ajpd
    network: ws
    port: 443
    server: ajpd.dogex.tk
    skip-cert-verify: false
    tls: true
    type: vmess
    udp: true
    uuid: efe53dde-9d7d-9c7d-ef0f-7a84d50318f1
    ws-opts:
      headers:
        Host: ajpd.dogex.tk
      path: /api

  - alterId: 0
    cipher: auto
    name: akrd
    network: ws
    port: 443
    server: akrd.dogex.tk
    skip-cert-verify: false
    tls: true
    type: vmess
    udp: true
    uuid: efe53dde-9d7d-9c7d-ef0f-7a84d50318f1
    ws-opts:
      headers:
        Host: akrd.dogex.tk
      path: /api
  
  - alterId: 0
    cipher: auto
    name: aaud
    network: ws
    port: 443
    server: aaud.dogex.tk
    skip-cert-verify: false
    tls: true
    type: vmess
    udp: true
    uuid: efe53dde-9d7d-9c7d-ef0f-7a84d50318f1
    ws-opts:
      headers:
        Host: aaud.dogex.tk
      path: /api

  - alterId: 0
    cipher: auto
    name: kr_arm
    port: 9091
    server: 132.226.225.26
    type: vmess
    uuid: dba44a3c-8ba2-4497-927d-84340e99e42a
    network: http

  - alterId: 0
    cipher: auto
    name: au_arm
    port: 9091
    server: 168.138.9.229
    type: vmess
    uuid: efe53dde-9d7d-9c7d-ef0f-7a84d50318f1
    network: http

  - alterId: 0
    cipher: auto
    name: jp_arm
    port: 9091
    server: 168.138.45.229
    type: vmess
    uuid: efe53dde-9d7d-9c7d-ef0f-7a84d50318f1
    network: http
    
  - alterId: 0
    cipher: auto
    name: au
    port: 9091
    server: 168.138.29.5
    type: vmess
    uuid: efe53dde-9d7d-9c7d-ef0f-7a84d50318f1
    network: http

  - alterId: 0
    cipher: auto
    name: kr
    port: 9091
    server: 130.162.137.247
    type: vmess
    uuid: efe53dde-9d7d-9c7d-ef0f-7a84d50318f1
    network: http

  - alterId: 0
    cipher: auto
    name: jp
    port: 9091
    server: 150.230.62.52
    type: vmess
    uuid: efe53dde-9d7d-9c7d-ef0f-7a84d50318f1
    network: http
  # - name: "wgz_ss"
  #   type: ss
  #   server: 192.168.1.9
  #   port: 1081
  #   cipher: chacha20-ietf-poly1305
  #   password: "limpbzkt"

  #第二种配置
  # Shadowsocks + simple-obfs   配置范本
  - name: "kr_ss"
    type: ss
    server: 130.162.137.247
    port: 9999
    cipher: chacha20-ietf-poly1305
    password: "limpbzkt"
    plugin: obfs
    plugin-opts:      
      # or tls               #  大部分选择HTTP           
      mode: http
      #  伪装
      host: wapzt.189.cn

  # - name: "kr_ss_ipv6"
  #   type: ss
  #   server: "[2603:c022:8002:f6cc:5aa0:f71f:8ee4:8b6c]"
  #   port: 9999
  #   cipher: chacha20-ietf-poly1305
  #   password: "limpbzkt"
  #   plugin: obfs
  #   plugin-opts:      
  #     # or tls               #  大部分选择HTTP           
  #     mode: http
  #     #  伪装
  #     host: wapzt.189.cn

  - name: jp_arm_ss
    type: ss
    server: 168.138.45.229
    port: 9999
    cipher: chacha20-ietf-poly1305
    password: "limpbzkt"
    plugin: obfs
    plugin-opts:      
      # or tls               #  大部分选择HTTP           
      mode: http
      #  伪装
      host: wapzt.189.cn

  - name: au_ss
    type: ss
    server: 168.138.29.5
    port: 9990
    cipher: aes-256-gcm
    password: "limpbzkt"
    plugin: obfs
    plugin-opts:      
      # or tls               #  大部分选择HTTP           
      mode: http
      #  伪装
      host: wapzt.189.cn

  # socks5
  - name: "router"
    type: socks5
    server: 10.0.0.1
    port: 1080
    # username: username
    # password: password
    # tls: true
    # skip-cert-verify: true
    udp: true

proxy-groups:
- name: PROXY
  proxies:
  # - 🇰🇷 akrd.dogex.tk
  - 🇰🇷_arm_v2
  - 🇰🇷_ss
  # - 🇰🇷_v2
  - ajpd
  # - 🇦🇺_arm_v2
  - 🇦🇺_ss
  # # - 🇦🇺_v2
  # - 🇯🇵 armjp.dogex.ga
  # - 🇯🇵_arm_v2
  # - 🇯🇵_arm_ss
  # - 🇯🇵_v2
  type: select

rule-providers:
  reject:
    type: http
    behavior: domain
    url: "https://cdn.jsdelivr.net/gh/Loyalsoldier/clash-rules@release/reject.txt"
    path: ./ruleset/reject.yaml
    interval: 86400

  icloud:
    type: http
    behavior: domain
    url: "https://cdn.jsdelivr.net/gh/Loyalsoldier/clash-rules@release/icloud.txt"
    path: ./ruleset/icloud.yaml
    interval: 86400

  apple:
    type: http
    behavior: domain
    url: "https://cdn.jsdelivr.net/gh/Loyalsoldier/clash-rules@release/apple.txt"
    path: ./ruleset/apple.yaml
    interval: 86400

  google:
    type: http
    behavior: domain
    url: "https://cdn.jsdelivr.net/gh/Loyalsoldier/clash-rules@release/google.txt"
    path: ./ruleset/google.yaml
    interval: 86400

  proxy:
    type: http
    behavior: domain
    url: "https://cdn.jsdelivr.net/gh/Loyalsoldier/clash-rules@release/proxy.txt"
    path: ./ruleset/proxy.yaml
    interval: 86400

  direct:
    type: http
    behavior: domain
    url: "https://cdn.jsdelivr.net/gh/Loyalsoldier/clash-rules@release/direct.txt"
    path: ./ruleset/direct.yaml
    interval: 86400

  private:
    type: http
    behavior: domain
    url: "https://cdn.jsdelivr.net/gh/Loyalsoldier/clash-rules@release/private.txt"
    path: ./ruleset/private.yaml
    interval: 86400

  gfw:
    type: http
    behavior: domain
    url: "https://cdn.jsdelivr.net/gh/Loyalsoldier/clash-rules@release/gfw.txt"
    path: ./ruleset/gfw.yaml
    interval: 86400

  greatfire:
    type: http
    behavior: domain
    url: "https://cdn.jsdelivr.net/gh/Loyalsoldier/clash-rules@release/greatfire.txt"
    path: ./ruleset/greatfire.yaml
    interval: 86400

  tld-not-cn:
    type: http
    behavior: domain
    url: "https://cdn.jsdelivr.net/gh/Loyalsoldier/clash-rules@release/tld-not-cn.txt"
    path: ./ruleset/tld-not-cn.yaml
    interval: 86400

  telegramcidr:
    type: http
    behavior: ipcidr
    url: "https://cdn.jsdelivr.net/gh/Loyalsoldier/clash-rules@release/telegramcidr.txt"
    path: ./ruleset/telegramcidr.yaml
    interval: 86400

  cncidr:
    type: http
    behavior: ipcidr
    url: "https://cdn.jsdelivr.net/gh/Loyalsoldier/clash-rules@release/cncidr.txt"
    path: ./ruleset/cncidr.yaml
    interval: 86400

  lancidr:
    type: http
    behavior: ipcidr
    url: "https://cdn.jsdelivr.net/gh/Loyalsoldier/clash-rules@release/lancidr.txt"
    path: ./ruleset/lancidr.yaml
    interval: 86400

  applications:
    type: http
    behavior: classical
    url: "https://cdn.jsdelivr.net/gh/Loyalsoldier/clash-rules@release/applications.txt"
    path: ./ruleset/applications.yaml
    interval: 86400

rules:
  - RULE-SET,applications,DIRECT
  - DOMAIN,clash.razord.top,DIRECT
  - DOMAIN,yacd.haishan.me,DIRECT
  - RULE-SET,private,DIRECT
  - RULE-SET,reject,REJECT
  - RULE-SET,icloud,DIRECT
  - RULE-SET,apple,DIRECT
  - RULE-SET,google,DIRECT
  - RULE-SET,proxy,PROXY
  - RULE-SET,direct,DIRECT
  - RULE-SET,lancidr,DIRECT
  - RULE-SET,cncidr,DIRECT
  - RULE-SET,telegramcidr,PROXY
  - GEOIP,LAN,DIRECT
  - GEOIP,CN,DIRECT
  - MATCH,PROXY