remote_gateway: add TCP OpenKore endpoint mode, PowerShell starter and docs for Windows/pt-BR#18
Conversation
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: 0abcd1198e
ℹ️ About Codex in GitHub
Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you
- Open a pull request for review
- Mark a draft as ready
- Comment "@codex review".
If Codex has suggestions, it will comment; otherwise it will react with 👍.
Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".
| if (($kore_host eq '') != ($kore_port == 0)) { | ||
| die "Invalid arguments: use both --kore-host and --kore-port together, or neither\n"; |
There was a problem hiding this comment.
Validate
--kore-port range before starting gateway
The new TCP argument validation only checks whether --kore-port is zero, so invalid values like -1 or 70000 are accepted instead of failing fast. In practice this leads to incorrect behavior: negative ports skip TCP mode and silently fall back to Unix socket logic, while ports above 65535 are truncated by IO::Socket::INET (e.g. 70000 -> 4464), which can make the gateway target an unintended endpoint. This should reject any TCP port outside 1..65535 when --kore-host is provided.
Useful? React with 👍 / 👎.
Motivation
Description
tools/remote_gateway.pl: added--kore-hostand--kore-portflags and logic to connect viaIO::Socket::INETwhen both are provided, while keeping Unix socket support when available, plus runtime validation and endpoint reporting viakore_endpoint_string()and health payload updates.SIGPIPE, and providing clearer error messages when arguments are invalid or Unix sockets are unavailable.kore_host,kore_port, andkore_endpoint.docs/gateway-core.mdand a small--kore-host/--kore-portmention todocs/deploy-hardening.md.docs/guia-acesso-remoto-pt-br.md(full Portuguese guide) anddocs/guia-acesso-remoto-windows-nativo.md(Windows-native guide).tools/start-gateway.ps1PowerShell script that bootstraps Windows deployment (auto-creates config/log/data dirs, copies user template, validates args, starts the gateway in TCP mode and performs a health check).Testing
perl src/test/unittests.pl RemoteGatewaySmokeTestand./tools/check_gateway_release.shin your environment to validate the gateway startup and basic flows.Codex Task