有大佬帮我看看配置有啥可以优化的么

COW · 昨天 23:56 · 103 次点击

之前一直没怎么研究过这块,用的别人的,今个在 Clash verge 里自定义了个配置文件,瞎捣鼓了一通,现在大概长这样。

# Profile Template for Clash Verge
port: 7890
socks-port: 7891
mixed-port: 7890
allow-lan: true
ipv6: true
mode: rule
log-level: silent
external-controller: 127.0.0.1:9090
secret: ""
profile:
  store-selected: true
  store-fake-ip: false
dns:
  enable: true
  ipv6: true
  prefer-h3: true
  enhanced-mode: fake-ip
  fake-ip-range: 198.18.0.1/16
  fake-ip-filter:
    - "example.internal"
    - "+.example.internal"
  nameserver:
    - https://8.8.8.8/dns-query
    - https://8.8.4.4/dns-query
    - https://1.1.1.1/dns-query
    - https://1.0.0.1/dns-query
    - https://208.67.222.222/dns-query
    - https://208.67.220.220/dns-query
    # - https://194.242.2.2/dns-query
    # - https://194.242.2.3/dns-query
  # nameserver:
    # - 223.5.5.5
    # - 180.76.76.76
    # - 119.29.29.29
    # - 117.50.11.11
    # - 117.50.10.10
    # - 114.114.114.114
    # - https://dns.alidns.com/dns-query
    # - https://doh.360.cn/dns-query
  nameserver-policy:
    "example.internal": "192.168.0.100"
    "+.example.internal": "192.168.0.100"
    geosite:cn,private:
      - 1.2.4.8
      - 210.2.4.8
  # fallback:
  #   - 8.8.8.8
  #   - tls://dns.rubyfish.cn:853
  #   - tls://1.0.0.1:853
  #   - tls://dns.google:853
  #   - https://dns.rubyfish.cn/dns-query
  #   - https://cloudflare-dns.com/dns-query
  #   - https://dns.google/dns-query
  # fallback-filter:
  #   geoip: true
  #   ipcidr:
  #     - 240.0.0.0/4
  #     - 0.0.0.0/32
  #     - 127.0.0.1/32
  #   domain:
  #     - +.chatgpt.com
  #     - +.google.com
  #     - +.facebook.com
  #     - +.youtube.com
  #     - +.xn--ngstr-lra8j.com
  #     - +.google.cn
  #     - +.googleapis.cn
  #     - +.gvt1.com
proxy-providers:
  ssnz:
    type: http
    url: "https://xxx"
    path: ./providers/ssnz.yaml
    interval: 3600
    proxy: DIRECT
    health-check:
      enable: true
      url: https://www.gstatic.com/generate_204
      interval: 300
      timeout: 5000
      lazy: true
      expected-status: 204
    override:
      udp-over-tcp: true
      udp: true
      ip-version: dual
    exclude-filter: "有效期|香港|德国|新加坡|澳大利亚|日本|荷兰|V6|爱沙尼亚|英国|台湾"
proxy-groups:
  - name: Proxy
    type: select
    max-failed-times: 3
    timeout: 2000
    proxies:
      - AUTO
      - DIRECT
      - REJECT
    use:
      - ssnz
  - name: AUTO
    type: fallback
    max-failed-times: 3
    timeout: 2000
    use:
      - ssnz
