Files
onion-dmp/DEPLOYMENT_STATUS.md
2026-04-08 14:52:09 +08:00

173 lines
4.0 KiB
Markdown
Raw Permalink 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.
# 🎉 DMP Cloudflare Tunnel 部署状态
## ✅ 已完成的步骤
1. **✅ Cloudflare 认证** - 已登录
2. **✅ 创建 Tunnel** - dmp-tunnel (ID: d8a6a4cd-4ddf-4122-92f1-b3d961aca422)
3. **✅ 配置文件** - cloudflare-tunnel.yml 已创建
4. **✅ Node.js 服务器** - 运行在 http://localhost:3456 ✅
5. **✅ Cloudflare Tunnel** - 已启动并连接 ✅
6. **⚠️ DNS 路由** - 需要手动修复
---
## ⚠️ 需要手动完成的步骤
### DNS 路由配置(最后一步)
由于之前有旧的 DNS 记录,需要手动更新:
#### 方法 1: 使用 Cloudflare Dashboard推荐最简单
1. 访问 https://dash.cloudflare.com/
2. 登录账号: huinkling@gmail.com
3. 选择域名: **ink1ing.tech**
4. 点击左侧菜单: **DNS****记录**
5. 找到名为 `dmp.ink1ing.tech` 的记录
6. 有两个选择:
**选项 A - 删除并重建(推荐)**
- 点击该记录旁边的 **删除** 按钮
- 然后在终端运行:
```bash
cd /Users/inkling/Desktop/dmp
cloudflared tunnel route dns d8a6a4cd-4ddf-4122-92f1-b3d961aca422 dmp.ink1ing.tech
```
**选项 B - 手动编辑**
- 点击该记录旁边的 **编辑** 按钮
- 修改目标为: `d8a6a4cd-4ddf-4122-92f1-b3d961aca422.cfargotunnel.com`
- 确保 **代理状态** 为已代理(橙色云朵图标)
- 点击 **保存**
---
## 🚀 启动服务
### 当前运行状态
- ✅ Node.js 服务器正在运行(端口 3456
- ✅ Cloudflare Tunnel 正在运行
### 如何重新启动
#### macOS 一键启动(推荐)
双击运行:`start-tunnel.command`
#### 终端启动
```bash
cd /Users/inkling/Desktop/dmp
./start-tunnel.sh
```
#### 手动启动(两个终端窗口)
```bash
# 终端 1: 启动 Node.js 服务器
cd /Users/inkling/Desktop/dmp
node server.js
# 终端 2: 启动 Cloudflare Tunnel
cd /Users/inkling/Desktop/dmp
cloudflared tunnel --config cloudflare-tunnel.yml run dmp-tunnel
```
---
## 🌐 访问地址
- **公网访问**: https://dmp.ink1ing.tech (修复 DNS 后可用)
- **本地访问**: http://localhost:3456 ✅
---
## 🔍 验证部署
完成 DNS 配置后,运行以下命令验证:
```bash
# 测试本地服务
curl http://localhost:3456
# 测试公网访问
curl https://dmp.ink1ing.tech
# 查看 tunnel 状态
cloudflared tunnel info dmp-tunnel
# 查看所有 tunnels
cloudflared tunnel list
```
---
## 📝 重要文件
```
/Users/inkling/Desktop/dmp/
├── cloudflare-tunnel.yml # Tunnel 配置文件
├── start-tunnel.command # macOS 启动脚本(双击运行)
├── start-tunnel.sh # 终端启动脚本
├── setup-tunnel.sh # 初始设置脚本
├── fix-dns.sh # DNS 修复指导脚本
├── CLOUDFLARE_DEPLOYMENT.md # 完整部署文档
├── DEPLOYMENT_STATUS.md # 本文件
└── server.js # DMP 应用主程序
```
---
## 🛠 Tunnel 信息
```
Tunnel Name: dmp-tunnel
Tunnel ID: d8a6a4cd-4ddf-4122-92f1-b3d961aca422
Domain: dmp.ink1ing.tech
Local Port: 3456
Protocol: QUIC
Status: ✅ Connected (2 connections)
```
---
## 📞 下一步
1. **立即**: 在 Cloudflare Dashboard 修复 DNS 记录(见上面的说明)
2. **等待**: DNS 传播(通常 1-5 分钟)
3. **测试**: 访问 https://dmp.ink1ing.tech
4. **成功**: 🎉 你的 DMP 应用已成功部署到公网!
---
## 🔧 故障排除
### Tunnel 未连接?
```bash
# 重启 tunnel
pkill cloudflared
cd /Users/inkling/Desktop/dmp
cloudflared tunnel --config cloudflare-tunnel.yml run dmp-tunnel
```
### 本地服务器未运行?
```bash
# 检查端口占用
lsof -i :3456
# 重启服务器
pkill -f "node server.js"
cd /Users/inkling/Desktop/dmp
node server.js
```
### 公网访问 530 错误?
- 确保本地服务器正在运行
- 确保 Tunnel 已连接
- 检查防火墙设置
### 公网访问 1033 错误?
- DNS 路由配置错误
- 按照上面的步骤修复 DNS 记录
---
生成时间: 2026-04-06 11:07