Skip to content

08. 日常速查:核心配置文件与故障自愈清单 ​

本章为日常运维、版本迁移与紧急排错的速查备忘手册。


一、核心配置文件物理路径清单 ​

组件所在机器物理路径主要作用
WSL 宿主设置家里 WindowsC:\Users\<username>\.wslconfig内存上限 (10G)、自动收缩、永不休眠
WSL 内部设置家里 Ubuntu/etc/wsl.confSystemd 支持、磁盘权限与互通
OpenCode 配置家里 Ubuntu~/.config/opencode/opencode.jsonc模型 Provider、CLIProxyAPI 聚合参数
OpenCode 服务家里 Ubuntu/etc/systemd/system/opencode.service7×24 小时开机自启守护与访问密码
FRP 客户端家里 Ubuntu/etc/frp/frpc.toml跨网隧道映射 (4096 / 2222 / 33890)
FRP 客户端服务家里 Ubuntu/etc/systemd/system/frpc.service客户端后台自启与自愈
FRP 服务端香港轻量云/etc/frp/frps.tomlFRP 服务端监听与 Token
Nginx 反代配置香港轻量云/etc/nginx/sites-available/opencode8443 SSL 回落反代至 OpenCode
CLIProxyAPI东京轻量云~/cliproxyapi/config.yaml大模型聚合代理与 WARP SOCKS5 出口
WARP 客户端东京轻量云warp-cli (Proxy 模式 127.0.0.1:40000)破除 Google 机房 IP 风控
Xray REALITY 核心东京轻量云/usr/local/etc/xray/config.json443 监听、XTLS Vision、WARP 出站路由
Xray 运维脚手架东京轻量云/root/xray-reality-manager.sh交互菜单、多设备 UUID、健康检查与自愈
Nginx 伪装站点东京轻量云/etc/nginx/sites-available/<domain>127.0.0.1:8443 SSL Decoy + PROXY 真实 IP
Waline 评论服务Vercel Serverlessblog-comment (GitHub 托管)评论后端、鉴权、/api/upload COS 转存
评论数据库腾讯云轻量数据库MySQL 8.0 (waline 库,端口 25965)持久化存储用户、评论正文与统计数据
评论配图存储腾讯云 COS对象存储桶 (tech-blog-img-...)公有读私有写,存放 WebP 压缩配图

二、日常巡检常用命令 ​

1. 家里 Ubuntu 侧 ​

bash
# 查看 OpenCode 状态与端口
sudo systemctl status opencode
sudo ss -tulpn | grep 4096

# 查看 FRP 客户端连接状态
sudo systemctl status frpc
sudo journalctl -u frpc -n 20 --no-pager

2. 香港中继服务器侧 ​

bash
# 查看 FRP 服务端与 Nginx
sudo systemctl status frps
sudo nginx -t && sudo systemctl reload nginx
sudo ss -tulpn | grep -E "7000|8443|443"

3. 东京前哨与算力网关侧 ​

bash
# 查看模型聚合服务与出站代理
systemctl --user status cliproxyapi.service
warp-cli status
curl -x socks5h://127.0.0.1:40000 ifconfig.me

# Xray 节点服务与健康检查
sudo bash /root/xray-reality-manager.sh health
sudo ss -lntp | grep -E ":80|:443|:8443"

三、三类最常见故障的一句话自愈指南 ​

  1. 调用模型报 User location is not supported:
    • ➔ 原因:东京机器上的 WARP 代理断开,回落到了机房原生 IP。
    • ➔ 解决:在东京服务器执行 warp-cli connect,并确认模式为 proxy。
  2. 手机/Mac 访问网页显示 401 Unauthorized 或密码错误:
    • ➔ 原因:请求成功到达 OpenCode,但凭据未通过。
    • ➔ 解决:核对密码;若使用免密通道,重新访问一次 https://code.your-domain.com/login?key=你的密钥 重新种下 Cookie。
  3. 网页无法打开(连接超时):
    • ➔ 原因:家里宽带断网、或香港 FRP 客户端未连上。
    • ➔ 解决:在家里 Ubuntu 执行 sudo systemctl restart frpc,看 journalctl 日志提示。

基于 MIT 协议开源发布 | 配套 10 分钟实战视频