rule-providers:
  direct:
    type: http
    behavior: domain
    url: "https://raw.githubusercontent.com/Loyalsoldier/clash-rules/release/direct.txt"
    path: ./ruleset/direct.yaml
    interval: 86400

  proxy:
    type: http
    behavior: domain
    url: "https://raw.githubusercontent.com/Loyalsoldier/clash-rules/release/proxy.txt"
    path: ./ruleset/proxy.yaml
    interval: 86400

  reject:
    type: http
    behavior: domain
    url: "https://raw.githubusercontent.com/Loyalsoldier/clash-rules/release/reject.txt"
    path: ./ruleset/reject.yaml
    interval: 86400

  private:
    type: http
    behavior: domain
    url: "https://raw.githubusercontent.com/Loyalsoldier/clash-rules/release/private.txt"
    path: ./ruleset/private.yaml
    interval: 86400

  apple:
    type: http
    behavior: domain
    url: "https://raw.githubusercontent.com/Loyalsoldier/clash-rules/release/apple.txt"
    path: ./ruleset/apple.yaml
    interval: 86400

  icloud:
    type: http
    behavior: domain
    url: "https://raw.githubusercontent.com/Loyalsoldier/clash-rules/release/icloud.txt"
    path: ./ruleset/icloud.yaml
    interval: 86400

  google:
    type: http
    behavior: domain
    url: "https://raw.githubusercontent.com/Loyalsoldier/clash-rules/release/google.txt"
    path: ./ruleset/google.yaml
    interval: 86400

  gfw:
    type: http
    behavior: domain
    url: "https://raw.githubusercontent.com/Loyalsoldier/clash-rules/release/gfw.txt"
    path: ./ruleset/gfw.yaml
    interval: 86400

  tld-not-cn:
    type: http
    behavior: domain
    url: "https://raw.githubusercontent.com/Loyalsoldier/clash-rules/release/tld-not-cn.txt"
    path: ./ruleset/tld-not-cn.yaml
    interval: 86400

  telegramcidr:
    type: http
    behavior: ipcidr
    url: "https://raw.githubusercontent.com/Loyalsoldier/clash-rules/release/telegramcidr.txt"
    path: ./ruleset/telegramcidr.yaml
    interval: 86400

  lancidr:
    type: http
    behavior: ipcidr
    url: "https://raw.githubusercontent.com/Loyalsoldier/clash-rules/release/lancidr.txt"
    path: ./ruleset/lancidr.yaml
    interval: 86400

  cncidr:
    type: http
    behavior: ipcidr
    url: "https://raw.githubusercontent.com/Loyalsoldier/clash-rules/release/cncidr.txt"
    path: ./ruleset/cncidr.yaml
    interval: 86400

  applications:
    type: http
    behavior: classical
    url: "https://raw.githubusercontent.com/Loyalsoldier/clash-rules/release/applications.txt"
    path: ./ruleset/applications.yaml
    interval: 86400

rules:
  # - IP-CIDR,91.108.4.0/22,Proxy,no-resolve
  # - IP-CIDR,91.108.8.0/22,Proxy,no-resolve
  # - IP-CIDR,91.108.12.0/22,Proxy,no-resolve
  # - IP-CIDR,91.108.16.0/22,Proxy,no-resolve
  # - IP-CIDR,91.108.56.0/22,Proxy,no-resolve
  # - IP-CIDR,149.154.160.0/22,Proxy,no-resolve
  # - IP-CIDR,149.154.164.0/22,Proxy,no-resolve
  # - IP-CIDR,149.154.168.0/22,Proxy,no-resolve
  # - IP-CIDR,149.154.172.0/22,Proxy,no-resolve
  # - IP-CIDR,127.0.0.0/8,DIRECT
  # - IP-CIDR,172.16.0.0/12,DIRECT
  # - IP-CIDR,192.168.0.0/16,DIRECT
  # - IP-CIDR,10.0.0.0/8,DIRECT
  # - IP-CIDR,17.0.0.0/8,DIRECT
  # - IP-CIDR,100.64.0.0/10,DIRECT
  - DOMAIN,clash.razord.top,DIRECT
  - DOMAIN,yacd.haishan.me,DIRECT
  - DOMAIN-SUFFIX,local,DIRECT
  - RULE-SET,applications,DIRECT
  - RULE-SET,private,DIRECT
  - RULE-SET,reject,REJECT
  - RULE-SET,icloud,DIRECT
  - RULE-SET,apple,DIRECT
  - RULE-SET,google,Proxy
  - RULE-SET,proxy,Proxy
  - RULE-SET,direct,DIRECT
  - RULE-SET,lancidr,DIRECT
  - RULE-SET,cncidr,DIRECT
  - RULE-SET,telegramcidr,Proxy
  - GEOSITE,bilibili,DIRECT
  - GEOIP,LAN,DIRECT
  - GEOIP,CN,DIRECT
  - MATCH,Proxy
举报· 103 次点击
登录 注册 站外分享
快来抢沙发
0 条回复  
返回顶部