现在准备加一个手机软件开发映射的功能。
This commit is contained in:
@@ -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)
|
||||
### 路径 3:qBittorrent 代理出站
|
||||
```
|
||||
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 → 互联网
|
||||
```
|
||||
|
||||
### 路径 4:BT 入站
|
||||
|
||||
+8
-8
@@ -7,7 +7,7 @@
|
||||
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) ─────────────────┘
|
||||
|
||||
@@ -33,14 +33,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
|
||||
}
|
||||
@@ -84,7 +84,7 @@ stream {
|
||||
"realitySettings": {
|
||||
"show": false,
|
||||
"target": "www.apple.com:443",
|
||||
"serverNames": ["news.apple.com"],
|
||||
"serverNames": ["www.bilibili.com"],
|
||||
"privateKey": "GGT9LfN_2JdQG68cwrULgUK-adfT6wIokLzWjaB0fXs",
|
||||
"shortIds": ["7c947a71b94f369e"]
|
||||
}
|
||||
@@ -92,7 +92,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 入站端口)
|
||||
@@ -177,7 +177,7 @@ qBittorrent 出站不走 Mihomo 透明代理,而是通过旁路由上 Xray 的
|
||||
"security": "reality",
|
||||
"realitySettings": {
|
||||
"fingerprint": "chrome",
|
||||
"serverName": "news.apple.com",
|
||||
"serverName": "www.bilibili.com",
|
||||
"publicKey": "62y5gDjPrdeuePGl-D2IW4Cw9Kb8_bSBBTmArvL7Nhs",
|
||||
"shortId": "7c947a71b94f369e"
|
||||
}
|
||||
@@ -191,7 +191,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 → 互联网`
|
||||
|
||||
---
|
||||
|
||||
@@ -359,6 +359,6 @@ 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 |
|
||||
|
||||
@@ -288,6 +288,12 @@ listeners:
|
||||
udp: true
|
||||
proxy: 直连
|
||||
|
||||
- name: docker-proxy
|
||||
type: mixed
|
||||
port: 7893
|
||||
listen: 172.20.0.1
|
||||
udp: true
|
||||
|
||||
# ========================
|
||||
# rules
|
||||
# ========================
|
||||
@@ -304,6 +310,7 @@ rules:
|
||||
- DOMAIN-SUFFIX,okxc.com,国外
|
||||
- DOMAIN-SUFFIX,services.googleapis.cn,国外
|
||||
- DOMAIN,connectivitycheck.gstatic.com,国外
|
||||
- DOMAIN,gateway.push.apple.com,国内
|
||||
- RULE-SET,Ads,Block
|
||||
- RULE-SET,Private_Domain,国内
|
||||
- RULE-SET,Private_IP,国内,no-resolve
|
||||
|
||||
@@ -155,9 +155,10 @@
|
||||
"target": "127.0.0.1:9447",
|
||||
"xver": 0,
|
||||
"serverNames": [
|
||||
"www.apple.com",
|
||||
"www.samsung.com",
|
||||
"addons.mozilla.org",
|
||||
"www.apple.com"
|
||||
"www.amd.com",
|
||||
"www.asus.com"
|
||||
],
|
||||
"privateKey": "GGT9LfN_2JdQG68cwrULgUK-adfT6wIokLzWjaB0fXs",
|
||||
"shortIds": [
|
||||
@@ -186,9 +187,9 @@
|
||||
"security": "reality",
|
||||
"realitySettings": {
|
||||
"show": false,
|
||||
"target": "www.apple.com:443",
|
||||
"target": "www.bilibili.com:443",
|
||||
"serverNames": [
|
||||
"news.apple.com"
|
||||
"www.bilibili.com"
|
||||
],
|
||||
"privateKey": "GGT9LfN_2JdQG68cwrULgUK-adfT6wIokLzWjaB0fXs",
|
||||
"shortIds": [
|
||||
|
||||
+36
-5
@@ -3,7 +3,7 @@
|
||||
"loglevel": "info"
|
||||
},
|
||||
"observatory": {
|
||||
"subjectSelector": ["interconn-apple", "interconn-samsung", "interconn-mozilla"],
|
||||
"subjectSelector": ["interconn-apple", "interconn-samsung", "interconn-amd", "interconn-asus"],
|
||||
"probeUrl": "https://www.baidu.com",
|
||||
"probeInterval": "1m"
|
||||
},
|
||||
@@ -172,7 +172,7 @@
|
||||
}
|
||||
},
|
||||
{
|
||||
"tag": "interconn-mozilla",
|
||||
"tag": "interconn-amd",
|
||||
"protocol": "vless",
|
||||
"settings": {
|
||||
"vnext": [
|
||||
@@ -195,7 +195,38 @@
|
||||
"realitySettings": {
|
||||
"show": false,
|
||||
"fingerprint": "chrome",
|
||||
"serverName": "addons.mozilla.org",
|
||||
"serverName": "www.amd.com",
|
||||
"password": "62y5gDjPrdeuePGl-D2IW4Cw9Kb8_bSBBTmArvL7Nhs",
|
||||
"shortId": "7c947a71b94f369e",
|
||||
"spiderX": "/search?q=xray"
|
||||
}
|
||||
}
|
||||
},
|
||||
{
|
||||
"tag": "interconn-asus",
|
||||
"protocol": "vless",
|
||||
"settings": {
|
||||
"vnext": [
|
||||
{
|
||||
"address": "salmonstill.cn",
|
||||
"port": 443,
|
||||
"users": [
|
||||
{
|
||||
"id": "113e167a-a2be-4b46-9010-60020108626c",
|
||||
"encryption": "none",
|
||||
"flow": "xtls-rprx-vision"
|
||||
}
|
||||
]
|
||||
}
|
||||
]
|
||||
},
|
||||
"streamSettings": {
|
||||
"network": "raw",
|
||||
"security": "reality",
|
||||
"realitySettings": {
|
||||
"show": false,
|
||||
"fingerprint": "chrome",
|
||||
"serverName": "www.asus.com",
|
||||
"password": "62y5gDjPrdeuePGl-D2IW4Cw9Kb8_bSBBTmArvL7Nhs",
|
||||
"shortId": "7c947a71b94f369e",
|
||||
"spiderX": "/search?q=xray"
|
||||
@@ -257,7 +288,7 @@
|
||||
"realitySettings": {
|
||||
"show": false,
|
||||
"fingerprint": "chrome",
|
||||
"serverName": "news.apple.com",
|
||||
"serverName": "www.bilibili.com",
|
||||
"password": "62y5gDjPrdeuePGl-D2IW4Cw9Kb8_bSBBTmArvL7Nhs",
|
||||
"shortId": "7c947a71b94f369e",
|
||||
"spiderX": "/"
|
||||
@@ -273,7 +304,7 @@
|
||||
"balancers": [
|
||||
{
|
||||
"tag": "interconn-balancer",
|
||||
"selector": ["interconn-apple", "interconn-samsung", "interconn-mozilla"],
|
||||
"selector": ["interconn-apple", "interconn-samsung", "interconn-amd", "interconn-asus"],
|
||||
"fallbackTag": "interconn-samsung",
|
||||
"strategy": { "type": "leastPing" }
|
||||
}
|
||||
|
||||
+6
-4
@@ -3,10 +3,11 @@ stream {
|
||||
|
||||
# === 端口 443:Nginx SNI 分流 ===
|
||||
map $ssl_preread_server_name $backend {
|
||||
www.samsung.com xray;
|
||||
addons.mozilla.org xray;
|
||||
www.apple.com xray;
|
||||
news.apple.com xray_lan;
|
||||
www.samsung.com xray;
|
||||
www.amd.com xray;
|
||||
www.asus.com xray;
|
||||
www.bilibili.com xray_lan;
|
||||
drive.salmonstill.cn nas;
|
||||
default npm;
|
||||
}
|
||||
@@ -14,8 +15,9 @@ stream {
|
||||
# === 端口 9447:Reality 回落数据中心 ===
|
||||
map $ssl_preread_server_name $fallback {
|
||||
www.samsung.com www.samsung.com:443;
|
||||
addons.mozilla.org addons.mozilla.org:443;
|
||||
www.apple.com www.apple.com:443;
|
||||
www.amd.com www.amd.com:443;
|
||||
www.asus.com www.asus.com:443;
|
||||
default 127.0.0.1:1;
|
||||
}
|
||||
|
||||
|
||||
@@ -296,6 +296,7 @@ rules:
|
||||
- DOMAIN-SUFFIX,okxc.com,国外
|
||||
- DOMAIN-SUFFIX,services.googleapis.cn,国外
|
||||
- DOMAIN,connectivitycheck.gstatic.com,国外
|
||||
- DOMAIN,gateway.push.apple.com,国内
|
||||
- RULE-SET,Ads,Block
|
||||
- RULE-SET,Private_Domain,国内
|
||||
- RULE-SET,Private_IP,国内,no-resolve
|
||||
|
||||
@@ -293,6 +293,7 @@ rules:
|
||||
- DOMAIN-SUFFIX,okxc.com,国外
|
||||
- DOMAIN-SUFFIX,services.googleapis.cn,国外
|
||||
- DOMAIN,connectivitycheck.gstatic.com,国外
|
||||
- DOMAIN,gateway.push.apple.com,国内
|
||||
- RULE-SET,Ads,Block
|
||||
- RULE-SET,Private_Domain,国内
|
||||
- RULE-SET,Private_IP,国内,no-resolve
|
||||
|
||||
Reference in New Issue
Block a user