# 懒人配置分流优化版
# 基于懒人配置.conf 2025-02-26 / 2026-07-25 版本改造
# 分流模式参考 机场.yaml：每个 App 一个策略组，内置手动节点组 + 自动节点组 + PROXY + DIRECT
# 使用前请先导入节点订阅，并根据自己的订阅节点名称调整 policy-regex-filter 排除词。

[General]
# Shadowrocket 快速使用方法：
# 1、首页 > 添加节点。
# 2、设置 > 延迟测试方法，选择 CONNECT。
# 3、首页 > 连通性测试，选择可用节点连接。
# 首次启动会提示【安装 VPN 配置文件】，请点击【好】和【允许】才能正常使用。

# 跳过代理：强制这些域名或 IP 由 TUN 接口处理，用于解决部分 App 兼容性问题。
skip-proxy = 192.168.0.0/16,10.0.0.0/8,172.16.0.0/12,localhost,*.local,captive.apple.com,*.ccb.com,*.abchina.com.cn,*.psbc.com,www.baidu.com,www.163.com

# TUN 旁路路由。
tun-excluded-routes = 10.0.0.0/8, 127.0.0.0/8, 169.254.0.0/16, 172.16.0.0/12, 192.0.0.0/24, 192.0.2.0/24, 192.88.99.0/24, 192.168.0.0/16, 198.51.100.0/24, 203.0.113.0/24, 224.0.0.0/4, 255.255.255.255/32, 239.255.255.250/32, ff02::fb/128

# DNS 覆写：普通 DNS 或加密 DNS。
dns-server = https://doh.pub/dns-query,https://dns.alidns.com/dns-query,223.5.5.5,119.29.29.29

# 备用 DNS：覆写 DNS 失败或查询超过 2 秒时回退。
fallback-dns-server = system

# 启用 IPv6。
ipv6 = true
prefer-ipv6 = false

# 直连域名使用系统 DNS 查询。
dns-direct-system = false

# ping 数据包自动回复。
icmp-auto-reply = true

# 非配置模式下也执行重写的 REJECT 策略。
always-reject-url-rewrite = false

# 域名解析返回私有 IP 时，不强制走代理。
private-ip-answer = true

# 直连域名解析失败后回退代理。
dns-direct-fallback-proxy = true

# DNS 劫持：拦截硬编码 DNS 查询。
hijack-dns = 8.8.8.8:53,8.8.4.4:53

# UDP 流量匹配到不支持 UDP 的节点策略时的回退行为。
udp-policy-not-supported-behaviour = REJECT

# QUIC 屏蔽策略：只阻断走代理连接的 QUIC。
block-quic = all-proxy

[Proxy]
# 添加本地节点。该项目的节点解析是为了兼容部分配置文件，不能当作 Shadowrocket 添加节点的优先选择。

# Shadowsocks类型：
# 节点名称=ss,地址,端口,password=密码,其他参数(如method=aes-256-cfb,obfs=websocket,plugin=none)

# Vmess类型：
# 节点名称=vmess,地址,端口,password=密码,其他参数(如alterId=0,method=auto,obfs=websocket,tfo=1)

# VLESS类型：
# 节点名称=vless,地址,端口,password=密码,tls=true,其他参数(如obfs=websocket,peer=example.com)

# HTTP/HTTPS/Socks5/Socks5 Over TLS等类型：
# 节点名称=http,地址,端口,用户,密码
# 节点名称=https,地址,端口,用户,密码
# 节点名称=socks5,地址,端口,用户,密码
# 节点名称=socks5-tls,地址,端口,用户,密码,skip-common-name-verify=true

# Trojan类型：
# 节点名称=trojan,地址,端口,password=密码,其他参数(如allowInsecure=1,peer=example.com)

# Hysteria类型：
# 节点名称=hysteria,地址,端口,auth=密码,obfsParam=混淆,protocol=协议,udp=1,其他参数(如peer=example.com,alpn=h2,upmbps=100,downmbps=100)

