diff --git a/README.md b/README.md index fc00572..e9196a7 100644 --- a/README.md +++ b/README.md @@ -99,11 +99,12 @@ rules: 请不要将从 [Release](https://github.com/SunBK201/UA3F/releases) 下载解压得到的 `ua3f` 二进制文件修改名称, 如需修改,则需要在 `PROCESS-NAME,ua3f,DIRECT` 中修改相应的名称。 -### Clash 懒人配置 +### Clash 参考配置 -提供 2 个参考配置: +提供 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 中(第 76 行)加入你的代理节点订阅链接。(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. 国际版(增强),针对流量特征检测进行规则补充,注意该配置会对 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 内核。) ## Roadmap diff --git a/clash/ua3f-cn.yaml b/clash/ua3f-cn.yaml index 4f3d322..c688100 100644 --- a/clash/ua3f-cn.yaml +++ b/clash/ua3f-cn.yaml @@ -1,4 +1,3 @@ ---- #--------------------------------------------------------------------------------------# # Written by SunBK201 # https://github.com/SunBK201/UA3F diff --git a/clash/ua3f-global-enhance.yaml b/clash/ua3f-global-enhance.yaml new file mode 100644 index 0000000..8a5cb91 --- /dev/null +++ b/clash/ua3f-global-enhance.yaml @@ -0,0 +1,264 @@ +#--------------------------------------------------------------------------------------# +# Written by SunBK201 +# https://github.com/SunBK201/UA3F +#--------------------------------------------------------------------------------------# +mixed-port: 7890 +#--------------------------------------------------------------------------------------# +ipv6: false +mode: rule +#--------------------------------------------------------------------------------------# +dns: +#--------------------------------------------------------------------------------------# +proxies: + - name: "ua3f" + type: socks5 + server: 127.0.0.1 + port: 1080 + url: http://connectivitycheck.platform.hicloud.com/generate_204 + udp: false +#--------------------------------------------------------------------------------------# +proxy-providers: + Global-ISP: + type: http + url: "" + 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: + - ua3f + 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 + # Unbreak + - RULE-SET,Unbreak,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: + 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 + 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: +#--------------------------------------------------------------------------------------# diff --git a/clash/ua3f-global.yaml b/clash/ua3f-global.yaml index f223fda..1736388 100644 --- a/clash/ua3f-global.yaml +++ b/clash/ua3f-global.yaml @@ -2,65 +2,12 @@ # Written by SunBK201 # https://github.com/SunBK201/UA3F #--------------------------------------------------------------------------------------# -# Port of HTTP(S) proxy server on the local end -port: 7890 -# Port of SOCKS5 proxy server on the local end -socks-port: 7891 -# HTTP(S) and SOCKS4(A)/SOCKS5 server on the same port -# mixed-port: 7890 +mixed-port: 7890 #--------------------------------------------------------------------------------------# -# Transparent proxy server port for Linux and macOS (Redirect TCP and TProxy UDP) -redir-port: 7892 -# Transparent proxy server port for Linux (TProxy TCP and TProxy UDP) -# tproxy-port: 7893 -#--------------------------------------------------------------------------------------# -# Set to true to allow connections to the local-end server from -# other LAN IP addresses -allow-lan: false -# This is only applicable when `allow-lan` is `true` -# '*': bind all IP addresses -# 192.168.122.11: bind a single IPv4 address -# "[aaaa::a8aa:ff:fe09:57d8]": bind a single IPv6 address -bind-address: "*" -#--------------------------------------------------------------------------------------# -# Clash by default prints logs to STDOUT -# info / warning / error / debug / silent -log-level: info -# RESTful web API listening address -external-controller: 127.0.0.1:9090 -#--------------------------------------------------------------------------------------# -# When set to false, resolver won't translate hostnames to IPv6 addresses ipv6: false -# Clash router working mode -# rule: rule-based packet routing -# global: all packets will be forwarded to a single endpoint -# direct: directly forward the packets to the Internet mode: rule -# [Meta Feature] -tcp-concurrent: true #--------------------------------------------------------------------------------------# -# DNS server settings -# This section is optional. When not present, the DNS server will be disabled. dns: - enable: true - listen: 0.0.0.0:53 - ipv6: false # when the false, response to AAAA questions will be empty - # These nameservers are used to resolve the DNS nameserver hostnames below. - # Specify IP addresses only - default-nameserver: - - 114.114.114.114 - - 8.8.8.8 - enhanced-mode: fake-ip # or redir-host (not recommended) - fake-ip-range: 198.18.0.1/16 # Fake IP addresses pool CIDR - fake-ip-filter: - - "*.lan" - - "*.local" - - "*.msftconnecttest.com" - nameserver: - - dhcp://en0 # dns from dhcp - # - 223.5.5.5 - # - 114.114.114.114 - # - https://1.1.1.1/dns-query # DNS over HTTPS #--------------------------------------------------------------------------------------# proxies: - name: "ua3f"