Skip to content

remote_gateway: add TCP OpenKore endpoint mode, PowerShell starter and docs for Windows/pt-BR#18

Closed
boscv wants to merge 1 commit into
codex/find-remote-control-plugin-for-korefrom
codex/document-remote-access-setup-for-openkore-t2rf1i
Closed

remote_gateway: add TCP OpenKore endpoint mode, PowerShell starter and docs for Windows/pt-BR#18
boscv wants to merge 1 commit into
codex/find-remote-control-plugin-for-korefrom
codex/document-remote-access-setup-for-openkore-t2rf1i

Conversation

@boscv
Copy link
Copy Markdown
Owner

@boscv boscv commented Apr 15, 2026

Motivation

  • Add support for connecting the remote gateway to OpenKore over TCP in addition to the existing Unix socket mode to improve Windows and cross-host compatibility.
  • Provide user-facing documentation and a convenience startup script for Windows users and Portuguese-speaking operators to simplify setup and reduce configuration errors.

Description

  • tools/remote_gateway.pl: added --kore-host and --kore-port flags and logic to connect via IO::Socket::INET when both are provided, while keeping Unix socket support when available, plus runtime validation and endpoint reporting via kore_endpoint_string() and health payload updates.
  • Improved runtime robustness by detecting availability of Unix sockets, handling SIGPIPE, and providing clearer error messages when arguments are invalid or Unix sockets are unavailable.
  • Updated health/readiness payload and log messages to include the chosen OpenKore endpoint and added config fields kore_host, kore_port, and kore_endpoint.
  • Documentation updates: added TCP usage notes to docs/gateway-core.md and a small --kore-host/--kore-port mention to docs/deploy-hardening.md.
  • New user docs: added docs/guia-acesso-remoto-pt-br.md (full Portuguese guide) and docs/guia-acesso-remoto-windows-nativo.md (Windows-native guide).
  • New helper: added tools/start-gateway.ps1 PowerShell 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

  • No automated test run was performed as part of this change; please run the smoke/unit checks: perl src/test/unittests.pl RemoteGatewaySmokeTest and ./tools/check_gateway_release.sh in your environment to validate the gateway startup and basic flows.

Codex Task

Copy link
Copy Markdown

@chatgpt-codex-connector chatgpt-codex-connector Bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

💡 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".

Comment thread tools/remote_gateway.pl
Comment on lines +1066 to +1067
if (($kore_host eq '') != ($kore_port == 0)) {
die "Invalid arguments: use both --kore-host and --kore-port together, or neither\n";
Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

P2 Badge 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 👍 / 👎.

@boscv boscv closed this Apr 15, 2026
@boscv boscv deleted the codex/document-remote-access-setup-for-openkore-t2rf1i branch April 15, 2026 19:36
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant