aboutsummaryrefslogtreecommitdiff
path: root/app/cli.go
Commit message (Collapse)AuthorAgeFilesLines
* fix: harden HTTP transport, server timeouts and panic pathsChristian Cleberg2026-07-151-10/+23
| | | | | | | | | | | | | | | | | | | | | | | | | | Correctness and security findings surfaced by golangci-lint, plus two latent panics found alongside them. - router: http.ListenAndServe has no timeouts at all (gosec G114), so a slow client could hold a connection and its handler open indefinitely. Replace it with an explicit http.Server carrying read/write/idle timeouts. - httpclient: InstallDAThrottle asserted http.DefaultTransport was a *http.Transport and would panic outright if anything had already wrapped it -- which is precisely what that function does. Check the assertion and fall back to a fresh transport. Expose ProxiedTransport so a configured download-proxy can inherit the same throttle and timeouts instead of silently bypassing them. - cache: the Sys() assertion to *syscall.Stat_t is only valid on unix and would panic elsewhere; skip rotation instead. Indexing Headers["Content-Type"][0] panics when the header is absent; use Headers.Get. Cache files are written 0600 rather than 0700, as they are never executed. - cli, api: check error returns, and exit rather than nil-dereference a file handle that failed to open. SHA-1 and math/rand keep //nolint:gosec with reasons: they are cache-key hashes and random-artwork picks, not security primitives.
* fix: point source links and instance fetch at this forkChristian Cleberg2026-07-141-2/+2
| | | | | | | | | | | | | | | Upstream references still pointed at git.macaw.me, which is unmaintained and whose instances.json is a dead link. Repoint them at this repo: - RefreshInstances now fetches instances.json from raw.githubusercontent - source/version links in index.htm, about.htm, and CLI help use the GitHub releases tag URL - SETUP.md/SETUP-RU.md language switch links were Gitea-absolute paths that 404 on GitHub; make them relative - --add-instance message says 'main' branch, matching this repo The fork attribution in README.md is left as-is: it credits upstream rather than pointing at the source.
* Add da.opnxng.com + lost-skunk.cc is now in Finlandlost+skunk2025-04-071-0/+0
|
* Два API-эндпоинтаlost+skunk2024-09-031-3/+8
|
* темплейты в бинарнике и улучшенная ↵lost+skunk2024-08-131-34/+29
| | | | система кеша
* instances.test.json -> instances.jsonv1.3.1lost+skunk2024-08-011-1/+1
|
* v1.3lost+skunk2024-08-011-0/+166