v2.4.9: UBF v2.0 backup + manual secret recovery

- lib/backup.sh: complete rewrite for Unified Backup Format v2.0
  * metadata.json with backup_id (GT-YYMMDD-<last6hex>) and SHA-256 fingerprint
  * secrets.json with raw_secret, faketls_secret, proxy_link, bot_token
  * structured dirs: telemt/, gotelegram/, nginx/, letsencrypt/, site/, bot/
  * auto-detect and auto-migrate v1.1 -> v2.0 on restore
  * parse_manual_secret: accepts tg://proxy URL, ee-prefix, or raw 32-hex
  * manual_secret_input: interactive entry with env var export
- install.sh: new 3-option menu_install (new / restore / existing key)
  * install_lite_mode + install_pro_mode respect GOTELEGRAM_EXISTING_* env vars
- lib/lang/ru.sh + en.sh: v2.4.9 i18n strings (backup_*, manual_secret_*, install_menu_*)
- lib/common.sh + gotelegram-bot/bot.py: version bump to 2.4.9
This commit is contained in:
anten-ka
2026-04-12 00:07:03 +03:00
parent 9d9d12e150
commit 0e38c2b5b6
6 changed files with 605 additions and 119 deletions

View File

@@ -387,3 +387,68 @@ I18N[v1_migration_cancelled]="Migration cancelled. v1 left intact."
I18N[v1_stopping]="Stopping v1 container..."
I18N[v1_config_saved]="v1 config saved to %s"
I18N[v1_port_freed]="v1 stopped. Port %s freed."
# ── v2.4.9: UBF v2.0 backup + manual secret recovery ─────────────────────
I18N[install_source_title]="Installation source"
I18N[install_source_choice]="Choose source [1-3]:"
I18N[install_menu_new]="Fresh installation"
I18N[install_menu_new_desc]="Generate a new key and set up from scratch"
I18N[install_menu_restore]="Restore from backup"
I18N[install_menu_restore_desc]="Full restore from a .tar.gz[.enc] file"
I18N[install_menu_existing_key]="Use existing key"
I18N[install_menu_existing_key_desc]="Paste a tg://proxy link or a key manually"
I18N[install_hint_pro_mode]="The key contains a domain — this is usually Pro mode"
I18N[install_reuse_secret]="Using the provided key"
I18N[install_reuse_domain]="Using domain from the key"
I18N[install_reuse_port]="Using port from the key"
I18N[manual_secret_title]="Enter existing key"
I18N[manual_secret_help1]="Supported formats:"
I18N[manual_secret_prompt]="Paste the key"
I18N[manual_secret_empty]="Key is empty"
I18N[manual_secret_bad]="Could not parse the key format"
I18N[manual_secret_parsed]="Key parsed"
I18N[backup_id_label]="Backup ID"
I18N[backup_file_label]="File"
I18N[backup_size_label]="Size"
I18N[backup_key_label]="Key in backup (fingerprint)"
I18N[backup_format_label]="Format"
I18N[backup_mode_label]="Mode"
I18N[backup_lang_label]="Language"
I18N[backup_date_label]="Date"
I18N[backup_label]="Backup"
I18N[backup_ssl_included]="SSL certificates included (+ chain + renewal)"
I18N[backup_site_included]="Website template included"
I18N[backup_bot_included]="Telegram bot config included"
I18N[backup_restored_bot]="Telegram bot config restored"
I18N[backup_automigrate]="Converting legacy backup to UBF v2.0..."
I18N[backup_migrated]="Fresh UBF v2.0 backup saved"
I18N[backup_collecting]="Collecting configuration..."
I18N[backup_archive_err]="Archive creation failed"
I18N[backup_archive_missing]="Archive was not created"
I18N[backup_encrypt_err]="Encryption failed"
I18N[backup_encrypted]="Backup encrypted (AES-256-CBC)"
I18N[backup_created]="Backup created"
I18N[backup_enter_pass]="Enter password"
I18N[backup_repeat_pass]="Repeat password"
I18N[backup_pass_mismatch]="Passwords do not match"
I18N[backup_pass_short]="Password too short (min 6 chars)"
I18N[backup_bad_pass]="Wrong password or corrupted file"
I18N[backup_extract_err]="Archive extraction failed"
I18N[backup_confirm_restore]="Restore configuration? Current settings will be overwritten."
I18N[backup_restored_telemt]="telemt config restored"
I18N[backup_restored_gotelegram]="GoTelegram config restored"
I18N[backup_restored_lang]="Interface language restored"
I18N[backup_restored_nginx]="nginx config restored"
I18N[backup_restored_ssl]="SSL certificates restored"
I18N[backup_restored_site]="Website template restored"
I18N[backup_restore_done]="Restore completed!"
I18N[backup_create_title]="Create backup"
I18N[backup_encrypt_prompt]="Encrypt the backup with a password?"
I18N[backup_none]="No backups found"
I18N[backup_list_title]="Available backups"
I18N[backup_pick_prompt]="Backup number (or file path)"
I18N[backup_not_found]="Backup not found"
I18N[backup_file_not_found_fmt]="File not found: %s"
I18N[backup_cleanup_fmt]="Deleted %s old backups (kept %s)"