123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258 |
- # HTTP 代理端口
- port: 7890
- # SOCKS5 代理端口
- socks-port: 7891
- # Linux 和 macOS 的 redir 代理端口
- redir-port: 7892
- mixed-port: 7893
- # 允许局域网的连接
- allow-lan: true
- # 规则模式:Rule(规则) / Global(全局代理)/ Direct(全局直连)
- # mode: rule
- mode: Rule
- # 设置日志输出级别 (默认级别:silent,即不输出任何内容,以避免因日志内容过大而导致程序内存溢出)。
- # 5 个级别:silent / info / warning / error / debug。级别越高日志输出量越大,越倾向于调试,若需要请自行开启。
- log-level: debug
- # Clash 的 RESTful API
- external-controller: "127.0.0.1:9090"
- # RESTful API 的口令
- secret: ""
- # 您可以将静态网页资源(如 clash-dashboard)放置在一个目录中,clash 将会服务于 `RESTful API/ui`
- # 参数应填写配置目录的相对路径或绝对路径。
- # external-ui: folder
- # DNS 设置
- dns:
- nameserver:
- - 114.114.114.114
- - 119.29.29.29
- - https://doh.pub/dns-query
- - https://dns.alidns.com/dns-query
- fallback:
- - https://dns.cloudflare.com/dns-query
- - "[2001:da8::666]:53"
- - https://public.dns.iij.jp/dns-query
- - https://jp.tiar.app/dns-query
- - https://jp.tiarap.org/dns-query
- - tls://dot.tiar.app
- enable: true
- ipv6: false
- # enhanced-mode: redir-host
- enhanced-mode: fake-ip
- fake-ip-range: 198.18.0.1/16
- listen: 0.0.0.0:53
- fake-ip-filter:
- - "*.lan"
- default-nameserver:
- - 114.114.114.114
- - 119.29.29.29
- - "[2001:da8::666]:53"
- tun:
- enable: false
- stack: system
- # stack: gvisor
- dns-hijack:
- - 198.18.0.2:53 # when `fake-ip-range` is 198.18.0.1/16, should hijack 198.18.0.2:53
- auto-route: true # auto set global route for Windows
- # It is recommended to use `interface-name`
- auto-detect-interface: true # auto detect interface, conflict with `interface-name`
- # 服务器节点订阅
- # proxy-providers:
- # sspool:
- # type: http
- # url: "xxx"
- # interval: 3600
- # path: ./proxy/sspool.yaml
- # health-check:
- # enable: true
- # interval: 600
- # url: http://www.gstatic.com/generate_204
- # proxies:
- # - name: "proxie"
- # type: vmess
- # server: xxx
- # port: 8080
- # uuid: xxx
- # alterId: 1
- # cipher: auto
- # udp: true
- # tls: false
- # network: ws
- # ws-opts:
- # path: /y831
- proxy-groups:
- - name: proxy
- type: select
- proxies:
- - REJECT
- - DIRECT
- rule-providers:
- # name: # Provider 名称
- # type: http # http 或 file
- # behavior: classical # 或 ipcidr、domain
- # path: # 文件路径
- # url: # 只有当类型为 HTTP 时才可用,您不需要在本地空间中创建新文件。
- # interval: # 自动更新间隔,仅在类型为 HTTP 时可用
- # reject:
- # type: http
- # behavior: domain
- # url: "https://ghproxy.com/https://raw.githubusercontent.com/Loyalsoldier/clash-rules/release/reject.txt"
- # path: ./ruleset/reject.yaml
- # interval: 86400
- # icloud:
- # type: http
- # behavior: domain
- # url: "https://ghproxy.com/https://raw.githubusercontent.com/Loyalsoldier/clash-rules/release/icloud.txt"
- # path: ./ruleset/icloud.yaml
- # interval: 86400
- # apple:
- # type: http
- # behavior: domain
- # url: "https://ghproxy.com/https://raw.githubusercontent.com/Loyalsoldier/clash-rules/release/apple.txt"
- # path: ./ruleset/apple.yaml
- # interval: 86400
- # google:
- # type: http
- # behavior: domain
- # url: "https://ghproxy.com/https://raw.githubusercontent.com/Loyalsoldier/clash-rules/release/google.txt"
- # path: ./ruleset/google.yaml
- # interval: 86400
- # direct:
- # type: http
- # behavior: domain
- # url: "https://ghproxy.com/https://raw.githubusercontent.com/Loyalsoldier/clash-rules/release/direct.txt"
- # path: ./ruleset/direct.yaml
- # interval: 86400
- # private:
- # type: http
- # behavior: domain
- # url: "https://ghproxy.com/https://raw.githubusercontent.com/Loyalsoldier/clash-rules/release/private.txt"
- # path: ./ruleset/private.yaml
- # interval: 86400
- # gfw:
- # type: http
- # behavior: domain
- # url: "https://ghproxy.com/https://raw.githubusercontent.com/Loyalsoldier/clash-rules/release/gfw.txt"
- # path: ./ruleset/gfw.yaml
- # interval: 86400
- # greatfire:
- # type: http
- # behavior: domain
- # url: "https://ghproxy.com/https://raw.githubusercontent.com/Loyalsoldier/clash-rules/release/greatfire.txt"
- # path: ./ruleset/greatfire.yaml
- # interval: 86400
- # lancidr:
- # type: http
- # behavior: ipcidr
- # url: "https://ghproxy.com/https://raw.githubusercontent.com/Loyalsoldier/clash-rules/release/lancidr.txt"
- # path: ./ruleset/lancidr.yaml
- # interval: 86400
- # china:
- # type: http
- # behavior: classical
- # url: "https://ghproxy.com/https://raw.githubusercontent.com/DivineEngine/Profiles/master/Clash/RuleSet/China.yaml"
- # path: ./ruleset/china.yaml
- # interval: 86400
- # streamingcn:
- # type: http
- # behavior: classical
- # url: "https://ghproxy.com/https://raw.githubusercontent.com/DivineEngine/Profiles/master/Clash/RuleSet/StreamingMedia/StreamingCN.yaml"
- # path: ./ruleset/streamingcn.yaml
- # interval: 86400
- # streaming:
- # type: http
- # behavior: classical
- # url: "https://ghproxy.com/https://raw.githubusercontent.com/DivineEngine/Profiles/master/Clash/RuleSet/StreamingMedia/Streaming.yaml"
- # path: ./ruleset/streaming.yaml
- # interval: 86400
- # telegram:
- # type: http
- # behavior: classical
- # url: "https://ghproxy.com/https://raw.githubusercontent.com/DivineEngine/Profiles/master/Clash/RuleSet/Extra/Telegram/Telegram.yaml"
- # path: ./ruleset/telegram.yaml
- # interval: 86400
- # privacy:
- # type: http
- # behavior: classical
- # url: "https://ghproxy.com/https://raw.githubusercontent.com/DivineEngine/Profiles/master/Clash/RuleSet/Guard/Privacy.yaml"
- # path: ./ruleset/hijacking.yaml
- # interval: 86400
- # hijacking:
- # type: http
- # behavior: classical
- # url: "https://ghproxy.com/https://raw.githubusercontent.com/DivineEngine/Profiles/master/Clash/RuleSet/Guard/Hijacking.yaml"
- # path: ./ruleset/hijacking.yaml
- # interval: 86400
- # 规则
- # rules:
- # Unbreak
- # - PROCESS-NAME,China,DIRECT
- # - PROCESS-NAME,google,DIRECT
- # - RULE-SET,"🎯 全球直连",DIRECT
- # - RULE-SET,China,DIRECT
- # - RULE-SET,google,DIRECT
- # - MATCH,MATCH
- # - GEOIP,CN,DIRECT
- rules:
- # - DOMAIN,pub.dev,🌎 国外网站
- # - DOMAIN,translate.googleapis.com,🌎 国外网站
- # # https://github.com/Dreamacro/clash/issues/1663#issuecomment-1075815348
- # - DOMAIN-SUFFIX,msftconnecttest.com,🌎 国外网站
- # - RULE-SET,private,DIRECT
- # - RULE-SET,lancidr,DIRECT,no-resolve
- # - RULE-SET,applications,DIRECT
- # - RULE-SET,reject,🛑 广告拦截
- # - RULE-SET,privacy,🛑 隐私保护
- # - RULE-SET,hijacking,🛑 网络劫持
- # - RULE-SET,icloud,🍎 苹果服务
- # - RULE-SET,apple,🍎 苹果服务
- # - RULE-SET,china,🌏 国内网站
- # - RULE-SET,streamingcn,🌏 国内网站
- # - GEOIP,CN,🌏 国内网站
- # - RULE-SET,google,🎯 全球直连
- # - RULE-SET,direct,🎯 全球直连
- # - RULE-SET,telegram,📲 电报信息
- # - RULE-SET,gfw,🌎 国外网站
- # - RULE-SET,proxy,🌎 国外网站
- # - RULE-SET,greatfire,🌎 国外网站
- # - RULE-SET,streaming,🌎 国外网站
- - MATCH,proxy
|