# Hysteria2类型：
# 节点名称=hysteria2,地址,端口,auth=密码,obfsParam=混淆,udp=1,其他参数(如peer=example.com,alpn=h3)

# TUIC类型：
# 节点名称=tuic,地址,端口,password=密码,udp=1,其他参数(如user=uuid值,peer=example.com,alpn=h2)

# WireGuard类型：
# 节点名称=wireguard,地址,端口,privateKey=私钥,publicKey=公钥,ip=子网IP,udp=1,其他参数(如dns=1.1.1.1,mtu=1350,keepalive=40,reserved=1/2/3)

# Snell类型：
# 节点名称=snell,地址,端口,password=密码,udp=1,其他参数(如obfs=http,obfs-host=example.com,obfs-uri=/abc)

[Proxy Group]
# 代理分组类型：
# select:手动切换节点。
# url-test:自动切换延迟最低节点。
# fallback:节点挂掉时自动切换其他可用节点。
# load-balance:不同请求使用分组里的不同节点。
# random:随机使用分组里的不同节点。

# 统一结构说明：
# App = select,🎯 App-手动,♻️ App-自动,PROXY,DIRECT
# 🎯 App-手动：从全部订阅节点中手动固定选择。
# ♻️ App-自动：从全部订阅节点中自动测速选择最优。
# PROXY：跟随首页当前节点。
# DIRECT：直连。
# policy-regex-filter 为节点名称筛选正则，可按自己的订阅节点调整排除词。

AI = select,🎯 AI-手动,♻️ AI-自动,PROXY,DIRECT,policy-select-name=PROXY
🎯 AI-手动 = select,policy-regex-filter=^(?!(emby|公共|home)).*$
♻️ AI-自动 = url-test,url=http://www.gstatic.com/generate_204,interval=600,tolerance=0,timeout=5,policy-regex-filter=^(?!(emby|公共|home)).*$

YouTube = select,🎯 YouTube-手动,♻️ YouTube-自动,PROXY,DIRECT,policy-select-name=PROXY
🎯 YouTube-手动 = select,policy-regex-filter=^(?!(emby|公共|home)).*$
♻️ YouTube-自动 = url-test,url=http://www.gstatic.com/generate_204,interval=600,tolerance=0,timeout=5,policy-regex-filter=^(?!(emby|公共|home)).*$

Netflix = select,🎯 Netflix-手动,♻️ Netflix-自动,PROXY,DIRECT,policy-select-name=PROXY
🎯 Netflix-手动 = select,policy-regex-filter=^(?!(emby|公共|home)).*$
♻️ Netflix-自动 = url-test,url=http://www.gstatic.com/generate_204,interval=600,tolerance=0,timeout=5,policy-regex-filter=^(?!(emby|公共|home)).*$

Disney+ = select,🎯 Disney-手动,♻️ Disney-自动,PROXY,DIRECT,policy-select-name=PROXY
🎯 Disney-手动 = select,policy-regex-filter=^(?!(emby|公共|home)).*$
♻️ Disney-自动 = url-test,url=http://www.gstatic.com/generate_204,interval=600,tolerance=0,timeout=5,policy-regex-filter=^(?!(emby|公共|home)).*$

Max = select,🎯 Max-手动,♻️ Max-自动,PROXY,DIRECT,policy-select-name=PROXY
🎯 Max-手动 = select,policy-regex-filter=^(?!(emby|公共|home)).*$
♻️ Max-自动 = url-test,url=http://www.gstatic.com/generate_204,interval=600,tolerance=0,timeout=5,policy-regex-filter=^(?!(emby|公共|home)).*$

TikTok = select,🎯 TikTok-手动,♻️ TikTok-自动,PROXY,DIRECT,policy-select-name=PROXY
🎯 TikTok-手动 = select,policy-regex-filter=^(?!(emby|公共|home)).*$
♻️ TikTok-自动 = url-test,url=http://www.gstatic.com/generate_204,interval=600,tolerance=0,timeout=5,policy-regex-filter=^(?!(emby|公共|home)).*$

