Files
jiedian/docs/troubleshooting.md
T
dekun cd0639d55c Initial commit: sing-box Reality + Hysteria2 deploy for 66.hyf2.cc
Ubuntu deployment at /opt/jiedian with pre-filled env for 47.76.87.111.

Co-authored-by: Cursor <cursoragent@cursor.com>
2026-06-16 08:21:49 +08:00

76 lines
1.9 KiB
Markdown
Raw Blame History

This file contains ambiguous Unicode characters
This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.
# 运维与故障排查
## 服务检查
```bash
# sing-box 是否运行
systemctl is-active sing-box
# 配置语法
sing-box check -c /etc/sing-box/config.json
# 端口监听
ss -tlnp | grep 443 # Reality TCP
ss -ulnp | grep 8443 # Hysteria2 UDP
# Nginx fallback
curl -s http://127.0.0.1:8080
```
## 常见问题
### acme.sh 证书申请失败
```bash
# 确认 DNS 已生效
dig +short A your.domain.com
# 确认 80 端口未被占用(nginx 需先启动)
ss -tlnp | grep :80
# 手动重试
/root/.acme.sh/acme.sh --issue -d your.domain.com --nginx --force
```
### sing-box 无法启动
```bash
journalctl -u sing-box -n 50 --no-pager
```
常见原因:证书路径错误、JSON 语法错误、443 被占用。
### 客户端能连但速度慢
- 换 Hysteria2 节点(UDP/QUIC 抗丢包)
- 检查 VPS 带宽:`wget -O /dev/null http://speedtest.tele2.net/100MB.zip`
- 避免高峰时段长时间 4K 流媒体
### IP 被封
1. 向 VPS 商申请更换 IP
2. 修改 `.env``REALITY_SERVER_NAME` 为其他大站(如 `www.apple.com`
3. 重新运行 `install.sh` 或手动更新 `/etc/sing-box/config.json` 并 restart
### 改用 Xray 替代 sing-box(可选)
若更熟悉 Xray,可使用 `server/xray-server.json.template`
```bash
# 安装 Xray
bash -c "$(curl -L https://github.com/XTLS/Xray-install/raw/main/install-release.sh)" @ install
# 渲染配置
sed -e "s|\${UUID}|...|g" ... server/xray-server.json.template > /usr/local/etc/xray/config.json
systemctl restart xray
```
Hysteria2 仍需单独部署(或使用 sing-box 仅跑 Hy2 inbound)。
## 安全建议
- SSH 改用密钥登录,禁用密码:`PermitRootLogin prohibit-password`
- 可选修改 SSH 端口,ufw 放行新端口后再删 22
- 不要将 `.env``share-links.txt` 上传到公开仓库