Skip to content

feat: add automatic update system with GitHub Releases integration#40

Closed
mkarim1378 wants to merge 1 commit intomasterking32:python_testingfrom
mkarim1378:feature/autoupdate
Closed

feat: add automatic update system with GitHub Releases integration#40
mkarim1378 wants to merge 1 commit intomasterking32:python_testingfrom
mkarim1378:feature/autoupdate

Conversation

@mkarim1378
Copy link
Copy Markdown

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

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
@MSThub
Copy link
Copy Markdown

MSThub commented May 2, 2026

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.
Also, when I try to connect using LAN sharing with SOCKS5 or HTTP proxies on my phone, it doesn't work at all. I have set up the HTTP and SOCKS5 proxies correctly on my phone inside v2rayNG, and they even show ping successfully — but the actual connection still fails.
Checking logs when I open Telegram on my phone, I see this:
02:47:04 • INFO [Proxy ] Non-TLS traffic on 149.154.167.91:443 (likely Telegram MTProto / obfuscated protocol). This DC appears blocked; the client should rotate to another endpoint shortly.
what does that mean? and ... I'm not sure why the log says "Proxy" there — I think it should say "LAN" (or something similar) instead, but that's what I see.
This happens while Telegram Desktop itself works fine with the same setup.
Can anyone help me understand what's going on or how to fix it? Thanks!

P.S. I'm using the latest version I could download (around 17:00 Tehran time on May 2nd).

Copy link
Copy Markdown

@MOJISELFISH MOJISELFISH left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

opq0pqo ایران

@mkarim1378 mkarim1378 closed this May 3, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants