Skip to content

feat(cli): default to port 6565 when no port given for --connect and --listen#15

Merged
maxholman merged 1 commit into
block65:mainfrom
maxholman:feat/default-connect-port
Feb 20, 2026
Merged

feat(cli): default to port 6565 when no port given for --connect and --listen#15
maxholman merged 1 commit into
block65:mainfrom
maxholman:feat/default-connect-port

Conversation

@maxholman

@maxholman maxholman commented Feb 20, 2026

Copy link
Copy Markdown
Contributor

Title

feat(cli): default to port 6565 when no port given for --connect and --listen

Type

feat

Scope

CLI address parsing — crates/cli

Out of scope

Transport, protocol, server config changes

Why

--connect attacker fails with a cryptic format error instead of defaulting
to the canonical port. DEFAULT_LISTEN_PORT (6565) is already used as the
default for --listen — apply the same logic to --connect.

…--listen

When an address spec contains no port, append the canonical DEFAULT_LISTEN_PORT
(6565). Bracketed IPv6 addresses ([::1]) are handled separately — a port is
only considered present when `]:` follows the closing bracket, avoiding the
false positive from colons in the IPv6 address itself.

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
@maxholman maxholman merged commit 3343d10 into block65:main Feb 20, 2026
4 checks passed
maxholman added a commit that referenced this pull request Feb 23, 2026
session.rs was not declared in lib.rs — completely unreachable dead code.
OutputFormat::Json printed the literal string "{ json_output }" — removed
the variant and the stub. Closes oopsies #14 and #15.

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
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.

1 participant