现在准备加一个手机软件开发映射的功能。

This commit is contained in:
2026-07-15 14:16:59 +08:00
parent 58f6a2a67f
commit ba25b13d33
8 changed files with 79 additions and 36 deletions
+15 -15
View File
@@ -25,8 +25,8 @@
| SNI | 后端 | 端口 | 用途 |
|---|---|---|---|
| `www.apple.com` / `www.samsung.com` / `addons.mozilla.org` | Xray interconn | :9443 | 反向代理隧道( SNI 轮换) |
| `news.apple.com` | Xray proxy_from_lan | :9445 | 北京直连代理(qBittorrent 出站) |
| `www.apple.com` / `www.samsung.com` / `www.amd.com` / `www.asus.com` | Xray interconn | :9443 | 反向代理隧道(4 SNI leastPing 轮换) |
| `www.bilibili.com` | Xray proxy_from_lan | :9445 | 北京直连代理(qBittorrent 出站) |
| `drive.salmonstill.cn` | NAS | :38653 | 绿联云直接转发 |
| 默认 | NPM | :8443 | Nginx Proxy Manager |
@@ -44,8 +44,8 @@
| Tag | 端口 | serverNames | Reality target | 说明 |
|---|---|---|---|---|
| `interconn` | :9443 | apple/samsung/mozilla 轮换 | `127.0.0.1:9447` | 反向隧道,多 SNI 防封 + 数据中心回落 |
| `proxy_from_lan` | :9445 | `news.apple.com` | `www.apple.com:443` | 北京直连代理(qBittorrent |
| `interconn` | :9443 | apple/samsung/amd/asus 4 SNI leastPing 轮换 | `127.0.0.1:9447` | 反向隧道,多 SNI 防封 + 数据中心回落 |
| `proxy_from_lan` | :9445 | `www.bilibili.com` | `www.bilibili.com:443` | 北京直连代理(qBittorrent |
> `mihomo_in`(旧 Mihomo 中转)已删除,客户端直接连接搬瓦工。
@@ -104,7 +104,7 @@
| `to_spark_rdp` | `192.168.1.166:3389` | Spark xRDP 桌面远程 |
| `to_spark_38662` | `192.168.1.166:38662` | Spark 自定义服务 |
| `interconn-apple/samsung/mozilla` | VLESS+Reality → `salmonstill.cn:443` (多 SNI 轮换) | 隧道链接(balancer + leastPing + fallback |
| `to_beijing_direct` | VLESS+Reality → `salmonstill.cn:443` (SNI=news.apple.com) | 北京直连 |
| `to_beijing_direct` | VLESS+Reality → `salmonstill.cn:443` (SNI=www.bilibili.com) | 北京直连 |
| `direct` | freedom | 直连 |
**路由规则**bridge 入站按端口匹配):
@@ -188,7 +188,7 @@ launchctl load ~/Library/LaunchAgents/com.mihomo.proxy.plist
qBittorrent(192.168.1.200) 互联网
↓ SOCKS5 旁路由:1080 (socks-lan) ↑
↓ Xray routing → to_beijing_direct │
↓ Reality(VLESS, SNI=news.apple.com) │
↓ Reality(VLESS, SNI=www.bilibili.com) │
↓ 北京VPS:443 → Nginx分流 │
↓ proxy_from_lan:9445 → direct(freedom) ─────────────────┘
@@ -214,14 +214,14 @@ Peer → 北京VPS:51413 → external_qbit → portal
#### 1.1 Nginx Stream SNI 分流 `beijing-vps-stream.conf`
新增 `news.apple.com` SNI 映射(用于旁路由 Mihomo 直连代理):
新增 `www.bilibili.com` SNI 映射(用于旁路由 Mihomo 直连代理):
```nginx
stream {
map $ssl_preread_server_name $backend {
www.apple.com xray; # 旁路由反向代理隧道
www.microsoft.com mihomo; # 外部客户端代理 → 东京出口
news.apple.com xray_lan; # 旁路由 Mihomo 北京直连代理
www.bilibili.com xray_lan; # 旁路由 Mihomo 北京直连代理
drive.salmonstill.cn nas; # 绿联云服务
default npm; # Nginx Proxy Manager
}
@@ -265,7 +265,7 @@ stream {
"realitySettings": {
"show": false,
"target": "www.apple.com:443",
"serverNames": ["news.apple.com"],
"serverNames": ["www.bilibili.com"],
"privateKey": "GGT9LfN_2JdQG68cwrULgUK-adfT6wIokLzWjaB0fXs",
"shortIds": ["7c947a71b94f369e"]
}
@@ -273,7 +273,7 @@ stream {
}
```
> Reality 公私钥复用已有的 `interconn` 入站 keypair`serverNames` 用新的 `news.apple.com` 与 Nginx 对应。
> Reality 公私钥复用已有的 `interconn` 入站 keypair`serverNames` 用新的 `www.bilibili.com` 与 Nginx 对应。
> `target` 设为 `www.apple.com:443`Reality 从此地址偷取真实 TLS 证书用于伪装。
##### 新增入站 `external_qbit`BT 入站端口)
@@ -358,7 +358,7 @@ qBittorrent 出站不走 Mihomo 透明代理,而是通过旁路由上 Xray 的
"security": "reality",
"realitySettings": {
"fingerprint": "chrome",
"serverName": "news.apple.com",
"serverName": "www.bilibili.com",
"publicKey": "62y5gDjPrdeuePGl-D2IW4Cw9Kb8_bSBBTmArvL7Nhs",
"shortId": "7c947a71b94f369e"
}
@@ -372,7 +372,7 @@ qBittorrent 出站不走 Mihomo 透明代理,而是通过旁路由上 Xray 的
{ "type": "field", "inboundTag": ["socks-lan"], "outboundTag": "to_beijing_direct" }
```
> 路径:`qBittorrent → SOCKS5 旁路由:1080 → to_beijing_direct → 北京VPS:443(SNI=news.apple.com) → proxy_from_lan:9445 → direct → 互联网`
> 路径:`qBittorrent → SOCKS5 旁路由:1080 → to_beijing_direct → 北京VPS:443(SNI=www.bilibili.com) → proxy_from_lan:9445 → direct → 互联网`
---
@@ -540,7 +540,7 @@ nc -zv salmonstill.cn 51413
| 文件 | 位置 | 作用 |
|---|---|---|
| `beijing-vps-stream.conf` | 北京VPS `/etc/nginx/stream.conf.d/` | Nginx SNI分流(含 news.apple.com → 9445 |
| `beijing-vps-stream.conf` | 北京VPS `/etc/nginx/stream.conf.d/` | Nginx SNI分流(含 www.bilibili.com → 9445 |
| `xray-北京vps-config.json` | 北京VPS `/usr/local/etc/xray/config.json` | Xray 入站+路由(含 proxy_from_lan + external_qbit |
| `xray-旁路由-config.json` | 旁路由 `/etc/xray/config.json` | Xray bridge + to_qbit(51413) + socks-lan(1080) → to_beijing_direct |
@@ -810,7 +810,7 @@ sudo tcpdump -i bridge0 udp port 19132 -n
| **北京 VPS**3 个入站共用) | `GGT9LfN_2JdQG68cwrULgUK-adfT6wIokLzWjaB0fXs` | `62y5gDjPrdeuePGl-D2IW4Cw9Kb8_bSBBTmArvL7Nhs` |
| **搬瓦工 VPS**(客户端直连) | `iBlu3eH1VLf1S5Qw87m_1w0TGYUktDwHAzgpQ2aKuGI` | `jr_zQjC4mvlQITuG5Ap5Mxqe5EBbGyyvwbVLDEi8OCA` |
`Beijing-Direct` 节点必须 `skip-cert-verify: true`,因 Reality 返回 target`www.apple.com`)的证书,而 SNI 是 `news.apple.com`TLS SAN 校验失败。
`Beijing-Direct` 节点必须 `skip-cert-verify: true`,因 Reality 返回 target`www.bilibili.com`)的证书,而 SNI 是 `www.bilibili.com`TLS SAN 校验可能失败。
### Reality 故障排查
@@ -845,7 +845,7 @@ Mihomo 客户端 → 67.230.189.235:443 (SNI=www.cloudflare.com)
### 路径 3qBittorrent 代理出站
```
qBittorrent → SOCKS5 旁路由:1080 → Xray to_beijing_direct
→ salmonstill.cn:443 (SNI=news.apple.com) → proxy_from_lan → direct → 互联网
→ salmonstill.cn:443 (SNI=www.bilibili.com) → proxy_from_lan → direct → 互联网
```
### 路径 4BT 入站