mirror of
https://github.com/Nezumi-2711/9router.git
synced 2026-09-22 20:00:47 +00:00
Feat : qoder provider
This commit is contained in:
@@ -8,7 +8,7 @@ import {
|
||||
isTunnelManuallyDisabled, isTunnelReconnecting, isTailscaleReconnecting,
|
||||
getTunnelService, getTailscaleService, setTunnelUnexpectedExitCallback,
|
||||
killCloudflared, isCloudflaredRunning, ensureCloudflared,
|
||||
isTailscaleRunning,
|
||||
isTailscaleRunning, isTailscaleRunningStrict,
|
||||
loadState,
|
||||
checkInternet,
|
||||
probeCloudflareAlive, probeTailscaleAlive,
|
||||
@@ -174,7 +174,9 @@ async function safeRestartTunnel(reason) {
|
||||
svc.lastRestartAt = Date.now();
|
||||
console.log("[Tunnel] restart success");
|
||||
} catch (err) {
|
||||
console.log("[Tunnel] restart failed:", err.message);
|
||||
if (!/cloudflared killed|tunnel cancelled/.test(err.message)) {
|
||||
console.log("[Tunnel] restart failed:", err.message);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -185,8 +187,10 @@ async function safeRestartTailscale(reason) {
|
||||
if (svc.cancelToken.cancelled) return;
|
||||
if (svc.spawnInProgress) return;
|
||||
|
||||
// Tailscale daemon is OS-level with built-in reconnect; trust it when running
|
||||
if (isTailscaleRunning()) return;
|
||||
// Tailscale daemon is OS-level with built-in reconnect; trust it when running.
|
||||
// Startup uses strict probe — cached state is cold after process/dev reload.
|
||||
const running = reason === "startup" ? isTailscaleRunningStrict() : isTailscaleRunning();
|
||||
if (running) return;
|
||||
|
||||
const force = FORCE_RESTART_REASONS.test(reason);
|
||||
if (!force && Date.now() - svc.lastRestartAt < RESTART_COOLDOWN_MS) {
|
||||
|
||||
Reference in New Issue
Block a user