From e24b4f297f3ee2303fb2a5b48182f214a9741723 Mon Sep 17 00:00:00 2001 From: dekun Date: Fri, 24 Jul 2026 16:41:31 +0800 Subject: [PATCH] Document dc.hyf2.cc reverse proxy for port 5155. Co-authored-by: Cursor --- README.md | 4 ++-- deploy/pull_and_restart.sh | 2 +- frontend/src/pages/Login.tsx | 4 ++-- frontend/src/pages/Settings.tsx | 2 +- 4 files changed, 6 insertions(+), 6 deletions(-) diff --git a/README.md b/README.md index eb33d0a..bc049d6 100644 --- a/README.md +++ b/README.md @@ -12,9 +12,9 @@ ## 访问(测试机) -- 地址:`http://47.236.184.99:5155` +- 反代:[`https://dc.hyf2.cc`](https://dc.hyf2.cc) → 本机 `5155`(PM2: `eth-hedge-api`) - 默认登录:见服务器 `/opt/eth_hedge_sim/.env` 的 `AUTH_USERNAME` / `AUTH_PASSWORD`(示例 `admin` / `admin123`) -- 登录页可填写 **API 地址**(同机部署填 `http://47.236.184.99:5155` 或留当前域名) +- 登录页 **API 地址** 默认同域即可(填 `https://dc.hyf2.cc` 亦可) ## 一键部署 / 更新(禁止 scp 传代码) diff --git a/deploy/pull_and_restart.sh b/deploy/pull_and_restart.sh index 871deec..24e0d4e 100644 --- a/deploy/pull_and_restart.sh +++ b/deploy/pull_and_restart.sh @@ -47,4 +47,4 @@ fi pm2 startOrReload "$ROOT/deploy/ecosystem.config.cjs" --update-env pm2 save -echo "[eth_hedge_sim] done. health: http://127.0.0.1:5155/health" +echo "[eth_hedge_sim] done. health: http://127.0.0.1:5155/health public: https://dc.hyf2.cc/health" diff --git a/frontend/src/pages/Login.tsx b/frontend/src/pages/Login.tsx index 415e68c..0cb1661 100644 --- a/frontend/src/pages/Login.tsx +++ b/frontend/src/pages/Login.tsx @@ -11,7 +11,7 @@ export default function LoginPage() { const [loading, setLoading] = useState(false); const hint = useMemo( - () => "默认同域 API。跨机访问时填写如 http://47.236.184.99:5155", + () => "默认同域 API。测试环境反代:https://dc.hyf2.cc", [], ); @@ -44,7 +44,7 @@ export default function LoginPage() { className="mono" value={apiBase} onChange={(e) => setApi(e.target.value)} - placeholder="http://host:5155" + placeholder="https://dc.hyf2.cc" autoComplete="url" /> diff --git a/frontend/src/pages/Settings.tsx b/frontend/src/pages/Settings.tsx index 215adf7..07becfd 100644 --- a/frontend/src/pages/Settings.tsx +++ b/frontend/src/pages/Settings.tsx @@ -16,7 +16,7 @@ export default function SettingsPage() {

系统设置

- 前端可单独指定后端 API;同机部署默认用当前域名端口 5155。 + 前端可单独指定后端 API;测试环境反代为 https://dc.hyf2.cc(同源可留空当前域名)。