稳定版本,但是访问3000端口都导向gitea还没修
This commit is contained in:
@@ -10,7 +10,7 @@
|
||||
| 设备 | IP / 域名 | 角色 |
|
||||
|---|---|---|
|
||||
| **北京 VPS** | `salmonstill.cn` / `49.232.242.90` | 公网入口,Nginx + Xray + socat + WireGuard |
|
||||
| **东京 VPS** | `tokyo.salmonstill.cn` / `43.165.178.10` | 代理出口,Xray Reality 出站 |
|
||||
| **搬瓦工 VPS** | `173.242.118.60` | 代理出口,Xray Reality 入站(客户端直连) |
|
||||
| **旁路由** | `192.168.1.199` / WG `10.0.0.2` | 内网核心,Xray bridge + Mihomo 代理 |
|
||||
| **NAS** | `192.168.1.188` | 绿联云 UGOS,思源笔记等服务 |
|
||||
| **qBittorrent** | `192.168.1.200` (macvlan) | PT 下载,独立 IP |
|
||||
@@ -26,12 +26,12 @@
|
||||
| SNI | 后端 | 端口 | 用途 |
|
||||
|---|---|---|---|
|
||||
| `www.apple.com` | Xray interconn | :9443 | 反向代理隧道 |
|
||||
| `www.microsoft.com` | Xray mihomo_in | :9444 | Mihomo 客户端 → 东京出口 |
|
||||
| `www.microsoft.com` | Xray mihomo_in | :9444 | Mihomo 客户端 → 搬瓦工出口 |
|
||||
| `news.apple.com` | Xray proxy_from_lan | :9445 | 北京直连代理 |
|
||||
| `drive.salmonstill.cn` | NAS | :38653 | 绿联云直接转发 |
|
||||
| 默认 | NPM | :8443 | Nginx Proxy Manager |
|
||||
|
||||
东京 VPS (`东京-vps-stream.conf`):`www.microsoft.com` → Xray :9443,默认 → NPM。
|
||||
搬瓦工 VPS(部署 `东京-vps-stream.conf` + `tokyo-vps-config.json`):`www.microsoft.com` → Xray :9443,默认 → NPM。
|
||||
|
||||
---
|
||||
|
||||
@@ -69,10 +69,10 @@
|
||||
|
||||
| Tag | 端口 | 类型 | 用途 |
|
||||
|---|---|---|---|
|
||||
| `proxy_in` | 10809 | mixed | SOCKS5/HTTP 代理 → 东京出口 |
|
||||
| `proxy_in` | 10809 | mixed | SOCKS5/HTTP 代理 → 搬瓦工出口 |
|
||||
| `socks-dynamic` | 38658 | SOCKS5 (password) | 动态 LAN 端口访问 |
|
||||
|
||||
**出站**:`direct`(freedom 直连)、`to_tokyo`(VLESS+Reality → `us.salmonstill.cn:443`)
|
||||
**出站**:`direct`(freedom 直连)、`to_tokyo`(VLESS+Reality → `173.242.118.60:443`)
|
||||
|
||||
**路由**:所有 `external_*` + `interconn` + `socks-dynamic` → `portal`(反向隧道);`mihomo_in` + `proxy_in` → `to_tokyo`;`proxy_from_lan` → `direct`
|
||||
|
||||
@@ -121,9 +121,10 @@
|
||||
|
||||
> 所有显式端口规则优先于 catch-all,现有端口转发不受影响。
|
||||
|
||||
### 东京 VPS (`tokyo-vps-config.json`)
|
||||
### 搬瓦工 VPS / 洛杉矶 (`tokyo-vps-config.json`)
|
||||
|
||||
极简:VLESS+Reality 入站 `:9443`(SNI=www.microsoft.com),freedom 出站。
|
||||
所有客户端(Spark、旁路由、macOS)直连此服务器,不再经北京 VPS 中转。
|
||||
|
||||
---
|
||||
|
||||
@@ -142,13 +143,12 @@
|
||||
配合 **fake-ip DNS**(`enhanced-mode: fake-ip`),DNS 请求返回 `198.18.x.x` 假 IP,强制流量进入代理路由。
|
||||
|
||||
**代理节点**:
|
||||
- `US-Direct` — VLESS+Reality → `us.salmonstill.cn:443`(默认国外出口)
|
||||
- `Xray-Real` — VLESS+Reality → `49.232.242.90:443`(备用,经北京→东京)
|
||||
- `US-Direct` — VLESS+Reality → `173.242.118.60:443`(默认国外出口,客户端直连搬瓦工)
|
||||
|
||||
**关键策略组**:
|
||||
- 国外 → `[US-Direct, 直连]`
|
||||
|
||||
**防死循环 IP**:`49.232.242.90`(北京 VPS)、`43.165.178.10`(东京 VPS)强制直连。
|
||||
**防死循环 IP**:`49.232.242.90`(北京 VPS)、`173.242.118.60`(搬瓦工 VPS)强制直连。
|
||||
|
||||
**额外监听器**:`:7891`(全局→US-Direct)、`:7892`(强制直连)
|
||||
|
||||
@@ -156,15 +156,17 @@
|
||||
|
||||
结构与旁路由一致,无 TUN,监听器 `:7890` + `:7891` + `:7892`。
|
||||
|
||||
**重启**(launchctl 管理):
|
||||
```bash
|
||||
launchctl unload ~/Library/LaunchAgents/com.mihomo.proxy.plist
|
||||
launchctl load ~/Library/LaunchAgents/com.mihomo.proxy.plist
|
||||
```
|
||||
|
||||
### Ubuntu / Spark (`tun模式的主机mihomo config.yaml`)
|
||||
|
||||
本地 TUN 模式(`stack: system`),不依赖旁路由网关。设备重启后 `auto-route` 自建路由表,稳定可靠。监听器 `:7890` + `:7891` + `:7892`,节点直连 US-Direct。
|
||||
|
||||
### subscribe.yaml
|
||||
|
||||
通用订阅模板,节点:US-Direct(默认)、Xray-Real(备选)。国外组 `[Xray-Real, US-Direct, 直连]`,global-mixed listener 走 US-Direct。
|
||||
|
||||
---
|
||||
|
||||
## qBittorrent 透明代理
|
||||
|
||||
@@ -208,7 +210,7 @@ qBittorrent 设置:SOCKS5 代理 → 旁路由 `192.168.1.199:1080`,监听 `
|
||||
| 位置 | Private Key | Public Key (客户端用) |
|
||||
|---|---|---|
|
||||
| **北京 VPS**(3 个入站共用) | `GGT9LfN_2JdQG68cwrULgUK-adfT6wIokLzWjaB0fXs` | `62y5gDjPrdeuePGl-D2IW4Cw9Kb8_bSBBTmArvL7Nhs` |
|
||||
| **东京 VPS**(to_tokyo 出口) | `iBlu3eH1VLf1S5Qw87m_1w0TGYUktDwHAzgpQ2aKuGI` | `jr_zQjC4mvlQITuG5Ap5Mxqe5EBbGyyvwbVLDEi8OCA` |
|
||||
| **搬瓦工 VPS**(客户端直连) | `iBlu3eH1VLf1S5Qw87m_1w0TGYUktDwHAzgpQ2aKuGI` | `jr_zQjC4mvlQITuG5Ap5Mxqe5EBbGyyvwbVLDEi8OCA` |
|
||||
|
||||
`Beijing-Direct` 节点必须 `skip-cert-verify: true`,因 Reality 返回 target(`www.apple.com`)的证书,而 SNI 是 `news.apple.com`,TLS SAN 校验会失败。
|
||||
|
||||
@@ -222,10 +224,10 @@ qBittorrent 设置:SOCKS5 代理 → 旁路由 `192.168.1.199:1080`,监听 `
|
||||
→ 端口匹配出站 → 内网目标 → 原路返回
|
||||
```
|
||||
|
||||
### 路径 2:代理翻墙(东京出口)
|
||||
### 路径 2:代理翻墙(直连搬瓦工)
|
||||
```
|
||||
Mihomo 客户端 → salmonstill.cn:443 (SNI=www.microsoft.com)
|
||||
→ mihomo_in :9444 → to_tokyo → 东京 VPS → freedom → 互联网
|
||||
Mihomo 客户端 → 173.242.118.60:443 (SNI=www.microsoft.com)
|
||||
→ Nginx 分流 → Xray :9443 → freedom → 互联网
|
||||
```
|
||||
|
||||
### 路径 3:qBittorrent 代理出站
|
||||
@@ -250,22 +252,19 @@ BT Peer → salmonstill.cn:51413 → portal → 隧道 → bridge → to_qbit
|
||||
→ bridge → catch-all direct → 任意 LAN IP:PORT
|
||||
```
|
||||
|
||||
---
|
||||
|
||||
## 文件清单
|
||||
|
||||
| 文件 | 目标设备 | 部署路径 |
|
||||
|---|---|---|
|
||||
| `beijing-vps-stream.conf` | 北京 VPS | `/etc/nginx/stream.conf.d/` |
|
||||
| `xray-北京vps-config.json` | 北京 VPS | `/usr/local/etc/xray/config.json` |
|
||||
| `东京-vps-stream.conf` | 东京 VPS | `/etc/nginx/stream.conf.d/` |
|
||||
| `tokyo-vps-config.json` | 东京 VPS | `/usr/local/etc/xray/config.json` |
|
||||
| `东京-vps-stream.conf` | 搬瓦工 VPS | `/etc/nginx/stream.conf.d/` |
|
||||
| `tokyo-vps-config.json` | 搬瓦工 VPS | `/usr/local/etc/xray/config.json` |
|
||||
| `xray-旁路由-config.json` | 旁路由 | `/etc/xray/config.json` |
|
||||
| `旁路由的mihomo config.yaml` | 旁路由 | `/opt/mihomo/config.yaml` |
|
||||
| `非tun模式的主机mihomo config.yaml` | macOS | `~/Library/LaunchAgents/` (launchctl 管理) |
|
||||
| `tun模式的主机mihomo config.yaml` | Spark (Ubuntu) | `/opt/mihomo/config.yaml` (systemd) |
|
||||
| `subscribe.yaml` | 通用 | 订阅模板 |
|
||||
| `subscribe-7891-only.yaml` | 通用 | 精简版模板 |
|
||||
| `subscribe-7891-only.yaml` | 通用 | 精简版模板(单独 7891 端口) |
|
||||
| `qbittorrent流量转发.md` | — | 方案文档 |
|
||||
| `我的世界udp转发.md` | — | 方案文档 |
|
||||
|
||||
@@ -279,7 +278,7 @@ BT Peer → salmonstill.cn:51413 → portal → 隧道 → bridge → to_qbit
|
||||
3. 北京 VPS: 部署 Xray → systemctl restart xray
|
||||
4. 北京 VPS: 部署 WireGuard → wg-quick@wg0
|
||||
5. 北京 VPS: 部署 socat → systemctl start mc-forward
|
||||
6. 东京 VPS: 部署 Nginx + Xray
|
||||
6. 搬瓦工 VPS: 部署 Nginx + Xray
|
||||
7. 旁路由: 部署 Xray → /etc/init.d/xray restart
|
||||
8. 旁路由: 部署 Mihomo → /etc/init.d/mihomo restart
|
||||
9. 旁路由: 配置 WireGuard + 端口转发 + SNAT(LuCI)
|
||||
@@ -296,8 +295,8 @@ BT Peer → salmonstill.cn:51413 → portal → 隧道 → bridge → to_qbit
|
||||
ss -tlnp | grep -E '944[345]|3865[3-8]|51413|10809'
|
||||
systemctl status nginx xray wg-quick@wg0 mc-forward
|
||||
|
||||
# 东京 VPS
|
||||
ss -tlnp | grep 9443
|
||||
# 搬瓦工 VPS
|
||||
ss -tlnp | grep -E '443|9443'
|
||||
systemctl status nginx xray
|
||||
|
||||
# 旁路由
|
||||
|
||||
Reference in New Issue
Block a user