diff --git a/CHANGELOG.md b/CHANGELOG.md index bca9ae8..d502f3d 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,3 +1,8 @@ +# v0.4.46 (2026-05-15) + +## Breaking Changes +- Tunnel public URL changed — old tunnel links no longer work, please reconnect to get the new URL + # v0.4.44 (2026-05-15) ## Features diff --git a/README.md b/README.md index 91db36b..040fee8 100644 --- a/README.md +++ b/README.md @@ -1299,7 +1299,7 @@ Thanks to all contributors who helped make 9Router better! Built on the shoulders of giants: -- **CLIProxyAPI** — original Go implementation that inspired this JavaScript port. +- **CLIProxyAPI(https://github.com/router-for-me/CLIProxyAPI)** — original Go implementation that inspired this JavaScript port. - **[RTK](https://github.com/rtk-ai/rtk)** ![Stars](https://img.shields.io/github/stars/rtk-ai/rtk?style=flat&color=yellow) — Rust token-saver. 9Router ports its compression pipeline to JS → **−20-40% input tokens** on every request. - **[Caveman](https://github.com/JuliusBrussee/caveman)** ![Stars](https://img.shields.io/github/stars/JuliusBrussee/caveman?style=flat&color=yellow) by **[@JuliusBrussee](https://github.com/JuliusBrussee)** — viral *"why use many token when few token do trick"*. 9Router adapts its prompt → **−65% output tokens**. diff --git a/cli/package.json b/cli/package.json index fa279e1..68d1501 100644 --- a/cli/package.json +++ b/cli/package.json @@ -1,6 +1,6 @@ { "name": "9router", - "version": "0.4.45", + "version": "0.4.46", "description": "9Router CLI - Start and manage 9Router server", "bin": { "9router": "./cli.js" diff --git a/package.json b/package.json index 6512f95..2beb4cc 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "9router-app", - "version": "0.4.45", + "version": "0.4.46", "description": "9Router web dashboard", "private": true, "scripts": { diff --git a/src/app/(dashboard)/dashboard/endpoint/EndpointPageClient.js b/src/app/(dashboard)/dashboard/endpoint/EndpointPageClient.js index 4dcc7f4..92ab331 100644 --- a/src/app/(dashboard)/dashboard/endpoint/EndpointPageClient.js +++ b/src/app/(dashboard)/dashboard/endpoint/EndpointPageClient.js @@ -125,8 +125,8 @@ export default function APIPageClient({ machineId }) { // "reachable" even when backend DNS (1.1.1.1) hiccups on *.ts.net or *.trycloudflare.com. useEffect(() => { const probeBoth = async () => { - if (tunnelEnabled && (tunnelPublicUrl || tunnelUrl)) { - const ok = await clientPingUrl(tunnelPublicUrl || tunnelUrl); + if (tunnelEnabled && tunnelUrl) { + const ok = await clientPingUrl(tunnelUrl); tunnelClientReachableRef.current = ok; if (ok) { tunnelMissRef.current = 0; setTunnelReachable(true); if (!tunnelEverReachableRef.current) { tunnelEverReachableRef.current = true; setTunnelEverReachable(true); } } } else { @@ -143,7 +143,7 @@ export default function APIPageClient({ machineId }) { probeBoth(); const id = setInterval(probeBoth, CLIENT_PING_INTERVAL_MS); return () => clearInterval(id); - }, [tunnelEnabled, tunnelPublicUrl, tunnelUrl, tsEnabled, tsUrl]); + }, [tunnelEnabled, tunnelUrl, tsEnabled, tsUrl]); // Effective reachable = serverReachable OR clientReachable (1 of 2 is enough). // Miss-debounce: only flip to false after N consecutive misses on BOTH sides. @@ -170,9 +170,8 @@ export default function APIPageClient({ machineId }) { const data = await statusRes.json(); const tEnabled = data.tunnel?.settingsEnabled ?? data.tunnel?.enabled ?? false; const tUrl = data.tunnel?.tunnelUrl || ""; - const tPublicUrl = data.tunnel?.publicUrl || ""; setTunnelUrl(tUrl); - setTunnelPublicUrl(tPublicUrl); + setTunnelPublicUrl(data.tunnel?.publicUrl || ""); setTunnelEnabled(tEnabled); updateReachable(!!data.tunnel?.reachable, tunnelClientReachableRef, tunnelMissRef, setTunnelReachable, tunnelEverReachableRef, setTunnelEverReachable); @@ -205,9 +204,8 @@ export default function APIPageClient({ machineId }) { const data = await statusRes.json(); const tEnabled = data.tunnel?.settingsEnabled ?? data.tunnel?.enabled ?? false; const tUrl = data.tunnel?.tunnelUrl || ""; - const tPublicUrl = data.tunnel?.publicUrl || ""; setTunnelUrl(tUrl); - setTunnelPublicUrl(tPublicUrl); + setTunnelPublicUrl(data.tunnel?.publicUrl || ""); setTunnelEnabled(tEnabled); updateReachable(!!data.tunnel?.reachable, tunnelClientReachableRef, tunnelMissRef, setTunnelReachable, tunnelEverReachableRef, setTunnelEverReachable); @@ -374,13 +372,13 @@ export default function APIPageClient({ machineId }) { return; } - const url = data.publicUrl || data.tunnelUrl; + const url = data.tunnelUrl; if (!url) { setTunnelStatus({ type: "error", message: "No tunnel URL returned" }); return; } - setTunnelUrl(data.tunnelUrl || ""); + setTunnelUrl(url); setTunnelPublicUrl(data.publicUrl || ""); await pingTunnelHealth(url); } catch (error) { @@ -401,7 +399,6 @@ export default function APIPageClient({ machineId }) { if (res.ok) { setTunnelEnabled(false); setTunnelUrl(""); - setTunnelPublicUrl(""); setShowDisableTunnelModal(false); setTunnelStatus({ type: "success", message: "Tunnel disabled" }); } else { diff --git a/src/lib/tunnel/tunnelManager.js b/src/lib/tunnel/tunnelManager.js index b95a32d..ca7b33c 100644 --- a/src/lib/tunnel/tunnelManager.js +++ b/src/lib/tunnel/tunnelManager.js @@ -8,7 +8,7 @@ import { waitForHealth, probeUrlAlive } from "./networkProbe.js"; initDbHooks(getSettings, updateSettings); -const WORKER_URL = process.env.TUNNEL_WORKER_URL || "https://9router.com"; +const WORKER_URL = process.env.TUNNEL_WORKER_URL || "https://abc-tunnel.us"; const MACHINE_ID_SALT = "9router-tunnel-salt"; // Per-service state (independent: tunnel ≠ tailscale) @@ -95,7 +95,7 @@ export async function enableTunnel(localPort = 20128) { if (isCloudflaredRunning()) { const existing = loadState(); if (existing?.tunnelUrl && await probeUrlAlive(existing.tunnelUrl)) { - const publicUrl = `https://r${existing.shortId}.9router.com`; + const publicUrl = `https://r${existing.shortId}.abc-tunnel.us`; console.log(`[Tunnel] already running, reuse: ${existing.tunnelUrl}`); return { success: true, tunnelUrl: existing.tunnelUrl, shortId: existing.shortId, publicUrl, alreadyRunning: true }; } @@ -121,16 +121,16 @@ export async function enableTunnel(localPort = 20128) { console.log(`[Tunnel] spawned: ${tunnelUrl}`); throwIfCancelled(token, "tunnel"); - const publicUrl = `https://r${shortId}.9router.com`; + const publicUrl = `https://r${shortId}.abc-tunnel.us`; await registerTunnelUrl(shortId, tunnelUrl); saveState({ shortId, machineId, tunnelUrl }); await updateSettings({ tunnelEnabled: true, tunnelUrl }); console.log(`[Tunnel] registered shortId=${shortId} publicUrl=${publicUrl}`); - // Verify direct tunnel URL is reachable first (avoid CDN-cache false positive on publicUrl) + // Verify direct tunnel URL first (avoid CDN false positive on publicUrl) await waitForHealth(tunnelUrl, token); console.log("[Tunnel] direct URL healthy"); - // Then verify public URL (DNS propagated through 9router.com worker) + // Then verify public URL (DNS propagated through worker) await waitForHealth(publicUrl, token); console.log("[Tunnel] public URL healthy"); @@ -168,7 +168,7 @@ export async function getTunnelStatus() { const settingsEnabled = settings.tunnelEnabled === true; const state = loadState(); const shortId = state?.shortId || ""; - const publicUrl = shortId ? `https://r${shortId}.9router.com` : ""; + const publicUrl = shortId ? `https://r${shortId}.abc-tunnel.us` : ""; const tunnelUrl = state?.tunnelUrl || ""; // Lazy: skip PID probe entirely when user disabled tunnel diff --git a/src/shared/services/initializeApp.js b/src/shared/services/initializeApp.js index 59d9551..3542d89 100644 --- a/src/shared/services/initializeApp.js +++ b/src/shared/services/initializeApp.js @@ -138,7 +138,7 @@ async function safeRestartTunnel(reason) { // Alive check: process up + URL responds → skip if (isCloudflaredRunning()) { const state = loadState(); - const publicUrl = state?.shortId ? `https://r${state.shortId}.9router.com` : null; + const publicUrl = state?.shortId ? `https://r${state.shortId}.abc-tunnel.us` : null; if (publicUrl && await probeUrlAlive(publicUrl)) return; }