Skip to content

fix: read gateway port from config instead of hardcoded 18789#53

Open
ktjysu wants to merge 2 commits into
miaoxworld:mainfrom
ktjysu:fix/issue-51-dynamic-port
Open

fix: read gateway port from config instead of hardcoded 18789#53
ktjysu wants to merge 2 commits into
miaoxworld:mainfrom
ktjysu:fix/issue-51-dynamic-port

Conversation

@ktjysu

@ktjysu ktjysu commented Mar 28, 2026

Copy link
Copy Markdown

ktjysu added 2 commits March 28, 2026 14:21
- Add get_gateway_port() function to read gateway.port from openclaw.json
- Replace hardcoded port 18789 with dynamic port in:
  - shell.rs: spawn_openclaw_gateway()
  - service.rs: service status/start/stop
  - config.rs: get_dashboard_url()
  - process.rs: check_port_in_use()
  - diagnostics.rs: security checks
Closes miaoxworld#51
- Add regex to extract version number from full output (format: 202X.XX.XX)
- Support various output formats: "OpenClaw 2026.3.24 (cff6dc9)", "2026.3.24", "v2026.3.24"
- Fix version comparison logic when versions are identical but full output differs
- Add regex dependency
@ktjysu ktjysu force-pushed the fix/issue-51-dynamic-port branch from f302e9b to 140f5e1 Compare March 28, 2026 08:20
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

openclaw服务端口写死了,我是用的别的端口,它没识别出来

1 participant