目标是:在小鸡上生成一个节点,这个节点是已经套了 warp 作为落地。对于客户端把谷歌系的规则分流到这个节点上,从而把小鸡“拉回去”所在地区。
以我 JP 小鸡为例,warp 出来的就是 JP 东京区,因为近,所以速度上感觉比我用美西伪家宽作为落地会快很多(当然,线路也有关系)。
结果是:Google 搜索、YoutubeMusic 、Gemini 都正常了。
这里主要提供思路,可以结合 AI 去生成更加详细的安装教程。
-
首先参考这个帖子搭建好 warp,得到一个 socks 节点。
自行 AI ,直接命令行安装即可,很简单的。 -
以 singbox 为例,为你节点添加路由。我是新增了两个节点专门接 warp。
- uuid :
sing-box generate uuid - reality 私钥:
sing-box generate reality-keypair - short_id:
sing-box generate rand --hex 8 - hy2 证书:可以用 acme 生成,自行查询
{
"log": {
"level": "info",
"timestamp": true
},
"inbounds": [
{
"tag": "v-in-warp",
"type": "vless",
"listen": "::",
# 自己定端口,记得防火墙开端口
"listen_port": 28444,
"users": [
{
"uuid": "自己生成uuid",
"flow": "xtls-rprx-vision"
}
],
"tls": {
"enabled": true,
"server_name": "伪装域名",
"reality": {
"enabled": true,
"handshake": {
"server": "伪装域名",
"server_port": 443
},
"private_key": "自己生成",
"short_id": [
"自己生成"
]
}
}
},
{
"tag": "hy2-in-warp",
"type": "hysteria2",
"listen": "::",
# 自己定端口,记得防火墙开端口
"listen_port": 38444,
"users": [
{
"password": "自己生成"
}
],
"tls": {
"enabled": true,
"alpn": [
"h3"
],
"certificate_path": "自己生成 /opt/acme/cert.pem",
"key_path": "自己生成 /opt/acme/privkey.key"
}
}
],
"outbounds": [
{
"type": "direct",
"tag": "direct"
},
{
"type": "block",
"tag": "block"
},
{
"type": "socks",
"tag": "warp-out",
"server": "127.0.0.1",
# 按实际 warp 的端口
"server_port": 40000
}
],
"route": {
"rules": [
{
"inbound": [
"v-in-warp",
"hy2-in-warp"
],
"outbound": "warp-out"
}
]
}
}
- 在客户端分流,这里以 mihomo 为例:
# 策略
proxy-groups:
- {name: YouTubeMusic, type: select, proxies: [..自己的节点..], icon: https://raw.githubusercontent.com/Orz-3/mini/master/Color/Clubhouse.png}
- {name: 谷歌系, type: select, proxies: [..自己的节点..], icon: https://raw.githubusercontent.com/Orz-3/mini/master/Color/Google.png}
# 订阅规则
rule-providers:
YouTubeMusic:
type: http
behavior: classical
format: text
interval: 43200
path: ./rule_set/YouTubeMusic.list
url: https://raw.githubusercontent.com/blackmatrix7/ios_rule_script/refs/heads/master/rule/Clash/YouTubeMusic/YouTubeMusic.list
Google:
type: http
behavior: classical
format: text
interval: 43200
path: ./rule_set/Google.list
url: https://raw.githubusercontent.com/blackmatrix7/ios_rule_script/refs/heads/master/rule/Clash/Google/Google.list
GoogleDrive:
type: http
behavior: classical
format: text
interval: 43200
path: ./rule_set/GoogleDrive.list
url: https://raw.githubusercontent.com/blackmatrix7/ios_rule_script/refs/heads/master/rule/Clash/GoogleDrive/GoogleDrive.list
GoogleEarth:
type: http
behavior: classical
format: text
interval: 43200
path: ./rule_set/GoogleEarth.list
url: https://raw.githubusercontent.com/blackmatrix7/ios_rule_script/refs/heads/master/rule/Clash/GoogleEarth/GoogleEarth.list
GoogleFCM:
type: http
behavior: classical
format: text
interval: 43200
path: ./rule_set/GoogleFCM.list
url: https://raw.githubusercontent.com/blackmatrix7/ios_rule_script/refs/heads/master/rule/Clash/GoogleFCM/GoogleFCM.list
GoogleSearch:
type: http
behavior: classical
format: text
interval: 43200
path: ./rule_set/GoogleSearch.list
url: https://raw.githubusercontent.com/blackmatrix7/ios_rule_script/refs/heads/master/rule/Clash/GoogleSearch/GoogleSearch.list
GoogleVoice:
type: http
behavior: classical
format: text
interval: 43200
path: ./rule_set/GoogleVoice.list
url: https://raw.githubusercontent.com/blackmatrix7/ios_rule_script/refs/heads/master/rule/Clash/GoogleVoice/GoogleVoice.list
# 分流规则
rules:
- RULE-SET,YouTubeMusic,YouTubeMusic
- RULE-SET,Google,谷歌系
- RULE-SET,GoogleDrive,谷歌系
- RULE-SET,GoogleEarth,谷歌系
- RULE-SET,GoogleFCM,谷歌系
- RULE-SET,GoogleSearch,谷歌系
- RULE-SET,GoogleVoice,谷歌系
注意:以上分流没有包含 Youtube,各位按自己需求来定。
拓展:如果各位有其他节点能落地,也可以使用以上方法来做链式代理,这样好处是省去客户端上要做链式的麻烦。