Loyalsoldier / clash-rules

🦄️ 🎃 👻 Clash Premium 规则集(RULE-SET),兼容 ClashX Pro、Clash for Windows 等基于 Clash Premium 内核的客户端。
GNU General Public License v3.0
19.05k stars 1.69k forks source link

无法切换配置文件 #122

Closed iwyang closed 2 years ago

iwyang commented 2 years ago

Kmw7s.png 请问,这是什么问题呀

iwyang commented 2 years ago
port: 7890
socks-port: 7891
allow-lan: true
bind-address: "*"
mode: rule
log-level: silent
external-controller: 127.0.0.1:9090
hosts: null
dns:
  enable: true
  listen: 0.0.0.0:53
  ipv6: true
  default-nameserver:
    - 223.5.5.5
    - 114.114.114.114
  enhanced-mode: fake-ip
  fake-ip-range: 198.18.0.1/16
  fake-ip-filter:
    - "*.lan"
    - "*.localdomain"
    - "*.example"
    - "*.invalid"
    - "*.localhost"
    - "*.test"
    - "*.local"
    - "*.home.arpa"
    - time.*.com
    - time.*.gov
    - time.*.edu.cn
    - time.*.apple.com
    - time1.*.com
    - time2.*.com
    - time3.*.com
    - time4.*.com
    - time5.*.com
    - time6.*.com
    - time7.*.com
    - ntp.*.com
    - ntp1.*.com
    - ntp2.*.com
    - ntp3.*.com
    - ntp4.*.com
    - ntp5.*.com
    - ntp6.*.com
    - ntp7.*.com
    - "*.time.edu.cn"
    - "*.ntp.org.cn"
    - +.pool.ntp.org
    - time1.cloud.tencent.com
    - music.163.com
    - "*.music.163.com"
    - "*.126.net"
    - musicapi.taihe.com
    - music.taihe.com
    - songsearch.kugou.com
    - trackercdn.kugou.com
    - "*.kuwo.cn"
    - api-jooxtt.sanook.com
    - api.joox.com
    - joox.com
    - y.qq.com
    - "*.y.qq.com"
    - streamoc.music.tc.qq.com
    - mobileoc.music.tc.qq.com
    - isure.stream.qqmusic.qq.com
    - dl.stream.qqmusic.qq.com
    - aqqmusic.tc.qq.com
    - amobile.music.tc.qq.com
    - "*.xiami.com"
    - "*.music.migu.cn"
    - music.migu.cn
    - "*.msftconnecttest.com"
    - "*.msftncsi.com"
    - msftconnecttest.com
    - msftncsi.com
    - localhost.ptlogin2.qq.com
    - localhost.sec.qq.com
    - +.srv.nintendo.net
    - +.stun.playstation.net
    - xbox.*.microsoft.com
    - xnotify.xboxlive.com
    - +.battlenet.com.cn
    - +.wotgame.cn
    - +.wggames.cn
    - +.wowsgame.cn
    - +.wargaming.net
    - proxy.golang.org
    - stun.*.*
    - stun.*.*.*
    - +.stun.*.*
    - +.stun.*.*.*
    - +.stun.*.*.*.*
    - heartbeat.belkin.com
    - "*.linksys.com"
    - "*.linksyssmartwifi.com"
    - "*.router.asus.com"
    - mesu.apple.com
    - swscan.apple.com
    - swquery.apple.com
    - swdownload.apple.com
    - swcdn.apple.com
    - swdist.apple.com
    - lens.l.google.com
    - stun.l.google.com
    - +.nflxvideo.net
    - "*.square-enix.com"
    - "*.finalfantasyxiv.com"
    - "*.ffxiv.com"
    - "*.mcdn.bilivideo.cn"
  nameserver:
    - https://doh.pub/dns-query
    - https://dns.alidns.com/dns-query
  fallback-filter:
    geoip: false
    ipcidr:
      - 0.0.0.0/8
      - 10.0.0.0/8
      - 100.64.0.0/10
      - 127.0.0.0/8
      - 169.254.0.0/16
      - 172.16.0.0/12
      - 192.0.0.0/24
      - 192.0.2.0/24
      - 192.88.99.0/24
      - 192.168.0.0/16
      - 198.18.0.0/15
      - 198.51.100.0/24
      - 203.0.113.0/24
      - 224.0.0.0/4
      - 240.0.0.0/4
      - 255.255.255.255/32
    domain:
      - +.google.com
      - +.facebook.com
      - +.youtube.com
      - +.githubusercontent.com
      - +.googlevideo.com
