Files
jiedian/docs/client-import.md
T
dekun 4b3f6a1de2 docs: update deployment and troubleshooting for Xray + sing-box split
Document new install flow, ports, migration script, and v2rayN Reality settings across README and docs/.

Co-authored-by: Cursor <cursoragent@cursor.com>
2026-06-16 12:03:03 +08:00

155 lines
4.8 KiB
Markdown
Raw Blame History

This file contains ambiguous Unicode characters
This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.
# 客户端导入与测试指南
部署完成后,在 **管理面板** 复制各节点的 VLESS / Hy2 链接;或本地运行 `bash scripts/render-client.sh` 生成 `client/generated/share-links.txt`
---
## 一、连通性测试(推荐顺序)
### 1. RealityTCP 443Xray
在**国内网络**下测试(不要在 VPS 本机 curl 自己):
```powershell
# Windows PowerShell — 仅测端口是否可达
Test-NetConnection -ComputerName YOUR_VPS_IP -Port 443
```
v2rayN 中对 VLESS 节点 **右键 → 测试真链接延迟**,应显示毫秒数(不是 `-1`)。
连上后访问 https://www.google.com 或 https://ip.sb 确认出口 IP 为 VPS。
### 2. Hysteria2UDP 8443+
- **第一个节点**UDP **8443**
- **第二个节点**UDP **8444**(依此类推)
UDP 无法用普通 TCP 工具测。从面板 **重新复制** Hy2 链接(多节点升级后端口可能已变),导入客户端测试。
若 Reality 可用但 Hysteria2 不通,可能是运营商 QoS/封锁 UDP,可继续只用 Reality。
### 3. 故障判断
| 现象 | 可能原因 |
|------|----------|
| ping 通 IPVLESS 测速 `-1` | Reality 参数或密钥不同步 → `bash scripts/verify-reality.sh` |
| Hy2 不通,VLESS 正常 | UDP 未放行或端口错误(需 84438499/UDP |
| ping 不通 | IP 可能被封,考虑换 IP |
| 连接成功但无网 | 检查防火墙、`journalctl -u xray -f` |
---
## 二、Windows
### 方案 Av2rayN(推荐)
1. 下载 [v2rayN](https://github.com/2dust/v2rayN/releases)(选 `v2rayN-With-Core.zip` 或自带 Xray 的版本)
2. **设置 → 核心类型**VLESS 使用 **Xray** 核心(不要用 sing-box 核心跑 Reality
3. 托盘 → **服务器****从剪贴板导入批量 URL**
4. 从面板复制 `vless://...``hy2://...` 分别导入
5. 设为活动服务器,路由选 **绕过大陆**
**手动核对 Reality 参数:**
| 字段 | 值 |
|------|-----|
| 地址 | VPS IP(或域名,SNI 仍用 microsoft |
| 端口 | 443 |
| 用户 ID | 面板节点 UUID |
| 流控 | xtls-rprx-vision |
| 传输 | tcp / rawXray 26+ 显示 raw 正常) |
| 安全 | reality |
| SNI | `www.microsoft.com`**不要用 Hy2 域名** |
| Fingerprint | chrome |
| Public Key | `.env``REALITY_PUBLIC_KEY` |
| Short ID | `.env``REALITY_SHORT_ID` |
| **SpiderX** | **`/`**(空着可能连不上) |
> **常见错误**Hy2 的 SNI 是 `66.hyf2.cc`Reality 的 SNI 必须是 `www.microsoft.com`,两者不要混用。
### 方案 Bsing-box 客户端
1. 下载 [sing-box for Windows](https://github.com/SagerNet/sing-box/releases)
2.`client/generated/sing-box-client.json` 放入配置目录
3. 以管理员运行(TUN 模式需要),选择 `reality` 出站
### 方案 CNekoray
1. 下载 [Nekoray](https://github.com/MatsuriDayo/nekoray/releases)
2. **Program → Add profile from clipboard**,粘贴 `vless://` 链接
3. 右键 → **Start**
---
## 三、Android
### v2rayNG(推荐)
1. [GitHub Releases](https://github.com/2dust/v2rayNG/releases) 安装 **arm64-v8a** APK(多数新机)
2. 右上角 **+** → **从剪贴板导入**(先复制面板 `vless://` 链接)
3. 再导入 `hy2://` 备用节点
4. 点击右下角 **V** 连接
5. 设置 → **路由设置****绕过局域网及大陆地址**
---
## 四、iOS
需要美区 Apple ID 或已有购买记录。
### Shadowrocket(小火箭)
1. App Store 安装 Shadowrocket
2. **+** → 从剪贴板导入 `vless://` 链接
3. 再添加 `hy2://` 备用
4. 连接后 **连通性测试** 应显示延迟
**手动添加 Reality**
- 类型:VLESS
- 地址:VPS IP
- 端口:443
- UUID:面板中的 UUID
- TLSREALITY
- SNI`REALITY_SERVER_NAME`(默认 `www.microsoft.com`
- Public Key / Short ID:从 `.env` 或面板链接复制
- uTLSchrome
- Flowxtls-rprx-vision
### Streisand
**+** → **Import from Clipboard**,粘贴链接后连接。
---
## 五、macOS
与 Windows 类似:V2rayU / Nekoray / sing-box,从剪贴板导入面板链接。
---
## 六、日常使用建议
1. **默认节点**Reality`vless://`
2. **备用节点**Hysteria2UDP 卡顿时切换)
3. **不要分享**节点链接
4. **每月检查**`systemctl status xray sing-box`、证书续期(acme.sh 自动)
---
## 七、分享链接格式参考
面板生成的 VLESS 链接示例:
```
vless://UUID@IP:443?encryption=none&flow=xtls-rprx-vision&security=reality&sni=SNI&fp=chrome&pbk=PUBLIC_KEY&sid=SHORT_ID&spx=%2F&type=tcp#名称
```
Hy2(端口随节点变化,以面板为准):
```
hy2://PASSWORD@DOMAIN:8443?sni=DOMAIN#名称-Hy2
```
完整链接见面板或 `client/generated/share-links.txt`