feat: add clash configuration files for socks5 and tproxy modes

This commit is contained in:
SunBK201 2025-11-02 13:34:26 +08:00
parent 4e595e7f87
commit 5e6f05ba4f
6 changed files with 294 additions and 22 deletions

View File

@ -117,15 +117,15 @@ rules:
```
> [!IMPORTANT]
> 如果使用 Fake-IP 模式,确保 OpenClash 本地 DNS 劫持选择「使用防火墙转发」不要使用「Dnsmasq 转发」。
> 如果 Clash 使用 Fake-IP 模式,确保 OpenClash 本地 DNS 劫持选择「使用防火墙转发」不要使用「Dnsmasq 转发」。
### Clash 参考配置
提供 3 个参考配置:
1. 国内版,无需进行任何修改,可直接使用 [ua3f-cn.yaml](https://cdn.jsdelivr.net/gh/SunBK201/UA3F@master/clash/ua3f-cn.yaml) (Clash 需要选用 Meta 内核。)
2. 国际版,针对有特定需求的特殊用户进行适配,[ua3f-global.yaml](https://cdn.jsdelivr.net/gh/SunBK201/UA3F@master/clash/ua3f-global.yaml),注意需要在 proxy-providers > Global-ISP > url 中(第 23 行)加入你的代理节点订阅链接。(Clash 需要选用 Meta 内核。)
3. 国际版(增强),针对流量特征检测 (DPI) 进行规则补充,注意该配置会对 QQ、微信等平台的流量进行分流代理因此需要根据自己的需求谨慎选择该配置[ua3f-global-enhance.yaml](https://cdn.jsdelivr.net/gh/SunBK201/UA3F@master/clash/ua3f-global-enhance.yaml),注意需要在 proxy-providers > Global-ISP > url 中(第 23 行)加入你的代理节点订阅链接。(Clash 需要选用 Meta 内核。)
1. 国内版,无需进行任何修改,可直接使用 [ua3f-socks5-cn.yaml](https://cdn.jsdelivr.net/gh/SunBK201/UA3F@master/clash/ua3f-socks5-cn.yaml) (Clash 需要选用 Meta 内核。)
2. 国际版,针对有特定需求的特殊用户进行适配,[ua3f-socks5-global.yaml](https://cdn.jsdelivr.net/gh/SunBK201/UA3F@master/clash/ua3f-socks5-global.yaml),注意需要在 proxy-providers > Global-ISP > url 中(第 23 行)加入你的代理节点订阅链接。(Clash 需要选用 Meta 内核。)
3. 国际版(增强),针对流量特征检测 (DPI) 进行规则补充,注意该配置会对 QQ、微信等平台的流量进行分流代理因此需要根据自己的需求谨慎选择该配置[ua3f-socks5-global-dpi.yaml](https://cdn.jsdelivr.net/gh/SunBK201/UA3F@master/clash/ua3f-socks5-global-dpi.yaml),注意需要在 proxy-providers > Global-ISP > url 中(第 18 行)加入你的代理节点订阅链接。(Clash 需要选用 Meta 内核。)
## Extra

View File

@ -20,7 +20,7 @@ proxies:
proxy-providers:
Global-ISP:
type: http
url: ""
url: "" # 👈 Please set your proxy URL here
interval: 3600
path: "./Proxy-Providers/Global-ISP.yaml"
health-check:
@ -126,8 +126,6 @@ rules:
- DOMAIN,speed.cloudflare.com,CN
- DOMAIN-SUFFIX,test-ipv6.com,CN
- DOMAIN-SUFFIX,httpbin.org,CN
# Unbreak
- RULE-SET,Unbreak,CN
# Apple
- RULE-SET,Apple,CN
# Microsoft
@ -181,12 +179,6 @@ rules:
- MATCH,Switch
#--------------------------------------------------------------------------------------#
rule-providers:
Unbreak:
type: http
behavior: classical
path: ./RuleSet/Unbreak.yaml
url: https://cdn.jsdelivr.net/gh/DivineEngine/Profiles@master/Clash/RuleSet/Unbreak.yaml
interval: 86400
Apple:
type: http
behavior: classical

View File

@ -20,7 +20,7 @@ proxies:
proxy-providers:
Global-ISP:
type: http
url: ""
url: "" # 👈 Please set your proxy URL here
interval: 3600
path: "./Proxy-Providers/Global-ISP.yaml"
health-check:
@ -120,8 +120,6 @@ rules:
- DOMAIN,speed.cloudflare.com,CN
- DOMAIN-SUFFIX,test-ipv6.com,CN
- DOMAIN-SUFFIX,httpbin.org,CN
# Unbreak
- RULE-SET,Unbreak,CN
# Apple
- RULE-SET,Apple,CN
# Microsoft
@ -175,12 +173,6 @@ rules:
- MATCH,Switch
#--------------------------------------------------------------------------------------#
rule-providers:
Unbreak:
type: http
behavior: classical
path: ./RuleSet/Unbreak.yaml
url: https://cdn.jsdelivr.net/gh/DivineEngine/Profiles@master/Clash/RuleSet/Unbreak.yaml
interval: 86400
Apple:
type: http
behavior: classical

View File

@ -0,0 +1,37 @@
#--------------------------------------------------------------------------------------#
# Written by SunBK201
# https://github.com/SunBK201/UA3F
#--------------------------------------------------------------------------------------#
mixed-port: 7890
ipv6: false
mode: rule
proxies:
#--------------------------------------------------------------------------------------#
proxy-providers:
Global-ISP:
type: http
url: "" # 👈 Please set your proxy URL here
interval: 3600
path: "./Proxy-Providers/Global-ISP.yaml"
health-check:
enable: true
interval: 600
url: http://1.1.1.1/generate_204
#--------------------------------------------------------------------------------------#
proxy-groups:
- name: "Proxy"
type: select
use:
- Global-ISP
url: http://1.1.1.1/generate_204
interval: 300
#--------------------------------------------------------------------------------------#
rules:
# Tencent
- DOMAIN-KEYWORD,wx,Proxy
- DOMAIN-KEYWORD,qq,Proxy
- DOMAIN-KEYWORD,weixin,Proxy
- DOMAIN-KEYWORD,wechat,Proxy
- DOMAIN-KEYWORD,tencent,Proxy
- NETWORK,udp,DIRECT
- MATCH,DIRECT

View File

@ -0,0 +1,251 @@
---
#--------------------------------------------------------------------------------------#
# Written by SunBK201
# https://github.com/SunBK201/UA3F
#--------------------------------------------------------------------------------------#
mixed-port: 7890
#--------------------------------------------------------------------------------------#
ipv6: false
mode: rule
#--------------------------------------------------------------------------------------#
dns:
#--------------------------------------------------------------------------------------#
proxies:
#--------------------------------------------------------------------------------------#
proxy-providers:
Global-ISP:
type: http
url: "" # 👈 Please set your proxy URL here
interval: 3600
path: "./Proxy-Providers/Global-ISP.yaml"
health-check:
enable: true
interval: 600
url: http://1.1.1.1/generate_204
#--------------------------------------------------------------------------------------#
proxy-groups:
- name: "Switch"
type: select
proxies:
- Fallback
- Global-ISP
url: http://1.1.1.1/generate_204
interval: 300
- name: "Fallback"
type: fallback
proxies:
- HongKong
- Taiwan
- Singapore
- Japan
- USA
- Global-ISP
url: http://1.1.1.1/generate_204
interval: 300
- name: "Global-ISP"
type: select
use:
- Global-ISP
url: http://1.1.1.1/generate_204
interval: 300
- name: "CN"
type: select
proxies:
- DIRECT
url: http://connectivitycheck.platform.hicloud.com/generate_204
interval: 300
- name: "Netflix"
type: select
proxies:
- HongKong
- Taiwan
- Singapore
- Japan
- USA
url: http://1.1.1.1/generate_204
interval: 300
- name: "Bahamut"
type: select
proxies:
- HongKong
- Taiwan
- Singapore
- Japan
- USA
url: http://1.1.1.1/generate_204
interval: 300
- name: "HongKong"
type: select
filter: "^(?!.*?(Premium)).*(香港|Hong Kong|HK)"
use:
- Global-ISP
url: http://1.1.1.1/generate_204
interval: 300
- name: "Taiwan"
type: select
filter: "^(?!.*?(Premium)).*(台湾|Taiwan|TW)"
use:
- Global-ISP
url: http://1.1.1.1/generate_204
interval: 300
- name: "Singapore"
type: select
filter: "^(?!.*?(Premium)).*(新加坡|Singapore|SG)"
use:
- Global-ISP
url: http://1.1.1.1/generate_204
interval: 300
- name: "Japan"
type: select
filter: "^(?!.*?(Premium)).*(日本|Japan|JP)"
use:
- Global-ISP
url: http://1.1.1.1/generate_204
interval: 300
- name: "USA"
type: select
filter: "^(?!.*?(Premium)).*(美国|USA|US)"
use:
- Global-ISP
url: http://1.1.1.1/generate_204
interval: 300
#--------------------------------------------------------------------------------------#
rules:
# Tencent
- DOMAIN-KEYWORD,wx,Switch
- DOMAIN-KEYWORD,qq,Switch
- DOMAIN-KEYWORD,weixin,Switch
- DOMAIN-KEYWORD,wechat,Switch
- DOMAIN-KEYWORD,tencent,Switch
# Personal Define
- DOMAIN,speed.cloudflare.com,CN
- DOMAIN-SUFFIX,test-ipv6.com,CN
- DOMAIN-SUFFIX,httpbin.org,CN
# Apple
- RULE-SET,Apple,CN
# Microsoft
- RULE-SET,Microsoft,CN
# Nintendo
- RULE-SET,Nintendo,Switch
# Notion
- DOMAIN,http-inputs-notion.splunkcloud.com,Switch
- RULE-SET,Notion,Switch
# Steam
- DOMAIN-SUFFIX,steamcommunity.com,Switch
- DOMAIN,avatars.akamai.steamstatic.com,Switch
- DOMAIN,api.steampowered.com,Switch
- DOMAIN,store.steampowered.com,Switch
- RULE-SET,SteamCN,CN
# Telegram
- RULE-SET,Telegram,Switch
# Spotify
- DOMAIN,open.spotify.com,Switch
- DOMAIN-SUFFIX,akamaized.net,CN
- DOMAIN-SUFFIX,spotify.com,CN
- DOMAIN-SUFFIX,spotifycdn.com,CN
- DOMAIN-SUFFIX,scdn.co,CN
- DOMAIN-SUFFIX,branch.io,CN
- RULE-SET,Spotify,CN
# Streaming
- DOMAIN,anime1.me,Switch
- DOMAIN-SUFFIX,anime1.me,CN
- RULE-SET,Netflix,Netflix
- RULE-SET,Bahamut,Bahamut
- RULE-SET,Streaming,Switch
# Global Domain
- DOMAIN-SUFFIX,imap.gmail.com,Switch # Gmail
- DOMAIN-SUFFIX,smtp.gmail.com,Switch # Gmail
# China Domain
- DOMAIN-SUFFIX,ua.233996.xyz,CN
- DOMAIN-SUFFIX,httpbin.org,CN
- DOMAIN-SUFFIX,ghproxy.com,CN
# Global SET
- RULE-SET,Global,Switch
# China SET
- RULE-SET,China,CN
#---!---DNS-Resolve---!--- #
#---!---DNS-Resolve---!--- #
#---!---DNS-Resolve---!--- #
# GeoIP China
- GEOIP,CN,CN
# Local Area Network
- GEOIP,LAN,DIRECT
# FINAL
- MATCH,Switch
#--------------------------------------------------------------------------------------#
rule-providers:
Apple:
type: http
behavior: classical
path: ./RuleSet/Apple.yaml
url: https://cdn.jsdelivr.net/gh/blackmatrix7/ios_rule_script@master/rule/Clash/Apple/Apple.yaml
interval: 86400
Microsoft:
type: http
behavior: classical
path: ./RuleSet/Microsoft.yaml
url: https://cdn.jsdelivr.net/gh/blackmatrix7/ios_rule_script@master/rule/Clash/Microsoft/Microsoft.yaml
interval: 86400
Nintendo:
type: http
behavior: classical
path: ./RuleSet/Nintendo.yaml
url: https://cdn.jsdelivr.net/gh/blackmatrix7/ios_rule_script@master/rule/Clash/Nintendo/Nintendo.yaml
interval: 86400
Notion:
type: http
behavior: classical
path: ./RuleSet/Notion.yaml
url: https://cdn.jsdelivr.net/gh/blackmatrix7/ios_rule_script@master/rule/Clash/Notion/Notion.yaml
interval: 86400
SteamCN:
type: http
behavior: classical
path: ./RuleSet/SteamCN.yaml
url: https://cdn.jsdelivr.net/gh/blackmatrix7/ios_rule_script@master/rule/Clash/SteamCN/SteamCN.yaml
interval: 86400
Telegram:
type: http
behavior: classical
path: ./RuleSet/Telegram.yaml
url: https://cdn.jsdelivr.net/gh/blackmatrix7/ios_rule_script@master/rule/Clash/Telegram/Telegram.yaml
interval: 86400
Spotify:
type: http
behavior: classical
path: ./RuleSet/Spotify.yaml
url: https://cdn.jsdelivr.net/gh/blackmatrix7/ios_rule_script@master/rule/Clash/Spotify/Spotify.yaml
interval: 86400
Netflix:
type: http
behavior: classical
path: ./RuleSet/Netflix.yaml
url: https://cdn.jsdelivr.net/gh/blackmatrix7/ios_rule_script@master/rule/Clash/Netflix/Netflix.yaml
interval: 86400
Bahamut:
type: http
behavior: classical
path: ./RuleSet/Bahamut.yaml
url: https://cdn.jsdelivr.net/gh/blackmatrix7/ios_rule_script@master/rule/Clash/Bahamut/Bahamut.yaml
interval: 86400
Streaming:
type: http
behavior: domain
path: ./RuleSet/Streaming.yaml
url: https://cdn.jsdelivr.net/gh/blackmatrix7/ios_rule_script@master/rule/Clash/GlobalMedia/GlobalMedia_Domain.yaml
interval: 86400
Global:
type: http
behavior: domain
path: ./RuleSet/Global.yaml
url: https://cdn.jsdelivr.net/gh/blackmatrix7/ios_rule_script@master/rule/Clash/Global/Global_Domain.yaml
interval: 86400
China:
type: http
behavior: domain
path: ./RuleSet/China.yaml
url: https://cdn.jsdelivr.net/gh/blackmatrix7/ios_rule_script@master/rule/Clash/China/China_Domain.yaml
interval: 86400
#--------------------------------------------------------------------------------------#
parsers:
#--------------------------------------------------------------------------------------#