|
# Transparent proxy server port for Linux (TProxy TCP and TProxy UDP) |
|
tproxy-port: 7893 |
|
|
|
# 允许局域网的连接(可用来共享代理) |
|
allow-lan: true |
|
|
|
# 规则模式:Rule(规则) / Global(全局代理)/ Direct(全局直连) |
|
mode: Rule |
|
|
|
# 设置日志输出级别 (默认级别:info,级别越高日志输出量越大,越倾向于调试) |
|
# 四个级别:silent / info / warning / error / debug |
|
log-level: info |
|
|
|
# When set to false, resolver won't translate hostnames to IPv6 addresses |
|
ipv6: true |
|
|
|
# Clash 的 RESTful API |
|
external-controller: 0.0.0.0:9090 |
|
|
|
# you can put the static web resource (such as clash-dashboard) to a directory, and clash would serve in `${API}/ui` |
|
# input is a relative path to the configuration directory or an absolute path |
|
#external-ui: dashboard |
|
|
|
# Secret for RESTful API (Optional) |
|
#secret: "" |
|
|
|
# experimental feature |
|
experimental: |
|
ignore-resolve-fail: true # ignore dns reslove fail, default value is true |
|
|
|
dns: |
|
enable: true |
|
listen: 0.0.0.0:53 |
|
ipv6: false |
|
enhanced-mode: fake-ip |
|
fake-ip-range: 198.18.0.1/16 |
|
fake-ip-filter: # fake ip white domain list |
|
- '*.lan' |
|
- localhost.ptlogin2.qq.com |
|
default-nameserver: |
|
- 101.6.6.6 |
|
- 166.111.8.29 |
|
nameserver: |
|
- 101.6.6.6 |
|
- 166.111.8.29 |
|
fallback: |
|
- https://101.6.6.6/dns-query |
|
- https://dns.alidns.com/dns-query |
|
|
|
tun: |
|
enable: false |
|
macOS-auto-route: true |
|
macOS-auto-detect-interface: true |
|
|
|
# 代理节点 |
|
proxies: |
|
- { name: 'HKG-01', type: trojan, server: hkg01.example.com, port: 443, password: password01, sni: hkg01.example.com, udp: true} |
|
- { name: "HKG-02", type: trojan, server: hkg02.example.com, port: 443, password: password02, sni: hkg02.example.com, udp: true} |
|
|
|
# 代理组策略 |
|
proxy-groups: |
|
- { name: "Proxy", type: select, proxies: ["HKG"] } |
|
- { name: "HKG", type: fallback, proxies: ["HKG-01", "HKG-02"], url: "http://www.msftconnecttest.com/connecttest.txt", interval: 300 } |
|
|
|
rule-providers: |
|
# name: # Provider 名称 |
|
# type: http # http 或 file |
|
# behavior: classical # 或 ipcidr、domain |
|
# path: # 文件路径 |
|
# url: # 只有当类型为 HTTP 时才可用,您不需要在本地空间中创建新文件。 |
|
# interval: # 自动更新间隔,仅在类型为 HTTP 时可用 |
|
Scholar: |
|
type: http |
|
behavior: classical |
|
path: ./RuleSet/Extra/Scholar.yaml |
|
url: https://raw.fastgit.org/DivineEngine/Profiles/master/Clash/RuleSet/Extra/Scholar.yaml |
|
interval: 86400 |
|
|
|
PayPal: |
|
type: http |
|
behavior: classical |
|
path: ./RuleSet/Extra/Paypal.yaml |
|
url: https://raw.fastgit.org/DivineEngine/Profiles/master/Clash/RuleSet/Extra/PayPal.yaml |
|
interval: 86400 |
|
|
|
Streaming: |
|
type: http |
|
behavior: classical |
|
path: ./RuleSet/StreamingMedia/Streaming.yaml |
|
url: https://raw.fastgit.org/DivineEngine/Profiles/master/Clash/RuleSet/StreamingMedia/Streaming.yaml |
|
interval: 86400 |
|
|
|
Global: |
|
type: http |
|
behavior: classical |
|
path: ./RuleSet/Global.yaml |
|
url: https://raw.fastgit.org/DivineEngine/Profiles/master/Clash/RuleSet/Global.yaml |
|
interval: 86400 |
|
|
|
China: |
|
type: http |
|
behavior: classical |
|
path: ./RuleSet/China.yaml |
|
url: https://raw.fastgit.org/DivineEngine/Profiles/master/Clash/RuleSet/China.yaml |
|
interval: 86400 |
|
|
|
ChinaIP: |
|
type: http |
|
behavior: ipcidr |
|
path: ./RuleSet/Extra/ChinaIP.yaml |
|
url: https://raw.fastgit.org/DivineEngine/Profiles/master/Clash/RuleSet/Extra/ChinaIP.yaml |
|
interval: 86400 |
|
|
|
# 规则 |
|
rules: |
|
# 不同于 Surge,后面要用到的策略组要放到前面 |
|
# Global Area Network |
|
# (Paypal) |
|
- RULE-SET,PayPal,DIRECT |
|
# (edu.tw Domain) |
|
- DOMAIN-SUFFIX,edu.tw,DIRECT |
|
# (Outlook) |
|
- DOMAIN-SUFFIX,hotmail.com,Proxy |
|
- DOMAIN-SUFFIX,outlook.com,Proxy |
|
- DOMAIN,outlook.office365.com,Proxy |
|
- DOMAIN,smtp.office365.com,Proxy |
|
# (Streaming Media) |
|
- RULE-SET,Streaming,Proxy |
|
# (DNS Cache Pollution) / (IP Blackhole) / (Region-Restricted Access Denied) / (Network Jitter) |
|
- RULE-SET,Global,Proxy |
|
# (Academic) |
|
- RULE-SET,Scholar,DIRECT |
|
|
|
# China Area Network |
|
- RULE-SET,China,DIRECT |
|
|
|
# Local Area Network |
|
- IP-CIDR,192.168.0.0/16,DIRECT |
|
- IP-CIDR,10.0.0.0/8,DIRECT |
|
- IP-CIDR,172.16.0.0/12,DIRECT |
|
- IP-CIDR,127.0.0.0/8,DIRECT |
|
- IP-CIDR,100.64.0.0/10,DIRECT |
|
- IP-CIDR,224.0.0.0/4,DIRECT |
|
|
|
# China IP |
|
- RULE-SET,ChinaIP,DIRECT |
|
# Tencent |
|
#- IP-CIDR,119.28.28.28/32,DIRECT |
|
#- IP-CIDR,182.254.116.0/24,DIRECT |
|
# GeoIP China |
|
#- GEOIP,CN,DIRECT |
|
|
|
- MATCH,Proxy |