Spotify = select,🎯 Spotify-手动,♻️ Spotify-自动,PROXY,DIRECT,policy-select-name=DIRECT
🎯 Spotify-手动 = select,policy-regex-filter=^(?!(emby|公共|home)).*$
♻️ Spotify-自动 = url-test,url=http://www.gstatic.com/generate_204,interval=600,tolerance=0,timeout=5,policy-regex-filter=^(?!(emby|公共|home)).*$

Telegram = select,🎯 Telegram-手动,♻️ Telegram-自动,PROXY,DIRECT,policy-select-name=PROXY
🎯 Telegram-手动 = select,policy-regex-filter=^(?!(emby|公共|home)).*$
♻️ Telegram-自动 = url-test,url=http://www.gstatic.com/generate_204,interval=600,tolerance=0,timeout=5,policy-regex-filter=^(?!(emby|公共|home)).*$

Twitter = select,🎯 Twitter-手动,♻️ Twitter-自动,PROXY,DIRECT,policy-select-name=PROXY
🎯 Twitter-手动 = select,policy-regex-filter=^(?!(emby|公共|home)).*$
♻️ Twitter-自动 = url-test,url=http://www.gstatic.com/generate_204,interval=600,tolerance=0,timeout=5,policy-regex-filter=^(?!(emby|公共|home)).*$

Facebook = select,🎯 Facebook-手动,♻️ Facebook-自动,PROXY,DIRECT,policy-select-name=PROXY
🎯 Facebook-手动 = select,policy-regex-filter=^(?!(emby|公共|home)).*$
♻️ Facebook-自动 = url-test,url=http://www.gstatic.com/generate_204,interval=600,tolerance=0,timeout=5,policy-regex-filter=^(?!(emby|公共|home)).*$

PayPal = select,🎯 PayPal-手动,♻️ PayPal-自动,PROXY,DIRECT,policy-select-name=DIRECT
🎯 PayPal-手动 = select,policy-regex-filter=^(?!(emby|公共|home)).*$
♻️ PayPal-自动 = url-test,url=http://www.gstatic.com/generate_204,interval=600,tolerance=0,timeout=5,policy-regex-filter=^(?!(emby|公共|home)).*$

Amazon = select,🎯 Amazon-手动,♻️ Amazon-自动,PROXY,DIRECT,policy-select-name=DIRECT
🎯 Amazon-手动 = select,policy-regex-filter=^(?!(emby|公共|home)).*$
♻️ Amazon-自动 = url-test,url=http://www.gstatic.com/generate_204,interval=600,tolerance=0,timeout=5,policy-regex-filter=^(?!(emby|公共|home)).*$

GitHub = select,🎯 GitHub-手动,♻️ GitHub-自动,PROXY,DIRECT,policy-select-name=PROXY
🎯 GitHub-手动 = select,policy-regex-filter=^(?!(emby|公共|home)).*$
♻️ GitHub-自动 = url-test,url=http://www.gstatic.com/generate_204,interval=600,tolerance=0,timeout=5,policy-regex-filter=^(?!(emby|公共|home)).*$

谷歌服务 = select,🎯 谷歌服务-手动,♻️ 谷歌服务-自动,PROXY,DIRECT,policy-select-name=PROXY
🎯 谷歌服务-手动 = select,policy-regex-filter=^(?!(emby|公共|home)).*$
♻️ 谷歌服务-自动 = url-test,url=http://www.gstatic.com/generate_204,interval=600,tolerance=0,timeout=5,policy-regex-filter=^(?!(emby|公共|home)).*$

微软服务 = select,🎯 微软服务-手动,♻️ 微软服务-自动,PROXY,DIRECT,policy-select-name=DIRECT
🎯 微软服务-手动 = select,policy-regex-filter=^(?!(emby|公共|home)).*$
♻️ 微软服务-自动 = url-test,url=http://www.gstatic.com/generate_204,interval=600,tolerance=0,timeout=5,policy-regex-filter=^(?!(emby|公共|home)).*$

