From 23c70c3262716588bff4ae2654909f32e9226011 Mon Sep 17 00:00:00 2001 From: "copilot-swe-agent[bot]" <198982749+Copilot@users.noreply.github.com> Date: Tue, 31 Mar 2026 09:23:19 +0000 Subject: [PATCH] =?UTF-8?q?fix:=20=E5=9F=9F=E5=90=8D=E4=BF=AE=E6=AD=A3=20g?= =?UTF-8?q?uanghu.online=20=E2=86=92=20guanghulab.online=20+=20CN=E4=B8=AD?= =?UTF-8?q?=E8=BD=ACNginx=20stream=E5=8A=A8=E6=80=81=E6=A8=A1=E5=9D=97?= =?UTF-8?q?=E5=8A=A0=E8=BD=BD=E4=BF=AE=E5=A4=8D?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Agent-Logs-Url: https://github.com/qinfendebingshuo/guanghulab/sessions/b50bddfa-167a-4a14-afda-39a2c2afd592 Co-authored-by: qinfendebingshuo <207279273+qinfendebingshuo@users.noreply.github.com> --- .../workflows/deploy-to-zhuyuan-server.yml | 4 +-- .github/workflows/staging-auto-deploy.yml | 2 +- README.md | 2 +- brain/fast-wake.json | 2 +- brain/hololake-os-architecture.md | 2 +- docs/SSL-GUIDE-FOR-BINGSUO.md | 10 +++---- server/nginx/zhuyuan-sovereign.conf | 2 +- server/proxy/setup/setup-cn-relay.sh | 29 ++++++++++++++++++- server/setup/setup-ssl.sh | 8 ++--- 9 files changed, 44 insertions(+), 17 deletions(-) diff --git a/.github/workflows/deploy-to-zhuyuan-server.yml b/.github/workflows/deploy-to-zhuyuan-server.yml index 8e917788..8df30b36 100644 --- a/.github/workflows/deploy-to-zhuyuan-server.yml +++ b/.github/workflows/deploy-to-zhuyuan-server.yml @@ -34,7 +34,7 @@ on: - preview - production ssl_domain: - description: 'SSL域名 (仅setup-ssl时需要,如: guanghu.online)' + description: 'SSL域名 (仅setup-ssl时需要,如: guanghulab.online)' required: false type: string @@ -390,7 +390,7 @@ jobs: echo "❌ 未指定SSL域名" echo "" echo "请在触发工作流时填写 ssl_domain 参数" - echo "例如: guanghu.online" + echo "例如: guanghulab.online" exit 1 fi diff --git a/.github/workflows/staging-auto-deploy.yml b/.github/workflows/staging-auto-deploy.yml index 4135705c..5d26bec9 100644 --- a/.github/workflows/staging-auto-deploy.yml +++ b/.github/workflows/staging-auto-deploy.yml @@ -5,7 +5,7 @@ # 🚀 铸渊智能运维 · 测试站自动部署 # # 架构说明 (冰朔第十五次对话提出): -# PR合并到main → 自动部署到测试站(guanghu.online) +# PR合并到main → 自动部署到测试站(guanghulab.online) # → Agent健康检查 → 日志分析(简单→LLM深度) # → 失败自动重试(最多3次) → 超限邮件告警冰朔 # → 成功自动归档工单 → 更新铸渊数据库 diff --git a/README.md b/README.md index 3fa25e16..8c43b5d1 100644 --- a/README.md +++ b/README.md @@ -228,7 +228,7 @@ **操作步骤(3步):** 1. 打开 Actions 页面: `https://github.com/qinfendebingshuo/guanghulab/actions` 2. 点击左侧的 **🏛️ 铸渊主权服务器 · 部署** -3. 点击 **Run workflow** → 选择 `setup-ssl` → 在SSL域名里输入 `guanghu.online` → 点击绿色按钮 +3. 点击 **Run workflow** → 选择 `setup-ssl` → 在SSL域名里输入 `guanghulab.online` → 点击绿色按钮 等待1-3分钟变绿即可。你的测试站就有HTTPS了! diff --git a/brain/fast-wake.json b/brain/fast-wake.json index a56032c2..09600d37 100644 --- a/brain/fast-wake.json +++ b/brain/fast-wake.json @@ -47,7 +47,7 @@ "snapshot_id": "CS-20260331-0655", "saved_at": "2026-03-31T06:55:00Z", "growth": "冰朔第十六次对话·SSL自动化v1.0·使用Let's Encrypt免费证书·certbot自动获取+续期·不需要手动配置SSL密钥·创建setup-ssl.sh脚本+workflow动作+冰朔操作指南·v23.0", - "next_task": "冰朔合并PR后→触发setup-ssl配置guanghu.online的HTTPS→P0配额监控+P1代码复用库", + "next_task": "冰朔合并PR后→触发setup-ssl配置guanghulab.online的HTTPS→P0配额监控+P1代码复用库", "pending": [] }, "active_systems": { diff --git a/brain/hololake-os-architecture.md b/brain/hololake-os-architecture.md index 5724a2fc..9cbf81d2 100644 --- a/brain/hololake-os-architecture.md +++ b/brain/hololake-os-architecture.md @@ -374,7 +374,7 @@ | 域名 | 用途 | 备案状态 | |------|------|----------| | `hololake.com` | 光湖操作系统·正式站 | 需接入备案到腾讯云 | -| `guanghu.online` | 预览站 | - | +| `guanghulab.online` | 预览站 | - | | `guanghuage.com` | 网文行业站(肥猫团队) | 需确认 | --- diff --git a/docs/SSL-GUIDE-FOR-BINGSUO.md b/docs/SSL-GUIDE-FOR-BINGSUO.md index 2c226ce3..9bdce07a 100644 --- a/docs/SSL-GUIDE-FOR-BINGSUO.md +++ b/docs/SSL-GUIDE-FOR-BINGSUO.md @@ -60,14 +60,14 @@ 2. 在弹出的下拉框中: - **Branch**: 保持 `main` 不变 - **部署动作**: 选择 **`setup-ssl`** - - **SSL域名**: 输入 **`guanghu.online`**(这是测试站域名) + - **SSL域名**: 输入 **`guanghulab.online`**(这是测试站域名) 3. 点击绿色的 **「Run workflow」** 按钮 ### 第③步:等待完成 1. 页面会出现一个新的工作流运行(黄色圆圈 = 运行中) 2. 等待它变成 **绿色✅**(大约1-3分钟) -3. 完成!你的测试站 `guanghu.online` 现在已经是 HTTPS 了 +3. 完成!你的测试站 `guanghulab.online` 现在已经是 HTTPS 了 --- @@ -75,7 +75,7 @@ 打开浏览器,访问: ``` -https://guanghu.online +https://guanghulab.online ``` 如果地址栏显示 🔒 锁标志,说明SSL配置成功。 @@ -98,7 +98,7 @@ https://guanghu.online **检查方法**: 1. 打开 https://www.whatsmydns.net/ -2. 输入你的域名(如 `guanghu.online`) +2. 输入你的域名(如 `guanghulab.online`) 3. 查看它指向的IP是否是 `43.134.16.246`(新加坡服务器) 如果IP不对,需要去域名提供商的管理面板修改DNS解析。 @@ -149,7 +149,7 @@ CN中转 (广州→新加坡): ### ⚠️ dest为什么必须指向microsoft.com? Reality协议的`dest`是GFW反探测的关键。当GFW探测443端口时: - 正确: `dest: "www.microsoft.com:443"` → 返回Microsoft真实证书 → 通过 -- 错误: `dest: "127.0.0.1:8443"` → 返回guanghu.online证书 → 与SNI(microsoft.com)不匹配 → 被标记为可疑 → VPN被封 +- 错误: `dest: "127.0.0.1:8443"` → 返回guanghulab.online证书 → 与SNI(microsoft.com)不匹配 → 被标记为可疑 → VPN被封 ### 关键配置 - **Xray配置**: `server/proxy/config/xray-config-template.json` → `dest: "www.microsoft.com:443"` diff --git a/server/nginx/zhuyuan-sovereign.conf b/server/nginx/zhuyuan-sovereign.conf index 01342046..8f7c98c0 100644 --- a/server/nginx/zhuyuan-sovereign.conf +++ b/server/nginx/zhuyuan-sovereign.conf @@ -215,7 +215,7 @@ server { # # ⚠️ 为什么dest不能指向127.0.0.1:8443? # GFW探测时会检查TLS证书是否匹配serverNames (www.microsoft.com) -# 如果dest返回guanghu.online的证书 → 证书不匹配 → 被标记为可疑 → VPN被封 +# 如果dest返回guanghulab.online的证书 → 证书不匹配 → 被标记为可疑 → VPN被封 # 所以dest必须指向真实的microsoft.com以通过反探测 # # CN中转架构 (广州→新加坡): diff --git a/server/proxy/setup/setup-cn-relay.sh b/server/proxy/setup/setup-cn-relay.sh index 68dc64c1..7dd034d8 100644 --- a/server/proxy/setup/setup-cn-relay.sh +++ b/server/proxy/setup/setup-cn-relay.sh @@ -84,6 +84,34 @@ else fi fi +# 检查是否需要动态加载stream模块 +# Ubuntu/Debian的Nginx通常将stream编译为动态模块(.so),需要用load_module显式加载 +NGINX_MAIN="/etc/nginx/nginx.conf" +STREAM_MODULE_PATH="" +for mod_path in \ + /usr/lib/nginx/modules/ngx_stream_module.so \ + /usr/lib64/nginx/modules/ngx_stream_module.so \ + /etc/nginx/modules/ngx_stream_module.so; do + if [ -f "$mod_path" ]; then + STREAM_MODULE_PATH="$mod_path" + break + fi +done + +if [ -n "$STREAM_MODULE_PATH" ]; then + if ! grep -q "ngx_stream_module" "$NGINX_MAIN" 2>/dev/null; then + log_info "加载stream动态模块: $STREAM_MODULE_PATH" + # load_module必须在nginx.conf最顶部(events块之前) + sed -i "1i load_module $STREAM_MODULE_PATH;" "$NGINX_MAIN" + log_info "✅ stream动态模块已加载" + else + log_info "✅ stream动态模块已在配置中" + fi +else + # 没有找到.so文件,可能是静态编译的,继续 + log_info "stream模块为静态编译或路径非标准,跳过load_module" +fi + # ── §2 配置Nginx stream中转 ────────────────── log_step "§2 配置TCP中转 (端口$RELAY_PORT → $SG_HOST:443)" @@ -115,7 +143,6 @@ STREAMCONF log_info "✅ Stream中转配置已创建" # 确保主Nginx配置包含stream块 -NGINX_MAIN="/etc/nginx/nginx.conf" if ! grep -q "stream-conf.d" "$NGINX_MAIN" 2>/dev/null; then log_info "添加stream块到nginx.conf..." diff --git a/server/setup/setup-ssl.sh b/server/setup/setup-ssl.sh index 4584e42d..4ddc3a80 100644 --- a/server/setup/setup-ssl.sh +++ b/server/setup/setup-ssl.sh @@ -14,7 +14,7 @@ # # 用法: # sudo bash setup-ssl.sh <域名> [邮箱] -# sudo bash setup-ssl.sh guanghu.online admin@guanghu.online +# sudo bash setup-ssl.sh guanghulab.online admin@guanghulab.online # sudo bash setup-ssl.sh --all # 配置所有已知域名 # # 前提条件: @@ -525,7 +525,7 @@ main() { if [ ${#domains[@]} -eq 0 ]; then log_error "未找到已配置的域名" - log_warn "请指定域名: sudo bash $0 guanghu.online" + log_warn "请指定域名: sudo bash $0 guanghulab.online" exit 1 fi @@ -541,8 +541,8 @@ main() { echo " sudo bash $0 <域名> [邮箱]" echo "" echo "示例:" - echo " sudo bash $0 guanghu.online" - echo " sudo bash $0 guanghu.online admin@guanghu.online" + echo " sudo bash $0 guanghulab.online" + echo " sudo bash $0 guanghulab.online admin@guanghulab.online" echo " sudo bash $0 --all # 配置所有已知域名" echo "" echo "说明:"