You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
* Add Telegram pairing step to installer
Introduce an optional Telegram pairing/verification step in the installer (CLI and TUI) for centralized bot mode. Adds a TUI wizard (internal/tui/wizard/telegram_setup_tui.go) with retry/skip behavior, identity detection, status feedback and persistence checks, plus extensive unit tests. Wire CLI to display Server ID and perform an interactive verification loop using notify.CheckTelegramRegistration. Update docs (CLI_REFERENCE.md, CONFIGURATION.md, INSTALL.md) to document the pairing flow and install log changes, and add logging hooks to record non-blocking failures and user choices.
* Support non-interactive upgrade auto-confirm
Add support for auto-confirming the --upgrade flow by accepting a trailing 'y' (e.g. --upgrade y). Introduces Args.UpgradeAutoYes, extractUpgradeAutoYesArgs to preprocess os.Args, and updates Parse() to use the processed args. The upgrade command now respects UpgradeAutoYes and skips the interactive prompt (with a debug log). Documentation updated with examples and a unit test added to validate parsing behavior.
* Anticipate privilege context detection and reuse it in collectors
Move the unprivileged/rootless heuristic earlier in startup (right after logging Environment: ...), emit one INFO summary (Privilege context: ...) plus detailed DEBUG diagnostics, and inject the cached result into the orchestrator so collectors reuse it for privilege-sensitive command handling without re-reading /proc. Update environment + orchestrator tests for the new structured details and injection.
* Detect limited-privilege contexts beyond shifted userns
Extend the privilege-context detector to also use container signals (systemd container, container env, docker/podman markers, cgroup hints) and non-root EUID.
Improve the startup INFO Privilege context: ... line while keeping full evidence in DEBUG.
Update the privilege-sensitive SKIP hint and related docs/tests to match the broader “limited privileges” semantics.
bootstrap.Printf("Latest available version: %s (current: %s)", latestVersion, currentVersion)
128
128
129
-
reader:=bufio.NewReader(os.Stdin)
130
-
confirm, err:=promptYesNo(ctx, reader, "Do you want to download and install this version now? (backup.env will be updated with any missing keys; a backup will be created) [y/N]: ", false)
confirm, err=promptYesNo(ctx, reader, "Do you want to download and install this version now? (backup.env will be updated with any missing keys; a backup will be created) [y/N]: ", false)
136
+
iferr!=nil {
137
+
bootstrap.Error("ERROR: %v", err)
138
+
workflowErr=err
139
+
returntypes.ExitConfigError.Int()
140
+
}
135
141
}
136
142
if!confirm {
137
143
bootstrap.Println("Upgrade cancelled by user; no changes were made.")
Copy file name to clipboardExpand all lines: docs/CLI_REFERENCE.md
+7-3Lines changed: 7 additions & 3 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -142,10 +142,11 @@ Some interactive commands support two interface modes:
142
142
5. Optionally sets up notifications (Telegram, Email; Email defaults to `EMAIL_DELIVERY_METHOD=relay`)
143
143
6. Optionally configures encryption (AGE setup)
144
144
7. (TUI) Optionally selects a cron time (HH:MM) for the `proxsave` cron entry
145
-
8. Optionally runs a post-install dry-run audit and offers to disable unused collectors (TUI: checklist; CLI: per-key prompts; actionable hints like `set BACKUP_*=false to disable`)
**Install log**: The installer writes a session log under `/tmp/proxsave/install-*.log` (includes post-install audit suggestions and any accepted disables).
149
+
**Install log**: The installer writes a session log under `/tmp/proxsave/install-*.log` (includes audit results and Telegram pairing outcome).
149
150
150
151
### Configuration Upgrade
151
152
@@ -173,6 +174,9 @@ Some interactive commands support two interface modes:
Copy file name to clipboardExpand all lines: docs/INSTALL.md
+35-1Lines changed: 35 additions & 1 deletion
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -85,6 +85,9 @@ ProxSave provides a built-in upgrade command to update your installation to the
85
85
# Upgrade to latest version
86
86
./build/proxsave --upgrade
87
87
88
+
# Non-interactive upgrade (auto-confirm)
89
+
./build/proxsave --upgrade y
90
+
88
91
# Optionally update configuration template
89
92
./build/proxsave --upgrade-config
90
93
@@ -219,6 +222,36 @@ If the configuration file already exists, the **TUI wizard** will ask whether to
219
222
6.**Encryption**: AGE encryption setup (runs sub-wizard immediately if enabled)
220
223
7.**Cron schedule**: Choose cron time (HH:MM) for the `proxsave` cron entry (TUI mode only)
221
224
8.**Post-install check (optional)**: Runs `proxsave --dry-run` and shows actionable warnings like `set BACKUP_*=false to disable`, allowing you to disable unused collectors and reduce WARNING noise
225
+
9.**Telegram pairing (optional)**: If Telegram (centralized) is enabled, shows your Server ID and lets you verify pairing with the bot (retry/skip supported)
226
+
227
+
#### Telegram pairing wizard (TUI)
228
+
229
+
If you enable Telegram notifications during `--install` (centralized bot), the installer opens an additional **Telegram Setup** screen after the post-install check.
230
+
231
+
It does **not** modify your `backup.env`. It only:
232
+
- Computes/loads the **Server ID** and persists it (identity file)
233
+
- Guides you through pairing with the centralized bot
234
+
- Lets you verify pairing immediately (retry supported)
235
+
236
+
**What you see:**
237
+
-**Instructions**: steps to start the bot and send the Server ID
238
+
-**Server ID**: digits-only identifier + identity file path/persistence status
239
+
-**Status**: live feedback from the pairing check
240
+
-**Actions**:
241
+
-`Check`: verify pairing (press again to retry)
242
+
-`Continue`: available only after a successful check (centralized mode), or immediately in personal mode / when the Server ID is unavailable
243
+
-`Skip`: leave without verification (in centralized mode, `ESC` behaves like Skip when not verified)
244
+
245
+
**Where the Server ID is stored:**
246
+
-`<BASE_DIR>/identity/.server_identity`
247
+
248
+
**If `Check` fails:**
249
+
-`403` / `409`: start the bot, send the Server ID, then try again
250
+
-`422`: the Server ID looks invalid; re-run the installer or regenerate the identity file
251
+
- Other errors: temporary server/network issue; retry or skip and pair later
252
+
253
+
**CLI mode:**
254
+
- With `--install --cli`, the installer prints the Server ID and asks whether to run the check now (with a retry loop).
222
255
223
256
**Features:**
224
257
@@ -227,7 +260,8 @@ If the configuration file already exists, the **TUI wizard** will ask whether to
227
260
- Creates all necessary directories with proper permissions (0700)
228
261
- Immediate AGE key generation if encryption is enabled
229
262
- Optional post-install audit to disable unused collectors (keeps changes explicit; nothing is disabled silently)
230
-
- Install session log under `/tmp/proxsave/install-*.log` (includes post-install audit suggestions and any accepted disables)
263
+
- Optional Telegram pairing wizard (centralized mode) that displays Server ID and verifies the bot registration (retry/skip supported)
264
+
- Install session log under `/tmp/proxsave/install-*.log` (includes audit results and Telegram pairing outcome)
231
265
232
266
After completion, edit `configs/backup.env` manually for advanced options.
0 commit comments