tailscale-proxy 1.0.0 → 1.1.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/README.md CHANGED
@@ -2,10 +2,19 @@
2
2
 
3
3
  [![ci](https://github.com/meabed/tailscale-proxy/actions/workflows/ci.yml/badge.svg)](https://github.com/meabed/tailscale-proxy/actions/workflows/ci.yml)
4
4
  [![release](https://github.com/meabed/tailscale-proxy/actions/workflows/release.yml/badge.svg)](https://github.com/meabed/tailscale-proxy/actions/workflows/release.yml)
5
+ [![npm](https://img.shields.io/npm/v/tailscale-proxy)](https://www.npmjs.com/package/tailscale-proxy)
5
6
 
6
- Discover your local dev servers by **port**, and expose them through a **single
7
- Tailscale entry** — privately (Serve, tailnet-only) or publicly (Funnel) — routed
8
- by **project name**.
7
+ 📖 **Docs:** https://tailscaleproxy.vercel.app · sources in [`website/`](website)
8
+
9
+ An open-source, **self-hosted [ngrok](https://ngrok.com) alternative** built on
10
+ [Tailscale](https://tailscale.com). Discover your local dev servers by **port**,
11
+ and expose them through a **single Tailscale entry** — privately (Serve,
12
+ tailnet-only) or publicly (Funnel) — routed by **project name**.
13
+
14
+ > **vs. ngrok:** your own stable `*.ts.net` URL over your Tailscale tunnel — no
15
+ > third-party relay, no random per-session URLs, no rate limits/paywalls. One
16
+ > hostname for **many** dev servers, discovered automatically (no `ngrok http 3000`
17
+ > per port).
9
18
 
10
19
  No per-app wiring: just run your servers (`node`, `bun`, `deno`, `python`, `php`, `ruby`, `go`, `java`, …) and `tsp` finds the ones listening in a port range, derives a path slug
11
20
  from each project's folder, and routes to them under one hostname:
package/bin/launcher.js CHANGED
@@ -43,15 +43,26 @@ function fromCache() {
43
43
  function downloadToCache() {
44
44
  const ext = PLATFORM === "win32" ? "zip" : "tar.gz";
45
45
  const asset = `tsp_${GOOS}_${GOARCH}.${ext}`;
46
- const url = `https://github.com/${REPO}/releases/download/v${VERSION}/${asset}`;
46
+ // Prefer the exact version; fall back to the latest release if that asset is
47
+ // missing (e.g. a stale/placeholder launcher version) so it always self-heals.
48
+ const urls = [
49
+ `https://github.com/${REPO}/releases/download/v${VERSION}/${asset}`,
50
+ `https://github.com/${REPO}/releases/latest/download/${asset}`,
51
+ ];
47
52
  const dir = cacheDir();
48
53
  fs.mkdirSync(dir, { recursive: true });
49
54
  const archive = path.join(dir, asset);
50
55
 
51
- process.stderr.write(`tailscale-proxy: fetching ${asset} (v${VERSION})…\n`);
52
- const dl = spawnSync("curl", ["-fsSL", "-o", archive, url], { stdio: ["ignore", "ignore", "inherit"] });
53
- if (dl.status !== 0) {
54
- throw new Error(`download failed: ${url}`);
56
+ let ok = false;
57
+ for (const url of urls) {
58
+ process.stderr.write(`tailscale-proxy: fetching ${asset}…\n`);
59
+ if (spawnSync("curl", ["-fsSL", "-o", archive, url], { stdio: ["ignore", "ignore", "inherit"] }).status === 0) {
60
+ ok = true;
61
+ break;
62
+ }
63
+ }
64
+ if (!ok) {
65
+ throw new Error(`could not download ${asset} for v${VERSION} or latest`);
55
66
  }
56
67
  // `tar` extracts both .tar.gz and .zip on macOS/Linux/Windows-10+.
57
68
  const ex = spawnSync("tar", ["-xf", archive, "-C", dir], { stdio: ["ignore", "ignore", "inherit"] });
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "tailscale-proxy",
3
- "version": "1.0.0",
3
+ "version": "1.1.0",
4
4
  "description": "Discover local dev servers by port and expose them through one Tailscale Serve/Funnel entry, routed by project name.",
5
5
  "keywords": [
6
6
  "tailscale",
@@ -13,7 +13,10 @@
13
13
  "dev",
14
14
  "discovery",
15
15
  "localhost",
16
- "tunnel"
16
+ "tunnel",
17
+ "ngrok",
18
+ "ngrok-alternative",
19
+ "localtunnel"
17
20
  ],
18
21
  "homepage": "https://github.com/meabed/tailscale-proxy#readme",
19
22
  "bugs": {
@@ -71,12 +74,12 @@
71
74
  "semantic-release": "^25.0.3"
72
75
  },
73
76
  "optionalDependencies": {
74
- "tailscale-proxy-darwin-arm64": "1.0.0",
75
- "tailscale-proxy-darwin-x64": "1.0.0",
76
- "tailscale-proxy-linux-x64": "1.0.0",
77
- "tailscale-proxy-linux-arm64": "1.0.0",
78
- "tailscale-proxy-win32-x64": "1.0.0",
79
- "tailscale-proxy-win32-arm64": "1.0.0"
77
+ "tailscale-proxy-darwin-arm64": "1.1.0",
78
+ "tailscale-proxy-darwin-x64": "1.1.0",
79
+ "tailscale-proxy-linux-x64": "1.1.0",
80
+ "tailscale-proxy-linux-arm64": "1.1.0",
81
+ "tailscale-proxy-win32-x64": "1.1.0",
82
+ "tailscale-proxy-win32-arm64": "1.1.0"
80
83
  },
81
84
  "packageManager": "bun@1.3.14",
82
85
  "engines": {