苹果服务 = select,🎯 苹果服务-手动,♻️ 苹果服务-自动,PROXY,DIRECT,policy-select-name=DIRECT
🎯 苹果服务-手动 = select,policy-regex-filter=^(?!(emby|公共|home)).*$
♻️ 苹果服务-自动 = url-test,url=http://www.gstatic.com/generate_204,interval=600,tolerance=0,timeout=5,policy-regex-filter=^(?!(emby|公共|home)).*$

哔哩哔哩 = select,🎯 哔哩哔哩-手动,♻️ 哔哩哔哩-自动,PROXY,DIRECT,policy-select-name=DIRECT
🎯 哔哩哔哩-手动 = select,policy-regex-filter=^(?!(emby|公共|home)).*$
♻️ 哔哩哔哩-自动 = url-test,url=http://www.gstatic.com/generate_204,interval=600,tolerance=0,timeout=5,policy-regex-filter=^(?!(emby|公共|home)).*$

游戏平台 = select,🎯 游戏平台-手动,♻️ 游戏平台-自动,PROXY,DIRECT,policy-select-name=PROXY
🎯 游戏平台-手动 = select,policy-regex-filter=^(?!(emby|公共|home)).*$
♻️ 游戏平台-自动 = url-test,url=http://www.gstatic.com/generate_204,interval=600,tolerance=0,timeout=5,policy-regex-filter=^(?!(emby|公共|home)).*$

# 自定义分流组（来自 机场.yaml，列表托管在 alist.tianzechen.fun）
PT站点 = select,🎯 PT站点-手动,♻️ PT站点-自动,PROXY,DIRECT,policy-select-name=DIRECT
🎯 PT站点-手动 = select,policy-regex-filter=^(?!(emby|公共|home)).*$
♻️ PT站点-自动 = url-test,url=http://www.gstatic.com/generate_204,interval=600,tolerance=0,timeout=5,policy-regex-filter=^(?!(emby|公共|home)).*$

Emby = select,🎯 Emby-手动,♻️ Emby-自动,PROXY,DIRECT,policy-select-name=PROXY
🎯 Emby-手动 = select,policy-regex-filter=^(?!(emby|公共|home|日本|JP|Japan)).*$
♻️ Emby-自动 = url-test,url=http://www.gstatic.com/generate_204,interval=600,tolerance=0,timeout=5,policy-regex-filter=^(?!(emby|公共|home|日本|JP|Japan)).*$

代理池 = select,🎯 代理池-手动,♻️ 代理池-自动,PROXY,DIRECT,policy-select-name=PROXY
🎯 代理池-手动 = select,policy-regex-filter=^(?!(emby|公共|home)).*$
♻️ 代理池-自动 = url-test,url=http://www.gstatic.com/generate_204,interval=600,tolerance=0,timeout=5,policy-regex-filter=^(?!(emby|公共|home)).*$

JAV = select,🎯 JAV-手动,♻️ JAV-自动,PROXY,DIRECT,policy-select-name=PROXY
🎯 JAV-手动 = select,policy-regex-filter=^(?!(emby|公共|home|日本|JP|Japan)).*$
♻️ JAV-自动 = url-test,url=http://www.gstatic.com/generate_204,interval=600,tolerance=0,timeout=5,policy-regex-filter=^(?!(emby|公共|home|日本|JP|Japan)).*$

DMM = select,🎯 DMM-手动,♻️ DMM-自动,PROXY,DIRECT,policy-select-name=PROXY
🎯 DMM-手动 = select,policy-regex-filter=🇯🇵|JP|Japan|日本|东京|大阪
♻️ DMM-自动 = url-test,url=http://www.gstatic.com/generate_204,interval=600,tolerance=0,timeout=5,policy-regex-filter=🇯🇵|JP|Japan|日本|东京|大阪

节点选择 = select,🎯 节点选择-手动,♻️ 节点选择-自动,PROXY,DIRECT,policy-select-name=PROXY
🎯 节点选择-手动 = select,policy-regex-filter=^(?!(emby|公共|home)).*$
♻️ 节点选择-自动 = url-test,url=http://www.gstatic.com/generate_204,interval=600,tolerance=0,timeout=5,policy-regex-filter=^(?!(emby|公共|home)).*$

