mirror of https://github.com/ospab/ostp.git
run_client_core previously ran once: if the OSTP protocol connection, the TUN device, or the local proxy listener ended for any reason (network change stranding the socket/adapter on a dead interface, a transient crash, a drop the inner Bridge-level "TunnelStopped" retry couldn't recover from), the whole client returned/errored and just stayed down. Wrapped the existing body (now run_client_once) in an outer supervising loop: any non-shutdown-requested exit triggers a full clean restart — fresh DNS resolution, fresh Bridge, fresh TUN/proxy — with backoff (1/2/5/10/20/30s, resetting once a run has been stable for 60s). Only an explicit shutdown request stops the loop. connection_state reports "connecting" during the retry wait so the UI shows reconnecting, not disconnected. |
||
|---|---|---|
| .. | ||
| src | ||
| Cargo.toml | ||
| test_udp.rs | ||