背景是:软路由( R5S )装了 iStore 做主路由,用 OpenClash 分流。
手搓配置文件陆续折腾了一周,分流大部分正常了,为 Steam 下载直连写了附件规则,但用手机连家里网连访问微信朋友圈、小红书和淘宝都转圈圈,时好时坏(大部分时间访问困难),外网都正常,看日志微信、小红书、淘宝也都正常分流直连了,今天看到有淘宝的 CDN 超时记录,如何解决呢:(
2024-10-15 14:54:51 level=warning msg="[TCP] dial DIRECT (match GeoSite/CN) 192.168.100.167:50325 --> tmge.alicdn.com:443 error: dial tcp 169.254.254.254:443: i/o timeout"
global-ua: clash.meta
global-client-fingerprint: chrome
mixed-port: 7893
tproxy-port: 7895
allow-lan: true
mode: rule
log-level: info
ipv6: false
unified-delay: true
tcp-concurrent: true
find-process-mode: strict
keep-alive-interval: 3600
profile:
store-selected: true
store-fake-ip: true
geodata-mode: true
geodata-loader: standard
geo-auto-update: true
geo-update-interval: 168
geox-url:
geoip: https://hub.gitmirror.com/https://github.com/MetaCubeX/meta-rules-dat/releases/download/latest/geoip.dat
geosite: https://hub.gitmirror.com/https://github.com/MetaCubeX/meta-rules-dat/releases/download/latest/geosite.dat
mmdb: https://hub.gitmirror.com/https://github.com/MetaCubeX/meta-rules-dat/releases/download/latest/country.mmdb
asn: https://hub.gitmirror.com/https://github.com/MetaCubeX/meta-rules-dat/releases/download/latest/GeoLite2-ASN.mmdb
dns:
enable: true
listen: 0.0.0.0:7874
ipv6: false
prefer-h3: true
enhanced-mode: fake-ip
fake-ip-range: 198.18.0.1/16
fake-ip-filter:
- "*.lan"
- "*.local"
nameserver:
- 223.5.5.5
-
119.29.29.29
nameserver-policy:
geosite:cn,private,steam,apple:
- 223.5.5.5
- 119.29.29.29
geosite:geolocation-!cn:
- 8.8.8.8
-
1.1.1.1
ntp:
enable: true
write-to-system: false
server: time.apple.com
port: 123
interval: 120
sniffer:
enable: true
sniff:
TLS:
ports:
- 443
- 8443
HTTP:
ports:
- 80
- 8080-8880
override-destination: true
pr:
type: select
proxies: &3
- "\U0001F7E2 Auto Select"
- "⚪️ Node Selection"
- "\U0001F1ED\U0001F1F0 HongKong"
- "\U0001F1E8\U0001F1F3 Taiwan"
- "\U0001F1FA\U0001F1F2 USA"
- "\U0001F1EF\U0001F1F5 Japan"
- "\U0001F1F8\U0001F1EC Singapore"
- "\U0001F1F0\U0001F1F7 Korea"
- "\U0001F310 All Nodes"
- DIRECT
p:
type: http
interval: 86400
health-check: &1
enable: true
url: http://www.gstatic.com/generate_204
interval: 3600
timeout: 1500
tolerance: 10
proxy-providers:
ZL:
type: http
interval: 86400
health-check: *1
url: *************:)
proxy: DIRECT
use:
type: select
use: &2
- ZL
common-rule:
behavior: classical
interval: 259200
type: http
proxy: "\U0001F7E2 Auto Select"
rule-providers:
OPENAI:
behavior: classical
interval: 259200
type: http
proxy: "\U0001F7E2 Auto Select"
path: "./rule_provider/OPENAI.yaml"
url: https://raw.githubusercontent.com/blackmatrix7/ios_rule_script/refs/heads/master/rule/Clash/OpenAI/OpenAI.yaml
GEMINI:
behavior: classical
interval: 259200
type: http
proxy: "\U0001F7E2 Auto Select"
path: "./rule_provider/GEMINI.yaml"
url: https://raw.githubusercontent.com/blackmatrix7/ios_rule_script/refs/heads/master/rule/Clash/Gemini/Gemini.yaml
COPILOT:
behavior: classical
interval: 259200
type: http
proxy: "\U0001F7E2 Auto Select"
path: "./rule_provider/COPILOT.yaml"
url: https://raw.githubusercontent.com/blackmatrix7/ios_rule_script/refs/heads/master/rule/Clash/Copilot/Copilot.yaml
APPLE:
behavior: classical
interval: 259200
type: http
proxy: "\U0001F7E2 Auto Select"
path: "./rule_provider/APPLE.yaml"
url: https://raw.githubusercontent.com/blackmatrix7/ios_rule_script/refs/heads/master/rule/Clash/Apple/Apple.yaml
MICROSOFT:
behavior: classical
interval: 259200
type: http
proxy: "\U0001F7E2 Auto Select"
path: "./rule_provider/MICROSOFT.yaml"
url: https://raw.githubusercontent.com/blackmatrix7/ios_rule_script/refs/heads/master/rule/Clash/Microsoft/Microsoft.yaml
GOOGLE:
behavior: classical
interval: 259200
type: http
proxy: "\U0001F7E2 Auto Select"
path: "./rule_provider/GOOGLE.yaml"
url: https://raw.githubusercontent.com/blackmatrix7/ios_rule_script/refs/heads/master/rule/Clash/Google/Google.yaml
YOUTUBE:
behavior: classical
interval: 259200
type: http
proxy: "\U0001F7E2 Auto Select"
path: "./rule_provider/YOUTUBE.yaml"
url: https://raw.githubusercontent.com/blackmatrix7/ios_rule_script/refs/heads/master/rule/Clash/YouTube/YouTube.yaml
SPOTIFY:
behavior: classical
interval: 259200
type: http
proxy: "\U0001F7E2 Auto Select"
path: "./rule_provider/SPOTIFY.yaml"
url: https://raw.githubusercontent.com/blackmatrix7/ios_rule_script/refs/heads/master/rule/Clash/Spotify/Spotify.yaml
TIKTOK:
behavior: classical
interval: 259200
type: http
proxy: "\U0001F7E2 Auto Select"
path: "./rule_provider/TIKTOK.yaml"
url: https://raw.githubusercontent.com/blackmatrix7/ios_rule_script/refs/heads/master/rule/Clash/TikTok/TikTok.yaml
NETFLIX:
behavior: classical
interval: 259200
type: http
proxy: "\U0001F7E2 Auto Select"
path: "./rule_provider/NETFLIX.yaml"
url: https://raw.githubusercontent.com/blackmatrix7/ios_rule_script/refs/heads/master/rule/Clash/Netflix/Netflix.yaml
EA:
behavior: classical
interval: 259200
type: http
proxy: "\U0001F7E2 Auto Select"
path: "./rule_provider/EA.yaml"
url: https://raw.githubusercontent.com/blackmatrix7/ios_rule_script/refs/heads/master/rule/Clash/EA/EA.yaml
STEAM:
behavior: classical
interval: 259200
type: http
proxy: "\U0001F7E2 Auto Select"
path: "./rule_provider/STEAM.yaml"
url: https://raw.githubusercontent.com/blackmatrix7/ios_rule_script/refs/heads/master/rule/Clash/Steam/Steam.yaml
EPIC:
behavior: classical
interval: 259200
type: http
proxy: "\U0001F7E2 Auto Select"
path: "./rule_provider/EPIC.yaml"
url: https://raw.githubusercontent.com/blackmatrix7/ios_rule_script/refs/heads/master/rule/Clash/Epic/Epic.yaml
UBI:
behavior: classical
interval: 259200
type: http
proxy: "\U0001F7E2 Auto Select"
path: "./rule_provider/UBI.yaml"
url: https://raw.githubusercontent.com/blackmatrix7/ios_rule_script/refs/heads/master/rule/Clash/UBI/UBI.yaml
TELEGRAM:
behavior: classical
interval: 259200
type: http
proxy: "\U0001F7E2 Auto Select"
path: "./rule_provider/TELEGRAM.yaml"
url: https://raw.githubusercontent.com/blackmatrix7/ios_rule_script/refs/heads/master/rule/Clash/Telegram/Telegram.yaml
TWITTER:
behavior: classical
interval: 259200
type: http
proxy: "\U0001F7E2 Auto Select"
path: "./rule_provider/TWITTER.yaml"
url: https://raw.githubusercontent.com/blackmatrix7/ios_rule_script/refs/heads/master/rule/Clash/Twitter/Twitter.yaml
WECHAT:
behavior: classical
interval: 259200
type: http
proxy: "\U0001F7E2 Auto Select"
path: "./rule_provider/WECHAT.yaml"
url: https://raw.githubusercontent.com/blackmatrix7/ios_rule_script/refs/heads/master/rule/Clash/WeChat/WeChat.yaml
XIAOHONGSHU:
behavior: classical
interval: 259200
type: http
proxy: "\U0001F7E2 Auto Select"
path: "./rule_provider/XIAOHONGSHU.yaml"
url: https://raw.githubusercontent.com/blackmatrix7/ios_rule_script/refs/heads/master/rule/Clash/XiaoHongShu/XiaoHongShu.yaml
LAN:
behavior: classical
interval: 259200
type: http
proxy: "\U0001F7E2 Auto Select"
path: "./rule_provider/LAN.yaml"
url: https://raw.githubusercontent.com/blackmatrix7/ios_rule_script/refs/heads/master/rule/Clash/Lan/Lan.yaml
GLOBALCLASSICAL:
behavior: classical
interval: 259200
type: http
proxy: "\U0001F7E2 Auto Select"
path: "./rule_provider/GLOBALCLASSICAL.yaml"
url: https://raw.githubusercontent.com/blackmatrix7/ios_rule_script/refs/heads/master/rule/Clash/Global/Global_Classical.yaml
proxy-groups:
- name: "\U0001F7E2 Auto Select"
type: url-test
use: *2
tolerance: 10
-
name: "⚪️ Node Selection"
type: select
proxies:
- "\U0001F7E2 Auto Select"
- "\U0001F1ED\U0001F1F0 HongKong"
- "\U0001F1E8\U0001F1F3 Taiwan"
- "\U0001F1FA\U0001F1F2 USA"
- "\U0001F1EF\U0001F1F5 Japan"
- "\U0001F1F8\U0001F1EC Singapore"
- "\U0001F1F0\U0001F1F7 Korea"
- "\U0001F310 All Nodes"
- DIRECT
- name: "\U0001F916 AI"
type: url-test
use: 2
tolerance: 10
filter: "(?i)^(?!.(HK|Hong|hong|香港|深港|沪港|京港|港)).*(GPT|gpt)"
- name: "\U0001F34F Apple"
type: select
proxies: *3
- name: Ⓜ️ Microsoft
type: select
proxies: *3
- name: "\U0001F369 Google"
type: select
proxies: *3
- name: "\U0001F39E️ International Media"
type: select
proxies: *3
- name: "\U0001F39E️ Netflix"
type: url-test
use: *2
tolerance: 10
filter: "(?i)Netflix|netflix|奈飞"
- name: "\U0001F4F1 Social Platforms"
type: select
proxies: *3
- name: "\U0001F3AE Game"
type: select
proxies: *3
- name: "\U0001F40B Unclassified Traffic"
type: select
proxies: *3
- name: "\U0001F1ED\U0001F1F0 HongKong"
type: url-test
use: *2
tolerance: 10
filter: "(?i)HK|Hong|hong|香港|深港|沪港|京港|港"
- name: "\U0001F1E8\U0001F1F3 Taiwan"
type: url-test
use: *2
tolerance: 10
filter: "(?i)TW|Taiwan|taiwan|台湾|台北|台中|新北|彰化"
- name: "\U0001F1FA\U0001F1F2 USA"
type: url-test
use: *2
tolerance: 10
filter: "(?i)US|USA|America|america|United States|美国|凤凰城|洛杉矶|西雅图|芝加哥|纽约|沪美|美"
- name: "\U0001F1EF\U0001F1F5 Japan"
type: url-test
use: *2
tolerance: 10
filter: "(?i)JP|Japan|japan|Tokyo|tokyo|日本|东京|大阪|京日|苏日|沪日|上日|川日|深日|广日"
- name: "\U0001F1F8\U0001F1EC Singapore"
type: url-test
use: *2
tolerance: 10
filter: "(?i)SG|Sing|sing|新加坡|狮城|沪新|京新|深新|杭新|广新"
- name: "\U0001F1F0\U0001F1F7 Korea"
type: url-test
use: *2
tolerance: 10
filter: "(?i)KR|Korea|korea|KOR|韩国|首尔|韩|韓|春川"
- name: "\U0001F310 All Nodes"
type: select
use: *2
rules:
- DST-PORT,7895,REJECT
- DST-PORT,7892,REJECT
- IP-CIDR,198.18.0.1/16,REJECT,no-resolve
- DOMAIN-SUFFIX,steamcontent.com,DIRECT
- DOMAIN-SUFFIX,steamserver.net,DIRECT
- DOMAIN-SUFFIX,content.steampowered.com,DIRECT
- DOMAIN-SUFFIX,content1.steampowered.com,DIRECT
- DOMAIN-SUFFIX,content2.steampowered.com,DIRECT
- DOMAIN-SUFFIX,content3.steampowered.com,DIRECT
- DOMAIN-SUFFIX,content4.steampowered.com,DIRECT
- DOMAIN-SUFFIX,content5.steampowered.com,DIRECT
- DOMAIN-SUFFIX,content6.steampowered.com,DIRECT
- DOMAIN-SUFFIX,content7.steampowered.com,DIRECT
- DOMAIN-SUFFIX,content8.steampowered.com,DIRECT
- DOMAIN-SUFFIX,content-origin.steampowered.com,DIRECT
- DOMAIN-SUFFIX,steam.apac.qtlglb.com,DIRECT
- DOMAIN-SUFFIX,steam.eca.qtlglb.com,DIRECT
- DOMAIN-SUFFIX,steam.naeu.qtlglb.com,DIRECT
- DOMAIN-SUFFIX,steam.ru.qtlglb.com,DIRECT
- DOMAIN-SUFFIX,edge.steam-dns.top.comcast.net,DIRECT
- DOMAIN-SUFFIX,steampipe.akamaized.net,DIRECT
- DOMAIN-SUFFIX,steampipe-kr.akamaized.net,DIRECT
- DOMAIN-SUFFIX,steampipe-partner.akamaized.net,DIRECT
- GEOIP,CN,DIRECT
- GEOSITE,CN,DIRECT
- RULE-SET,LAN,DIRECT
- RULE-SET,WECHAT,DIRECT
- RULE-SET,XIAOHONGSHU,DIRECT
- "RULE-SET,OPENAI,\U0001F916 AI"
- "RULE-SET,GEMINI,\U0001F916 AI"
- "RULE-SET,COPILOT,\U0001F916 AI"
- "RULE-SET,APPLE,\U0001F34F Apple"
- RULE-SET,MICROSOFT,Ⓜ️ Microsoft
- "RULE-SET,GOOGLE,\U0001F369 Google"
- "RULE-SET,YOUTUBE,\U0001F39E️ International Media"
- "RULE-SET,SPOTIFY,\U0001F39E️ International Media"
- "RULE-SET,TIKTOK,\U0001F39E️ International Media"
- "RULE-SET,NETFLIX,\U0001F39E️ Netflix"
- "RULE-SET,TELEGRAM,\U0001F4F1 Social Platforms"
- "RULE-SET,TWITTER,\U0001F4F1 Social Platforms"
- "RULE-SET,EA,\U0001F3AE Game"
- "RULE-SET,STEAM,\U0001F3AE Game"
- "RULE-SET,EPIC,\U0001F3AE Game"
- "RULE-SET,UBI,\U0001F3AE Game"
- "RULE-SET,GLOBALCLASSICAL,\U0001F40B Unclassified Traffic"
"MATCH,\U0001F40B Unclassified Traffic"
redir-port: 7892
port: 7890
socks-port: 7891
external-controller: 0.0.0.0:9090
secret: '********'
bind-address: "*"
external-ui: "/usr/share/openclash/ui"
tun:
enable: true
stack: mixed
device: utun
dns-hijack:
tcp://any:53
gso: true
gso-max-size: 65536
auto-route: false
auto-detect-interface: false
auto-redirect: false
strict-route: false
1
Damow 29 天前
我直接用鸡场的 Clash 文件,需要单独添加规则的,可以在覆写里面自定义规则。
|