Make the distribution source and brand configurable
Nothing about the install was overridable: the archive could only come from one GitHub repo, the connectivity precheck pinged github.com whatever the source was, and the product name was duplicated across install.sh, the CLI banner and two spots in App.tsx. install.sh now reads REPO_BASE (default the Gitea mirror), REPO_FALLBACK (default GitHub), ARCHIVE_URL and BRAND from the environment. Gitea and GitHub share the same release path, so one scheme covers both: download_extract tries the primary, warns and falls back to the secondary, and fails with both URLs listed. The fallback carries real weight today — the Gitea repo is a pull mirror that does not sync releases, so artifacts live only on GitHub until release sync is enabled there. The precheck now probes the hosts actually used. BRAND flows install.sh -> cli.env -> CLI banner and awg-ui, which exposes it via GET /ui/brand along with the package version. That route is unauthenticated because the wordmark is on the login screen, before a JWT exists; the SPA falls back to a constant if it fails. Renaming a fork is one environment variable, and no version string is hardcoded in the UI or the CLI any more. Also adds /ui to the Vite dev proxy (GET /ui/brand and the API-keys tab were unreachable in dev), documents the overrides in the README, fixes a typo in the API.md base URL and states there that the API is not bound to any host.
This commit is contained in:
@@ -9,6 +9,7 @@ export default defineConfig({
|
||||
server: {
|
||||
proxy: {
|
||||
'/api': 'http://localhost:8080',
|
||||
'/ui': 'http://localhost:8080',
|
||||
'/health': 'http://localhost:8080',
|
||||
'/login': 'http://localhost:8080',
|
||||
'/logout': 'http://localhost:8080',
|
||||
|
||||
Reference in New Issue
Block a user