locadot 1.6.0-beta.6 → 2.0.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/CHANGELOG.md +2 -5
- package/README.md +51 -11
- package/dist/dashboard/page.js +729 -438
- package/package.json +1 -1
package/CHANGELOG.md
CHANGED
|
@@ -1,9 +1,6 @@
|
|
|
1
1
|
# Changelog
|
|
2
2
|
|
|
3
|
-
##
|
|
4
|
-
|
|
5
|
-
The version in `package.json` is 1.6.0-beta.6 (published under the `beta` tag). The owner decides the bump. **2.0.0** is suggested because of the
|
|
6
|
-
breaking items below.
|
|
3
|
+
## 2.0.0 (2026-09-26)
|
|
7
4
|
|
|
8
5
|
### Changed
|
|
9
6
|
- Internal restructure into `cli/commands/*`, `server/*` and `proxy/*` modules. There are no behaviour changes; see `tasks/README.md`.
|
|
@@ -17,7 +14,7 @@ breaking items below.
|
|
|
17
14
|
|
|
18
15
|
### Added
|
|
19
16
|
- `locadot tunnel --host <h>` (with `--off`, and `tunnel:install`) shares a mapping on a public `https://*.trycloudflare.com` URL through a Cloudflare quick tunnel, with no account needed. `cloudflared` is downloaded on demand into the state dir. The dashboard has a Cloudflare Tunnel card, a Public URL column and Share/Unshare per row. The API accepts `PUT /api/hosts/:host {"tunnel": true}` and has `POST /api/cloudflared/install`. `--cors` also works for tunnel visitors (the shim, preflights and origin rewriting to the public URL), but their pass-through calls may only reach public addresses; loopback, LAN and metadata addresses are refused at connect time.
|
|
20
|
-
- The dashboard is redesigned: a
|
|
17
|
+
- The dashboard is redesigned: a two-column layout, a host filter, loading/offline/empty states, cards on small screens, and a system / light / dark theme toggle.
|
|
21
18
|
- `locadot start --port <http> --https-port <https>` (also on `restart`) runs the proxy on other ports than 80/443. The choice is saved in the state dir, so `add`, `status`, `open` and start-at-boot keep using it; `--port 80 --https-port 443` goes back. Running it while the proxy is up on other ports restarts it on the new ones.
|
|
22
19
|
- `--cors` per mapping (CLI, API and dashboard). `Origin`/`Referer` are sent as the target's own origin, CORS preflights are answered locally, and any origin may call the domain with credentials. Absolute URLs of other mapped domains in text responses are rewritten to their `.localhost` names, and a mapped caller is sent as its real origin, so a site plus its API both work locally. Pages also get a small script that sends calls to any other origin through the page's own origin (`/__locadot/x/…`), so no mapping per API or third-party domain is needed. (ENH-12, BUG-15)
|
|
23
20
|
- A control panel at `https://localhost` with a dark theme. You can add, edit and remove mappings, toggle CA trust and start-at-boot, see root/admin and privileged-port status,
|
package/README.md
CHANGED
|
@@ -1,7 +1,16 @@
|
|
|
1
1
|
# locadot 🔐
|
|
2
2
|
|
|
3
|
+
[](https://www.npmjs.com/package/locadot)
|
|
4
|
+
[](LICENSE)
|
|
5
|
+
|
|
3
6
|
HTTPS custom domains for local development. Point `https://app.localhost` at your dev server on port 3000, or
|
|
4
|
-
`https://google.localhost` at any upstream URL,
|
|
7
|
+
`https://google.localhost` at any upstream URL, share any of them on a public URL, and manage it all from a dashboard at
|
|
8
|
+
`https://localhost`.
|
|
9
|
+
|
|
10
|
+
<picture>
|
|
11
|
+
<source media="(prefers-color-scheme: dark)" srcset="https://raw.githubusercontent.com/avinashid/locadot/main/docs/screenshots/dashboard-dark.png">
|
|
12
|
+
<img alt="The locadot dashboard: hosts with health, traffic and public URLs, plus add-host, system and sharing panels" src="https://raw.githubusercontent.com/avinashid/locadot/main/docs/screenshots/dashboard-light.png">
|
|
13
|
+
</picture>
|
|
5
14
|
|
|
6
15
|
## ✨ Features
|
|
7
16
|
|
|
@@ -9,8 +18,13 @@ HTTPS custom domains for local development. Point `https://app.localhost` at you
|
|
|
9
18
|
Run `locadot trust` once to add the CA to your system and browsers.
|
|
10
19
|
- 🔁 **Any destination.** A local port (`--port 3000`), a host and port (`--target 192.168.1.5:8080`), or any URL
|
|
11
20
|
(`--target https://google.com`). Redirects and cookies are rewritten so the browser stays on the `.localhost` name.
|
|
12
|
-
-
|
|
13
|
-
|
|
21
|
+
- 🌍 **Share on a public URL.** `locadot tunnel --host app.localhost` (or **Share** in the dashboard) puts a mapping on
|
|
22
|
+
`https://<random>.trycloudflare.com` through a Cloudflare quick tunnel. No account needed.
|
|
23
|
+
- 🧩 **`--cors` for sites that call other domains.** Preflights are answered locally and cross-origin calls are routed
|
|
24
|
+
through the page's own origin, so a production frontend works against its real APIs from `.localhost`.
|
|
25
|
+
- 📋 **Control panel at `https://localhost`.** Add, edit, filter and remove mappings, see health and traffic, share them,
|
|
26
|
+
and toggle CA trust and start-at-boot. Light, dark or system theme. Includes a token-protected JSON API, so scripts and
|
|
27
|
+
AI agents can do everything the page does.
|
|
14
28
|
- 🔌 **WebSockets** are proxied too, so HMR and dev-server live reload work.
|
|
15
29
|
- 🩺 **`status` and `doctor`** show why a domain isn't working: port conflicts, permissions, CA trust, a target that isn't answering.
|
|
16
30
|
- 🛡️ **Local by default.** The proxy binds to `127.0.0.1` / `::1` only. Domains must end in `.localhost`, which browsers
|
|
@@ -22,6 +36,7 @@ HTTPS custom domains for local development. Point `https://app.localhost` at you
|
|
|
22
36
|
## 🚀 Quick start
|
|
23
37
|
|
|
24
38
|
```bash
|
|
39
|
+
npm i -g locadot # or prefix each command with npx
|
|
25
40
|
npx locadot trust # once: trust the locadot CA (asks for your password)
|
|
26
41
|
npx locadot add --host app.localhost --port 3000 # https://app.localhost → http://localhost:3000
|
|
27
42
|
npx locadot add --host google.localhost --target https://google.com
|
|
@@ -108,15 +123,27 @@ use **Share** / **Unshare** on a row.
|
|
|
108
123
|
## 📋 Dashboard & control panel
|
|
109
124
|
|
|
110
125
|
Open `https://localhost` or `http://localhost` (or run `locadot open`). Requests for bare `localhost` / `127.0.0.1` / `::1`
|
|
111
|
-
are answered by locadot itself, not proxied.
|
|
126
|
+
are answered by locadot itself, not proxied. On wide screens the page is a two-column layout: your hosts on the left,
|
|
127
|
+
controls on the right. The button at the top right switches between the system, light and dark themes (saved per browser).
|
|
128
|
+
|
|
129
|
+
<img alt="Hosts table with status, latency, traffic, a shared public URL and per-row actions" src="https://raw.githubusercontent.com/avinashid/locadot/main/docs/screenshots/hosts.png">
|
|
112
130
|
|
|
113
|
-
- **
|
|
114
|
-
|
|
115
|
-
|
|
116
|
-
|
|
117
|
-
- **
|
|
118
|
-
|
|
119
|
-
- **
|
|
131
|
+
- **Hosts:** every mapping with its target, options (`cors`, insecure TLS), up/down status, latency, traffic (hits, errors,
|
|
132
|
+
average ms) and public tunnel URL. Filter the list, edit a target inline (Enter saves, Esc cancels), **Share** / **Unshare**
|
|
133
|
+
or remove it. A host whose target doesn't answer is marked in red. It refreshes every 5 s.
|
|
134
|
+
- **Add host:** host + port / host:port / URL, with optional "Insecure TLS" and "Bypass CORS" boxes.
|
|
135
|
+
- **System:** ports, bind addresses and state dir, whether the proxy runs as root/admin, whether ports below 1024 can be bound
|
|
136
|
+
(with the Linux sysctl fix when they can't), CA trust and start-at-boot toggles, and a **Stop proxy** button.
|
|
137
|
+
- **Sharing:** whether `cloudflared` is installed, with an **Install** button when it isn't.
|
|
138
|
+
- **Logs:** a live tail with refresh and clear. **CLI & API:** snippets you can copy.
|
|
139
|
+
|
|
140
|
+
If the proxy stops, the page says so, disables the controls and reconnects by itself when it's back. On phones and tablets
|
|
141
|
+
hosts become cards:
|
|
142
|
+
|
|
143
|
+
<p>
|
|
144
|
+
<img alt="Dashboard on a phone, light theme" src="https://raw.githubusercontent.com/avinashid/locadot/main/docs/screenshots/mobile.png" width="260">
|
|
145
|
+
<img alt="Dashboard on a phone, dark theme" src="https://raw.githubusercontent.com/avinashid/locadot/main/docs/screenshots/mobile-dark.png" width="260">
|
|
146
|
+
</p>
|
|
120
147
|
|
|
121
148
|
Trust and start-at-boot may need elevation. locadot asks the OS for it (polkit on Linux, the password dialog on macOS, UAC on Windows).
|
|
122
149
|
If that isn't possible, for example on a headless Linux box, the panel shows the exact command to run instead: `sudo locadot trust`,
|
|
@@ -160,6 +187,19 @@ The dashboard is served only for the bare `localhost` host names, which also blo
|
|
|
160
187
|
|
|
161
188
|
---
|
|
162
189
|
|
|
190
|
+
## ⬆️ Upgrading from 1.x
|
|
191
|
+
|
|
192
|
+
2.0 changes a few defaults. Your mappings are migrated automatically.
|
|
193
|
+
|
|
194
|
+
- The proxy listens on `127.0.0.1` and `::1` only. Set `LOCADOT_BIND=0.0.0.0` if you relied on LAN access.
|
|
195
|
+
- The registry is stored in a new format that 1.x can't read. Don't downgrade without backing up `locadot path:hosts`.
|
|
196
|
+
- `-h` means `--host` on every command. Help is `--help`.
|
|
197
|
+
- Bare `localhost` is the dashboard and can't be mapped.
|
|
198
|
+
|
|
199
|
+
See [CHANGELOG.md](CHANGELOG.md) for everything new.
|
|
200
|
+
|
|
201
|
+
---
|
|
202
|
+
|
|
163
203
|
## ⚙️ Configuration
|
|
164
204
|
|
|
165
205
|
All optional, via environment variables. Set them for the CLI; the proxy it starts inherits them.
|