tun:
  enable: false
  stack: system
  macOS-auto-route: true
  macOS-auto-detect-interface: true
  dns-hijack:
    - tcp://8.8.8.8:53
    - tcp://8.8.4.4:53
proxies:
  - name: trojan
    type: trojan
    server: 
    port: 443
    password: 
proxy-groups:
  - name: relay
    type: relay
    proxies: []
  - name: auto
    type: url-test
    proxies:
      - vmess1
    url: http://www.gstatic.com/generate_204
    interval: 300
  - name: fallback-auto
    type: fallback
    proxies:
      - vmess1
    url: http://www.gstatic.com/generate_204
    interval: 300
  - name: load-balance
    type: load-balance
    proxies:
      - vmess1
    url: http://www.gstatic.com/generate_204
    interval: 300
  - name: Proxy
    type: select
    proxies:
      - vmess1
      - auto
  - name: UseProvider
    type: select
    use:
      - provider1
    proxies:
      - Proxy
      - DIRECT
proxy-providers:
  provider1:
    type: http
    url: url
    interval: 3600
    path: ./provider1.yaml
    health-check:
      enable: true
      interval: 600
      url: http://www.gstatic.com/generate_204
  test:
    type: file
    path: /test.yaml
    health-check:
      enable: true
      interval: 36000
      url: http://www.gstatic.com/generate_204
rule-providers:
  apple-proxy:
    type: http
    behavior: classical
    url: https://cdn.jsdelivr.net/gh/Hackl0us/SS-Rule-Snippet@master/Rulesets/Clash/Basic/Apple-proxy.yaml
    path: ./ruleset/Apple-proxy.yaml
    interval: 3600
  apple-direct:
    type: http
    behavior: classical
    url: https://cdn.jsdelivr.net/gh/Hackl0us/SS-Rule-Snippet@master/Rulesets/Clash/Basic/Apple-direct.yaml
    path: ./ruleset/Apple-direct.yaml
    interval: 3600
  cn:
    type: http
    behavior: classical
    url: https://cdn.jsdelivr.net/gh/Hackl0us/SS-Rule-Snippet@master/Rulesets/Clash/Basic/CN.yaml
    path: ./ruleset/CN.yaml
    interval: 3600
  ad-keyword:
    type: http
    behavior: classical
    url: https://cdn.jsdelivr.net/gh/Hackl0us/SS-Rule-Snippet@master/Rulesets/Clash/Basic/common-ad-keyword.yaml
    path: ./ruleset/common-ad-keyword.yaml
    interval: 3600
  foreign:
    type: http
    behavior: classical
    url: https://cdn.jsdelivr.net/gh/Hackl0us/SS-Rule-Snippet@master/Rulesets/Clash/Basic/foreign.yaml
    path: ./ruleset/foreign.yaml
    interval: 3600
  telegram:
    type: http
    behavior: classical
    url: https://cdn.jsdelivr.net/gh/Hackl0us/SS-Rule-Snippet@master/Rulesets/Clash/App/social/Telegram.yaml
    path: ./ruleset/Telegram.yaml
    interval: 3600
  lan:
    type: http
    behavior: classical
    url: https://cdn.jsdelivr.net/gh/Hackl0us/SS-Rule-Snippet@master/Rulesets/Clash/Basic/LAN.yaml
    path: ./ruleset/LAN.yaml
    interval: 3600
rules:
  - RULE-SET,apple-proxy,Proxy
  - RULE-SET,apple-direct,DIRECT
  - RULE-SET,cn,DIRECT
  - RULE-SET,ad-keyword,REJECT
  - RULE-SET,foreign,Proxy
  - RULE-SET,telegram,Proxy
  - RULE-SET,lan,DIRECT
  - GEOIP,CN,DIRECT
  - MATCH,Proxy
Loyalsoldier commented 2 years ago
proxy-providers:
  provider1:
    type: http
    url: url
    interval: 3600
    path: ./provider1.yaml
    health-check:
      enable: true
      interval: 600
      url: http://www.gstatic.com/generate_204

url 要改成代理节点的订阅地址

iwyang commented 2 years ago
proxy-providers:
  provider1:
    type: http
    url: url
    interval: 3600
    path: ./provider1.yaml
    health-check:
      enable: true
      interval: 600
      url: http://www.gstatic.com/generate_204

url 要改成代理节点的订阅地址

自建代理填什么的

Loyalsoldier commented 2 years ago

不要猜,看文档。

https://github.com/Dreamacro/clash/wiki/Clash-Premium-Features

https://lancellc.gitbook.io/clash/