tailscale-proxy 1.3.0 → 1.5.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.
Files changed (2) hide show
  1. package/README.md +72 -2
  2. package/package.json +7 -7
package/README.md CHANGED
@@ -3,8 +3,23 @@
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
5
  [![npm](https://img.shields.io/npm/v/tailscale-proxy)](https://www.npmjs.com/package/tailscale-proxy)
6
+ [![docs](https://img.shields.io/badge/docs-tailscaleproxy.vercel.app-blue)](https://tailscaleproxy.vercel.app)
6
7
 
7
- 📖 **Docs:** https://tailscaleproxy.vercel.app · sources in [`website/`](website)
8
+ ## Start in one command
9
+
10
+ ```bash
11
+ npx tailscale-proxy
12
+ ```
13
+
14
+ That's it — no install, no config. It discovers your running dev servers and shares
15
+ them all through one Tailscale URL. (First time? Run `npx tailscale-proxy doctor` to
16
+ check Tailscale is set up — see [Requirements](#requirements).)
17
+
18
+ ```bash
19
+ brew install meabed/tap/tsp && tsp # or install the binary, then run `tsp`
20
+ ```
21
+
22
+ ---
8
23
 
9
24
  An open-source, **self-hosted [ngrok](https://ngrok.com) alternative** built on
10
25
  [Tailscale](https://tailscale.com). Discover your local dev servers by **port**,
@@ -87,6 +102,25 @@ Update later with **`tsp update`** — it self-updates a standalone binary, or p
87
102
 
88
103
  ---
89
104
 
105
+ ## Desktop app
106
+
107
+ <img src="website/public/app-icon.svg" align="right" width="96" alt="Tailscale Proxy app icon" />
108
+
109
+ Prefer clicking to typing? There's a native **menu-bar app** for **macOS, Windows,
110
+ and Linux** — start/stop the proxy, watch each dev server (cpu · memory · uptime),
111
+ switch Funnel/Serve, and open/copy/kill services, all without a terminal. It runs
112
+ the same engine as the CLI and shares the same `~/.tailscale-proxy/config.json`.
113
+
114
+ **[⬇ Download](https://github.com/meabed/tailscale-proxy/releases)** — pick the
115
+ latest **`desktop-v…`** release · **[Docs & screenshots](https://tailscaleproxy.vercel.app/desktop)**
116
+
117
+ <img src="website/public/desktop-panel.png" width="330" alt="Tailscale Proxy menu-bar panel" />
118
+
119
+ Build from source: `cd desktop && go build -o tsp-app . && ./tsp-app` (see
120
+ [`desktop/README.md`](desktop/README.md)).
121
+
122
+ ---
123
+
90
124
  ## Commands
91
125
 
92
126
  ```
@@ -178,6 +212,26 @@ Step-by-step with screenshots-worth-of-detail: **[docs/EXAMPLES.md](docs/EXAMPLE
178
212
 
179
213
  ## How it works
180
214
 
215
+ ```mermaid
216
+ flowchart LR
217
+ C["Caller<br/>internet or tailnet"]
218
+ C -->|"https://node.ts.net/web/foo"| TS
219
+ subgraph machine["your machine"]
220
+ direction TB
221
+ TS["tailscale funnel | serve<br/>TLS · :443 / 8443 / 10000"]
222
+ P["tsp proxy<br/>net/http · :8443"]
223
+ SCAN["discovery loop<br/>lsof·ps / netstat·tasklist"]
224
+ D1["127.0.0.1:4983<br/>web · bun"]
225
+ D2["127.0.0.1:3000<br/>api · node"]
226
+ TS -->|plain HTTP| P
227
+ P -->|"/web/foo → strip → /foo<br/>Host → localhost:4983"| D1
228
+ P --> D2
229
+ SCAN -->|"slug → port map"| P
230
+ SCAN -.->|"scan every --interval"| D1
231
+ SCAN -.-> D2
232
+ end
233
+ ```
234
+
181
235
  1. Every `--interval` seconds, `tsp` lists listening TCP sockets in the range
182
236
  (macOS/Linux via `lsof`+`ps`, Windows via `netstat`+`tasklist`), classifies the
183
237
  runtime, and derives a slug from the nearest project-root folder
@@ -188,7 +242,23 @@ Step-by-step with screenshots-worth-of-detail: **[docs/EXAMPLES.md](docs/EXAMPLE
188
242
  3. `tailscale serve|funnel --bg <proxy-port>` exposes the proxy. On exit the entry
189
243
  is reset.
190
244
 
191
- More in [docs/HOW-IT-WORKS.md](docs/HOW-IT-WORKS.md).
245
+ **Request routing:**
246
+
247
+ ```mermaid
248
+ flowchart TD
249
+ R["Request /seg/rest?query"] --> M{"first segment<br/>matches a slug?"}
250
+ M -->|yes| H["strip segment · Host → localhost:port<br/>set tsp_route cookie"]
251
+ M -->|"no (prefix-less asset/HMR)"| CK{"tsp_route<br/>cookie set?"}
252
+ CK -->|yes| FF["forward full path to the cookie's backend"]
253
+ CK -->|no| NF["404 + list of services"]
254
+ H --> UP{"backend up?"}
255
+ FF --> UP
256
+ UP -->|yes| OK["stream response<br/>(SSE · WebSocket)"]
257
+ UP -->|no| E502["502"]
258
+ ```
259
+
260
+ More — including the discovery pipeline and lifecycle sequence diagrams — in
261
+ [docs/HOW-IT-WORKS.md](docs/HOW-IT-WORKS.md).
192
262
 
193
263
  ---
194
264
 
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "tailscale-proxy",
3
- "version": "1.3.0",
3
+ "version": "1.5.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",
@@ -74,12 +74,12 @@
74
74
  "semantic-release": "^25.0.3"
75
75
  },
76
76
  "optionalDependencies": {
77
- "tailscale-proxy-darwin-arm64": "1.3.0",
78
- "tailscale-proxy-darwin-x64": "1.3.0",
79
- "tailscale-proxy-linux-x64": "1.3.0",
80
- "tailscale-proxy-linux-arm64": "1.3.0",
81
- "tailscale-proxy-win32-x64": "1.3.0",
82
- "tailscale-proxy-win32-arm64": "1.3.0"
77
+ "tailscale-proxy-darwin-arm64": "1.5.0",
78
+ "tailscale-proxy-darwin-x64": "1.5.0",
79
+ "tailscale-proxy-linux-x64": "1.5.0",
80
+ "tailscale-proxy-linux-arm64": "1.5.0",
81
+ "tailscale-proxy-win32-x64": "1.5.0",
82
+ "tailscale-proxy-win32-arm64": "1.5.0"
83
83
  },
84
84
  "packageManager": "bun@1.3.14",
85
85
  "engines": {