Files
jiedian/README.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

135 lines
4.1 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.
# jiedian — VPS 自建节点
个人/家庭自用的 **VLESS + Reality(主力)** + **Hysteria2(备用)** 双栈方案,带 **Web 管理面板**
| 组件 | 职责 |
|------|------|
| **Xray** | VLESS + RealityTCP 443 |
| **sing-box** | Hysteria2UDP 8443+,每节点独立端口) |
| **Flask 面板** | 节点管理、分享链接、在线/流量统计 |
**仓库**https://git.bz121.com/dekun/jiedian.git
**部署路径**`/opt/jiedian`Ubuntu
| 项目 | 值 |
|------|-----|
| VPS IP | `47.76.87.111` |
| 域名 | `66.hyf2.cc` |
| 管理面板 | `http://66.hyf2.cc/<PANEL_PATH>/`(安装时输出,见 `.env` |
> 完整部署步骤见 **[docs/DEPLOY.md](docs/DEPLOY.md)**
---
## 快速部署(Ubuntu VPS
```bash
ssh root@YOUR_VPS_IP
apt update && apt install -y git
git clone https://git.bz121.com/dekun/jiedian.git /opt/jiedian
cd /opt/jiedian
cp .env.example .env # 首次部署:填写 VPS_IP、DOMAIN、ACME_EMAIL
bash scripts/install.sh
```
安装完成后会显示面板地址、用户名和密码。登录面板即可 **添加节点、复制分享链接**
---
## 架构
```
浏览器 ──► Nginx:80/<PANEL_PATH>/ ──► Web 管理面板(登录、添加节点)
render-server.py + render-xray.py
┌───────────────┴───────────────┐
▼ ▼
Xray :443 sing-box :8443+
VLESS + Reality Hysteria2(每节点一端口)
客户端 (Win/iOS/Android)
├─ TCP 443 ──► Xray VLESS+Reality
└─ UDP 8443+ ► sing-box Hysteria2
```
> VLESS Reality 使用 **Xray 服务端**,与 v2rayN / v2rayNGXray 核心)兼容性最好。Hy2 仍由 sing-box 承载。
---
## 目录结构
```
/opt/jiedian/
├── .env # VPS / Reality / 面板账号配置
├── data/nodes.db # 节点数据库(安装后生成)
├── panel/ # Web 管理面板(Flask
├── scripts/
│ ├── install.sh # 一键部署(Xray + sing-box + 面板)
│ ├── uninstall.sh # 卸载后重装
│ ├── generate-keys.sh # 生成 Reality 密钥与面板密码
│ ├── render-xray.py # 生成 Xray VLESS Reality 配置
│ ├── render-server.py # 生成 sing-box Hy2 配置
│ ├── migrate-xray-reality.sh # 旧版 sing-box Reality 迁移到 Xray
│ └── verify-reality.sh # Reality 密钥与配置诊断
└── docs/
├── DEPLOY.md
├── client-import.md
└── troubleshooting.md
```
---
## 端口与防火墙
| 端口 | 协议 | 用途 |
|------|------|------|
| 22 | TCP | SSH |
| 80 | TCP | HTTPACME 验证 + **管理面板** |
| 443 | TCP | VLESS + Reality**Xray** |
| 84438499 | UDP | Hysteria2**sing-box**,每节点递增) |
阿里云安全组需放行 **84438499/UDP**,不只 8443。
---
## 常用运维
```bash
# 面板地址
grep PANEL_PATH /opt/jiedian/.env
# 服务状态
systemctl status xray sing-box jiedian-panel
# Reality 诊断
bash /opt/jiedian/scripts/verify-reality.sh
# 增删节点后手动重载配置
python3 /opt/jiedian/scripts/render-xray.py
python3 /opt/jiedian/scripts/render-server.py
systemctl restart xray sing-box
# 卸载后干净重装
bash scripts/uninstall.sh
bash scripts/generate-keys.sh # 可选:重置密钥与面板密码
bash scripts/install.sh
```
---
## 防墙要点
1. 不要公开分享节点链接
2. Reality **SNI** 使用 `www.microsoft.com`(或 `.env``REALITY_SERVER_NAME`),**不要用域名 `66.hyf2.cc`**
3. 客户端开启 uTLS / **chrome** 指纹;v2rayN 中 **SpiderX 填 `/`**
4. 面板路径与密码请妥善保管,安装后可在 `.env` 查看 `PANEL_PATH` / `PANEL_PASSWORD`
---
## 免责声明
本项目仅供学习网络技术使用。请遵守当地法律法规。