Commit Graph

10 Commits

Author SHA1 Message Date
a6b5513f88 docs+chore: 部署脚本入库、README 补零停机部署与部署物料清单
仓库此前缺少部署脚本,只能靠临时文件操作,新人无法复现。补齐:

- deploy/zd.sh:零停机部署(新容器先在对侧端口验证到底,含 /search 预热
  SearXNG;再同 inode 覆写门户上游 + nginx -t + reload;切后哨兵"不得为 502";
  失败自动回滚,旧容器保留为回滚点)。可用环境变量覆盖主机/路径/镜像。
- deploy/verify-ui.js:部署后浏览器验收(渲染开销、后台窄屏、收边两段式、
  被拒内嵌弹层、分组增删改与「历史访问」保护)。任一运行时异常即判失败。

README 新增:
- 「零停机部署」含**单文件 bind mount 不能用 sed -i** 的坑(换 inode → 容器读到
  旧值 → 全站 502,本项目真实踩过)与正确顺序(同 inode 覆写 → 断言容器看到 →
  nginx -t → reload)
- 「部署需要的全部自定义文件」清单表
- 「管理后台」补分组自由增删、历史分组保护、完整 API 表
- 「工作空间视图」补可内嵌性三态探测(转发 Cookie、WAF 403 误判)、被拒弹层、
  悬浮控件收边与"第一次交互只滑出"
2026-09-11 20:13:44 +08:00
6fd62d4949 docs: note that the install page shows the sync token
安装引导页已展示服务地址与同步令牌;README 补充说明令牌来源
(/admin/api/sync-info,位于门户登录墙内,不能挂在被放行的 /api/ 下)。
2026-09-11 11:52:17 +08:00
aa237868c1 feat(deploy): let data volume override SearXNG settings
SearXNG 的配置原本只能靠镜像内置的 /etc/searxng/settings.yml,
于是代理(outgoing.proxies)这类部署相关配置每次重建容器都会丢,
改配置也必须重建镜像。

改为:容器启动时若存在 /app/data/searxng-settings.yml 就用它,
否则回退到镜像内置配置。用 sh -c 包一层是因为 supervisord 的
environment= 不支持条件判断。

注意必须带 [ -f ] 判断:实测 SEARXNG_SETTINGS_PATH 指向不存在的
文件时 SearXNG 会直接报错退出(PermissionError: ... not exists!)。

已验证:SEARXNG_SETTINGS_PATH 指向自造配置能正确覆盖端口与实例名。
README 补充配置优先级与数据卷备份清单。
2026-09-11 11:09:33 +08:00
73396cd5d4 docs: document NAVI_FAVICON_PROXY and pass it through compose
新增的 favicon 抓取代理变量此前只存在于代码里:
- .env.example 补充说明与示例(默认留空,自动复用 SearXNG 的 outgoing.proxies)
- docker-compose.yml 透传该变量
- README 环境变量表补一行
2026-09-11 11:00:40 +08:00
e7ea091e19 fix(history): give history entries real site favicons
历史条目的图标原先写死 fas fa-globe,整栏都是地球图标。

- 新增 history-server/favicon.go:后台抓取每个 host 的 favicon 并缓存到
  data/item-icons/,命中后 conf.yml 写本地文件名,与手工图标同一套解析。
  抓取顺序 <host>/favicon.ico → 首页 <link rel=icon>;3 个 worker,
  失败 6 小时后再试;完成后合并触发一次 conf.yml 重建。
- 只缓存 Dashy 能渲染的格式:其 isImage() 白名单是 [svg,png,jpg],
  写 .ico 进去完全渲染不出来。因此 .ico 先抽内嵌 PNG,若是传统 BMP/DIB
  编码则解码后转 PNG(Google 这类站点只给老式 .ico)。
- 内网地址用 host:port 区分(不同端口的服务不再共用一个图标),且只直连;
  外网站点直连失败时自动复用 SearXNG outgoing.proxies 的代理,
  也可用 NAVI_FAVICON_PROXY 覆盖。
