Fix #215: external SSH port config #222

Merged
crueber merged 2 commits from fix/issue-215 into main 2026-09-09 00:30:39 +00:00
Owner

Implements Forgejo issue #215: the external SSH port is now configurable in setup while the server keeps listening internally.

What: new server.ssh.external_port (0 = the listen port, so unset behavior is identical). Summary, overview, and placeholder-create responses advertise ssh_clone_url (public hostname at the advertised port, :22 omitted, absent while SSH is disabled); the clone menu + empty-repo guide show it verbatim; setup UI field (visible, with working example 12222 accepted by /api/v1/setup/test).

Verified: Go gates on touched packages (config/api/server, -race, cover >= 95%), full node --test (431 pass), real-browser CDP drive: SSH tab shows ssh://git@host:12222/… with zero console errors; setup page lists the new key. Docs updated: 17_ssh.md (§3 + decision 17.5), 11_config_cli.md, 07_api.md, 12_web_ui.md.

Implements Forgejo issue #215: the external SSH port is now configurable in setup while the server keeps listening internally. **What:** new `server.ssh.external_port` (0 = the listen port, so unset behavior is identical). Summary, overview, and placeholder-create responses advertise `ssh_clone_url` (public hostname at the advertised port, `:22` omitted, absent while SSH is disabled); the clone menu + empty-repo guide show it verbatim; setup UI field (visible, with working example `12222` accepted by `/api/v1/setup/test`). **Verified:** Go gates on touched packages (config/api/server, -race, cover >= 95%), full `node --test` (431 pass), real-browser CDP drive: SSH tab shows `ssh://git@host:12222/…` with zero console errors; setup page lists the new key. Docs updated: 17_ssh.md (§3 + decision 17.5), 11_config_cli.md, 07_api.md, 12_web_ui.md.
server.ssh.external_port advertises the public SSH port in ssh:// clone
URLs (0 = the listen port, so unset behavior is identical); summary,
overview, and placeholder-create responses carry ssh_clone_url and the
clone menu + empty-repo guide show it verbatim. Setup field with working
example 12222, validated client-side and by /api/v1/setup/test.
The placeholder-create 201/200 body gained ssh_clone_url (placeholder.go
writeCreateJSON) but 07_api.md's create-body enumeration still listed only
clone_url/html_url. Additive per 14 section 14.12.
Sign in to join this conversation.
No description provided.