[Rule]
# 规则从上到下依次匹配，命中后停止。
# 国外常用服务：AI、YouTube、Netflix、Disney+、Max、Spotify、Telegram、PayPal、Twitter、Facebook、Google、TikTok、GitHub、游戏平台等。
# 国内常用服务：苹果服务、微软服务、哔哩哔哩、网易云音乐、百度、豆瓣、微信、抖音、新浪、知乎、小红书等。

# 自定义分流规则集（来自 机场.yaml）
RULE-SET,https://alist.tianzechen.fun:61443/d/jkj/direct_share/list/direct.list,DIRECT
RULE-SET,https://alist.tianzechen.fun:61443/d/jkj/direct_share/list/node-select.list,节点选择
RULE-SET,https://alist.tianzechen.fun:61443/d/jkj/direct_share/list/dmm-dedicated.list,DMM
RULE-SET,https://alist.tianzechen.fun:61443/d/jkj/direct_share/list/jav-dedicated.list,JAV
RULE-SET,https://alist.tianzechen.fun:61443/d/jkj/direct_share/list/emby-dedicated.list,Emby
RULE-SET,https://alist.tianzechen.fun:61443/d/jkj/direct_share/list/pt.list,PT站点
RULE-SET,https://alist.tianzechen.fun:61443/d/jkj/direct_share/list/proxy-pool.list,代理池

# AI
RULE-SET,https://raw.githubusercontent.com/iab0x00/ProxyRules/main/Rule/AI.txt,AI

RULE-SET,https://raw.githubusercontent.com/blackmatrix7/ios_rule_script/master/rule/Shadowrocket/YouTube/YouTube.list,YouTube
RULE-SET,https://raw.githubusercontent.com/blackmatrix7/ios_rule_script/master/rule/Shadowrocket/Netflix/Netflix.list,Netflix
RULE-SET,https://raw.githubusercontent.com/blackmatrix7/ios_rule_script/master/rule/Shadowrocket/Disney/Disney.list,Disney+
DOMAIN-SUFFIX,litix.io,Max
DOMAIN-SUFFIX,discomax.com,Max
DOMAIN-SUFFIX,brightline.tv,Max
RULE-SET,https://raw.githubusercontent.com/blackmatrix7/ios_rule_script/master/rule/Shadowrocket/HBO/HBO.list,Max
RULE-SET,https://raw.githubusercontent.com/blackmatrix7/ios_rule_script/master/rule/Shadowrocket/Spotify/Spotify.list,Spotify
RULE-SET,https://raw.githubusercontent.com/blackmatrix7/ios_rule_script/master/rule/Shadowrocket/Telegram/Telegram.list,Telegram
RULE-SET,https://raw.githubusercontent.com/blackmatrix7/ios_rule_script/master/rule/Shadowrocket/PayPal/PayPal.list,PayPal
RULE-SET,https://raw.githubusercontent.com/blackmatrix7/ios_rule_script/master/rule/Shadowrocket/Twitter/Twitter.list,Twitter
RULE-SET,https://raw.githubusercontent.com/blackmatrix7/ios_rule_script/master/rule/Shadowrocket/Facebook/Facebook.list,Facebook
RULE-SET,https://raw.githubusercontent.com/blackmatrix7/ios_rule_script/master/rule/Shadowrocket/Amazon/Amazon.list,Amazon
RULE-SET,https://raw.githubusercontent.com/blackmatrix7/ios_rule_script/master/rule/Shadowrocket/GitHub/GitHub.list,GitHub

