fix: bind 0.0.0.0 by default so remote devices can access OCM

- server.listen was hardcoded to 127.0.0.1, causing ERR_CONNECTION_REFUSED on remote access
- Default to 0.0.0.0, add --host flag to override (e.g. --host 127.0.0.1 for local-only)
- Show LAN IP in startup log for easy remote access
- Startup log and error messages switched to English
- Bump version to v0.5.2

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
This commit is contained in:
2026-02-25 10:12:36 +00:00
co-authored by Claude Opus 4.6
parent 6cca232e9e
commit e38f91ec4a
4 changed files with 57 additions and 17 deletions
+20 -1
View File
@@ -1,7 +1,26 @@
# OpenClaw Manager — 开发日志
> 最后更新:2026-02-25
> 当前版本:v0.5.1
> 当前版本:v0.5.2
---
## v0.5.2 更新日志(2026-02-25
### 修复
**远程访问无法连接(ERR_CONNECTION_REFUSED**
- `server.listen` 原来绑定 `127.0.0.1`(仅本机),远程通过 `http://<IP>:3333` 访问时被直接拒绝
- 改为默认绑定 `0.0.0.0`(所有网卡),远程设备可通过局域网 IP 访问
- 新增 `--host` 命令行参数:需要限制仅本机访问时可用 `--host 127.0.0.1` 覆盖
- 新增 `getLanIP()` 工具函数,自动检测第一个非内部 IPv4 地址
### 改进
**启动日志改为英文**
- 终端启动信息(目录、地址、提示、错误)全部改为英文
- 绑定 `0.0.0.0` 时自动显示局域网地址,方便远程复制:`🌐 LAN: http://192.168.x.x:3333`
- 端口占用、启动失败等错误提示同步改为英文
---