Skip to content

ui: handle proxy task shutdown more reliably#25

Merged
therealaleph merged 1 commit intotherealaleph:mainfrom
freeinternet865:fix/ui-stop-lifecycle
Apr 22, 2026
Merged

ui: handle proxy task shutdown more reliably#25
therealaleph merged 1 commit intotherealaleph:mainfrom
freeinternet865:fix/ui-stop-lifecycle

Conversation

@freeinternet865
Copy link
Copy Markdown
Contributor

Log server.run() errors in the UI background task instead of silently discarding them.

Also abort the task if graceful shutdown times out, and make sure a finished or stopped proxy task clears the running flag consistently without wiping the last visible stats snapshot.


Edited and written by GPT.

Log server.run() errors in the UI background task instead of
silently discarding them.

Also abort the task if graceful shutdown times out, and make sure a
finished or stopped proxy task clears the running flag consistently
without wiping the last visible stats snapshot.
Copy link
Copy Markdown
Owner

@therealaleph therealaleph left a comment

Choose a reason for hiding this comment

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

Surfaces proxy errors that were previously swallowed, forces abort on shutdown timeout, and keeps last_stats visible after stop. cargo check + tests pass locally.

@therealaleph therealaleph merged commit e0dcf1e into therealaleph:main Apr 22, 2026
@freeinternet865 freeinternet865 deleted the fix/ui-stop-lifecycle branch April 23, 2026 07:38
therealaleph pushed a commit that referenced this pull request Apr 25, 2026
Log server.run() errors in the UI background task instead of
silently discarding them.

Also abort the task if graceful shutdown times out, and make sure a
finished or stopped proxy task clears the running flag consistently
without wiping the last visible stats snapshot.

Co-authored-by: freeinternet865 <free@internet865.com>
therealaleph added a commit that referenced this pull request Apr 30, 2026
…igurable batch timeout, MHRV_AUTH_KEY hint, run.bat CLI fallback

Four small fixes that address recurring user-issue patterns:

- src/config.rs / src/domain_fronter.rs: auto_blacklist_strikes,
  auto_blacklist_window_secs, auto_blacklist_cooldown_secs config fields
  (#391, #444). Previously 3 strikes / 30s window / 120s cooldown were
  hard-coded. Single-deployment users on flaky networks hit this too
  aggressively; multi-deployment users want tighter fail-fast. Defaults
  preserve historical behavior. Power-user file edit only — no UI
  control yet. Clamps to [1, 86400] for durations.

- src/config.rs / src/domain_fronter.rs / src/tunnel_client.rs:
  request_timeout_secs config field (#430, masterking32 PR #25).
  Replaces hard-coded BATCH_TIMEOUT 30s. DomainFronter::batch_timeout()
  exposes the value, fire_batch reads it. Clamped to [5s, 300s].

- tunnel-node/src/main.rs: detect MHRV_AUTH_KEY env var being set
  while TUNNEL_AUTH_KEY is unset, and emit a specific warning pointing
  at the right env var name. Catches the recurring #391/#444 docker
  run typo that made users chase phantom AUTH_KEY-mismatch decoys.

- assets/launchers/run.bat: when both UI renderers (glow + wgpu)
  fail on older Windows / RDP / VM-without-GPU, fall back to launching
  mhrv-rs.exe (CLI) instead of just printing "open an issue".
  Addresses #417 / #426 / #487. CLI has the same proxy functionality
  on 127.0.0.1:8085 (HTTP) / :8086 (SOCKS5).

169 mhrv-rs lib tests + 33 tunnel-node tests still passing. UI build
clean. ConfigWire round-trips the new fields with skip-default-on-write
so unchanged configs stay clean.
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.

2 participants