# 游戏平台
RULE-SET,https://raw.githubusercontent.com/blackmatrix7/ios_rule_script/master/rule/Shadowrocket/Sony/Sony.list,游戏平台
RULE-SET,https://raw.githubusercontent.com/blackmatrix7/ios_rule_script/master/rule/Shadowrocket/Nintendo/Nintendo.list,游戏平台
RULE-SET,https://raw.githubusercontent.com/blackmatrix7/ios_rule_script/master/rule/Shadowrocket/Epic/Epic.list,游戏平台
RULE-SET,https://raw.githubusercontent.com/blackmatrix7/ios_rule_script/master/rule/Shadowrocket/SteamCN/SteamCN.list,游戏平台
RULE-SET,https://raw.githubusercontent.com/blackmatrix7/ios_rule_script/master/rule/Shadowrocket/Steam/Steam.list,游戏平台
RULE-SET,https://raw.githubusercontent.com/blackmatrix7/ios_rule_script/master/rule/Shadowrocket/Game/Game.list,游戏平台

# 微软、谷歌、苹果等系统服务
RULE-SET,https://raw.githubusercontent.com/blackmatrix7/ios_rule_script/master/rule/Shadowrocket/Microsoft/Microsoft.list,微软服务
RULE-SET,https://raw.githubusercontent.com/blackmatrix7/ios_rule_script/master/rule/Shadowrocket/Google/Google.list,谷歌服务
RULE-SET,https://raw.githubusercontent.com/blackmatrix7/ios_rule_script/master/rule/QuantumultX/Apple/Apple.list,苹果服务

# 国内服务直连
RULE-SET,https://raw.githubusercontent.com/blackmatrix7/ios_rule_script/master/rule/Shadowrocket/BiliBili/BiliBili.list,哔哩哔哩
RULE-SET,https://raw.githubusercontent.com/blackmatrix7/ios_rule_script/master/rule/Shadowrocket/NetEaseMusic/NetEaseMusic.list,DIRECT
RULE-SET,https://raw.githubusercontent.com/blackmatrix7/ios_rule_script/master/rule/Shadowrocket/Baidu/Baidu.list,DIRECT
RULE-SET,https://raw.githubusercontent.com/blackmatrix7/ios_rule_script/master/rule/Shadowrocket/DouBan/DouBan.list,DIRECT
RULE-SET,https://raw.githubusercontent.com/blackmatrix7/ios_rule_script/master/rule/QuantumultX/WeChat/WeChat.list,DIRECT
RULE-SET,https://raw.githubusercontent.com/blackmatrix7/ios_rule_script/master/rule/Shadowrocket/Sina/Sina.list,DIRECT
RULE-SET,https://raw.githubusercontent.com/blackmatrix7/ios_rule_script/master/rule/Shadowrocket/Zhihu/Zhihu.list,DIRECT
RULE-SET,https://raw.githubusercontent.com/blackmatrix7/ios_rule_script/master/rule/Shadowrocket/XiaoHongShu/XiaoHongShu.list,DIRECT
RULE-SET,https://raw.githubusercontent.com/blackmatrix7/ios_rule_script/master/rule/Shadowrocket/DouYin/DouYin.list,DIRECT
RULE-SET,https://raw.githubusercontent.com/blackmatrix7/ios_rule_script/master/rule/Shadowrocket/TikTok/TikTok.list,TikTok

# 全局与国内兜底
RULE-SET,https://raw.githubusercontent.com/blackmatrix7/ios_rule_script/master/rule/QuantumultX/Global/Global.list,PROXY
RULE-SET,https://raw.githubusercontent.com/blackmatrix7/ios_rule_script/master/rule/QuantumultX/China/China.list,DIRECT

# 局域网规则集
RULE-SET,https://raw.githubusercontent.com/blackmatrix7/ios_rule_script/master/rule/Shadowrocket/Lan/Lan.list,DIRECT

# CN 地区 IP 直连
GEOIP,CN,DIRECT

# 兜底策略
FINAL,PROXY

[Host]
# 域名指定本地值：
# example.com = 1.2.3.4
# 域名指定 DNS 服务器：
# example.com = server:1.2.3.4

*.apple.com = server:system
*.icloud.com = server:system
localhost = 127.0.0.1

[URL Rewrite]
# Google 搜索防跳转
^https?://(www.)?g.cn https://www.google.com 302
^https?://(www.)?google.cn https://www.google.com 302

[MITM]
# HTTPS 解密域名列表，仅解密指定 hostname。
hostname = *.google.cn
