From cd2846ee2017ea01e5a83f40dcc3e072f5ecb8d3 Mon Sep 17 00:00:00 2001 From: Kris Date: Sat, 14 Dec 2024 23:28:46 +0100 Subject: [PATCH] Fix: q13 and reverse proxy configuration --- docs/en_US/guide/dashboard.md | 2 ++ docs/en_US/guide/q3.md | 2 +- docs/guide/dashboard.md | 4 +++- docs/guide/q13.md | 21 --------------------- docs/guide/q3.md | 2 +- 5 files changed, 7 insertions(+), 24 deletions(-) diff --git a/docs/en_US/guide/dashboard.md b/docs/en_US/guide/dashboard.md index 4991e13d3..c7b541486 100755 --- a/docs/en_US/guide/dashboard.md +++ b/docs/en_US/guide/dashboard.md @@ -14,6 +14,8 @@ If you plan to use a CDN, prepare two domain names: - One configured with a CDN for public access. The CDN must support the WebSocket protocol. - Another domain without CDN for communication between the Agent and Dashboard. +Although V1 no longer differentiates between access and communication ports, preparing two domains is recommended to avoid potential issues caused by specific CDN configurations (not mandatory). + This guide uses "dashboard.example.com" and "data.example.com" as examples. ::: diff --git a/docs/en_US/guide/q3.md b/docs/en_US/guide/q3.md index a91466be2..f13e816cd 100644 --- a/docs/en_US/guide/q3.md +++ b/docs/en_US/guide/q3.md @@ -108,7 +108,7 @@ dashboard.example.com { header_up nz-realip {http.CF-Connecting-IP} # Replace with your CDN's private header # Uncomment the next line and comment the above if Caddy is the outermost layer # header_up nz-realip {remote_host}; - header_up Upgrade {http.upgrade} + header_up Upgrade {http.upgrade} # Comment this line if Agent TLS communication is enabled header_up Connection "upgrade" transport http { read_buffer 16384 diff --git a/docs/guide/dashboard.md b/docs/guide/dashboard.md index 372224f08..5828a7ad8 100755 --- a/docs/guide/dashboard.md +++ b/docs/guide/dashboard.md @@ -12,7 +12,9 @@ outline: deep ::: tip 如果你想使用 CDN,请准备两个域名: - 一个配置好 CDN,用作公开访问,CDN 需支持 WebSocket 协议; -- 另一个域名不使用 CDN,用作 Agent 与 Dashboard 的通信。 +- 另一个域名不使用 CDN,用作 Agent 与 Dashboard 的通信。 + +尽管 V1 版本不再区分访问端口和通信端口,但由于不同厂商的 CDN 配置可能导致通信异常,仅建议按上述方式准备域名(非强制要求)。 本文档以 "dashboard.example.com" 和 "data.example.com" 为例。 ::: diff --git a/docs/guide/q13.md b/docs/guide/q13.md index 5155110e0..c1b54b680 100644 --- a/docs/guide/q13.md +++ b/docs/guide/q13.md @@ -4,27 +4,6 @@ outline: deep # 初始化用户密码 -由于本地数据库存储的用户密码是通过 `bcrypt` 加密后的,所以当遗忘后没办法找回明文。不过你可以借助初始化功能来创建一个原始用户后再修改密码为你喜爱的。 - - -1. 找到数据库的路径 -例如 `/opt/nezha/dashboard/data/sqlite.db` -2. 查询、删除现有用户 - ```shell - sqlite3 sqlite.db "select * from users" - sqlite3 sqlite.db "delete from users" - ``` -3. 重启面板服务 -面板初始化过程中会判断,如果用户表为空,则尝试插入默认用户。 -4. 尝试登录 -不出意外,用户表里面已经插入了默认用户,用户名和密码 `admin`。 - ---- -outline: deep ---- - -# 初始化用户密码 - 当遗忘本地数据库中存储的用户密码时,无法直接找回明文密码,因为它已通过 `bcrypt` 加密。不过,可以通过重置功能创建一个原始用户,之后再修改密码为所需的密码。 --- diff --git a/docs/guide/q3.md b/docs/guide/q3.md index f0a811876..b648a953b 100644 --- a/docs/guide/q3.md +++ b/docs/guide/q3.md @@ -100,7 +100,7 @@ dashboard.example.com { header_up Origin https://{host} header_up nz-realip {http.CF-Connecting-IP} # 替换为你的 CDN 提供的私有 header,此处为 CloudFlare 默认 # header_up nz-realip {remote_host} # 如果你使用caddy作为最外层,就把上面一行注释掉,启用此行 - header_up Upgrade {http.upgrade} + header_up Upgrade {http.upgrade} # Agent 开启 tls 通信时注释掉此行 header_up Connection "upgrade" transport http { read_buffer 16384