feat: add automatic update system with GitHub Releases integration#40
feat: add automatic update system with GitHub Releases integration#40mkarim1378 wants to merge 1 commit intomasterking32:python_testingfrom
Conversation
Implement a self-update mechanism that checks the GitHub Releases API on
every startup, downloads the latest version if available, and applies it
without touching user-owned files.
- Add src/updater.py:
- check_update(): queries API with 10s timeout, compares semver tuples
- apply_update(): downloads zipball, extracts to temp dir, copies files
into project root while skipping protected paths (config.json, .venv,
ca/, adblock_cache/, .git)
- Add --check-update flag to main.py: report only, exit 0
- Add --update flag to main.py: apply if available;
exit 0 = already up to date, exit 1 = error, exit 2 = update applied
- Integrate into start.sh and start.bat:
- Auto-check and apply on every startup before launching the proxy
- Re-run pip install if exit code is 2 (new deps may be required)
- Pass --skip-update to bypass the check entirely
|
I'm facing an issue where when Cloudflare captcha appears, my client can't solve or bypass it — it just keeps spinning and then reloads the captcha from the beginning. P.S. I'm using the latest version I could download (around 17:00 Tehran time on May 2nd). |
Implement a self-update mechanism that checks the GitHub Releases API on every startup, downloads the latest version if available, and applies it without touching user-owned files.