- 修掉一个真实缺陷:导航项都没有访问数据时,原来会提前 return 并把
  「历史访问」清成只剩安装入口 —— 只浏览站外站点时真实历史会整个消失。
  现在只冻结「常用服务」,历史照常生成。
- Dockerfile 去掉 # syntax=docker/dockerfile:1:该指令会让 BuildKit 去 pull
  docker/dockerfile 前端镜像,无外网环境直接构建失败;本文件未用 BuildKit 语法。

实测:6/6 站点(含 google.com 的 DIB 型 ico、github.com、docker.com、
news.ycombinator.com 与两个内网服务)均得到真实图标,页面 naturalWidth>0。
2026-09-11 10:55:00 +08:00
ff0e6418f8 feat(nav): auto-detect browser extension and offer one-click install
导航页现在会自动检测浏览历史插件是否已安装:

- 扩展在用户配置的服务地址上动态注册 content script
  (Chrome: chrome.scripting.registerContentScripts,
   Firefox: browser.contentScripts.register),
  于 document_start 给 <html> 打上 data-navi-ext 标记,
  不在其他站点运行。
- history-server 始终把「安装浏览历史插件」放在「历史访问」第一条
  (入口 url=/extension/install.html),启动时也会重建一次,
  不再需要等下一次同步。
- web/navi.js 读到标记后隐藏该入口(连 .item-wrapper 一起隐藏,
  避免留下空网格位)。
- 新增 /extension/install.html:自动识别浏览器,给出对应安装包与步骤;
  支持在 data 卷放 extension-store.json 配置商店链接,
  有商店链接时显示真正的「一键安装」。
- 段落名匹配同时兼容中英文(常用服务/Favorites、历史访问/History),
  修掉了公开示例 conf.yml 用英文名时重建逻辑完全失效的问题。
- 扩展升到 1.1.0(新增 scripting 权限与 detect.js)。

Note: Chrome/Edge 不允许从网站直接安装非商店扩展,
因此自托管场景下只能下载后手动加载;发布到商店后才会出现一键安装。
2026-09-11 10:41:10 +08:00
88e23861fe fix(search): repair SearXNG engine failures
- bing: www.bing.com 302-redirects to cn.bing.com and SearXNG engine
  requests do not follow redirects, so it parsed the 178-byte redirect
  page and returned 0 results without any error report. Point bing at
  https://cn.bing.com to bypass the redirect.
- Raise outgoing request_timeout 3.0 -> 8.0 and max_request_timeout
  4.0 -> 15.0. max_request_timeout overrides each engine's own timeout,
  so 360search (timeout 20s) was still cut off at 4s.
- Enable duckduckgo (verified working) and disable baidu/sogou which
  return 302 verification pages (baidu also hits a 1h CAPTCHA ban, and
  sogou raises AttributeError on SXNG_Response.next_request).
- Document the diagnosis in the README FAQ.
2026-09-11 10:26:32 +08:00
33564fb8f5 docs: complete deployment tutorial + frp/webui4frpc guide, expand .env/docker-compose for tokens & base_url
- Rewrite quick-start for source clone & build (A: compose, B: docker run)
- Expand frp section: full frps.toml, webui4frpc WebUI workflow, native frpc.toml, tunnel planning table
- docker-compose: NAVI_PORT / SEARXNG_BASE_URL env passthrough, better docs
- .env.example: document all vars incl token generation & base_url
- Fix firefox debugging URL typo, extension token note
2026-09-08 22:39:52 +08:00
76a4265222 docs: fully sanitize README (remove host identifiers .60/.106) 2026-09-08 22:25:57 +08:00
7e49d2b51c feat: HomeDash - unified self-hosted navigation portal
Single-container navigation service combining:
- Dashy dashboard + SearXNG metasearch + history sync API + admin WebUI
- Go services for history/admin APIs, nginx as unified entry
- Browser extensions (Chrome MV3 / Firefox MV2) with 30s batched sync
- Production guide: portal-nginx unified auth reverse proxy + webui4frpc/frp tunnel
- Fully sanitized (no internal IPs/domains/credentials)
2026-09-08 22:25:00 +08:00