rb-portless 0.5.2 → 0.17.0.0.dev.20261116.bc73b2e
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.
- checksums.yaml +4 -4
- data/AGENTS.md +129 -110
- data/CHANGELOG.md +88 -0
- data/README.md +101 -210
- data/exe/rb-portless +14 -2
- data/lib/portless/args.rb +104 -0
- data/lib/portless/auto.rb +167 -0
- data/lib/portless/certs.rb +350 -118
- data/lib/portless/clean_utils.rb +221 -0
- data/lib/portless/cli.rb +921 -316
- data/lib/portless/cloudflare.rb +45 -0
- data/lib/portless/colors.rb +19 -6
- data/lib/portless/commands.rb +39 -0
- data/lib/portless/compose.rb +805 -0
- data/lib/portless/config.rb +293 -63
- data/lib/portless/constants.rb +30 -16
- data/lib/portless/daemon.rb +1378 -138
- data/lib/portless/doctor.rb +280 -0
- data/lib/portless/fonts.rb +12 -0
- data/lib/portless/frameworks.rb +380 -25
- data/lib/portless/free_port.rb +34 -16
- data/lib/portless/health.rb +18 -77
- data/lib/portless/help.rb +468 -0
- data/lib/portless/hosts.rb +108 -25
- data/lib/portless/hosts_sync_auth.rb +68 -0
- data/lib/portless/lan_ip.rb +90 -7
- data/lib/portless/mcp.rb +705 -0
- data/lib/portless/mdns.rb +113 -24
- data/lib/portless/multi.rb +308 -40
- data/lib/portless/pages.rb +319 -0
- data/lib/portless/port_owner.rb +147 -18
- data/lib/portless/privilege.rb +160 -20
- data/lib/portless/process_group.rb +157 -0
- data/lib/portless/proxy.rb +992 -267
- data/lib/portless/route_store.rb +443 -122
- data/lib/portless/run_support.rb +147 -52
- data/lib/portless/runner.rb +322 -98
- data/lib/portless/service.rb +631 -72
- data/lib/portless/share/tailscale.rb +240 -96
- data/lib/portless/state.rb +234 -25
- data/lib/portless/trust.rb +281 -125
- data/lib/portless/tunnel.rb +335 -0
- data/lib/portless/turbo.rb +73 -0
- data/lib/portless/utils.rb +232 -0
- data/lib/portless/version.rb +1 -1
- data/lib/portless/workspace.rb +140 -0
- data/lib/rb-portless.rb +21 -8
- metadata +81 -18
- data/lib/portless/banner.rb +0 -49
- data/lib/portless/rails.rb +0 -74
- data/lib/portless/rails_hosts.rb +0 -93
- data/lib/portless/share/ngrok.rb +0 -69
- data/lib/portless/worktree.rb +0 -79
checksums.yaml
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
---
|
|
2
2
|
SHA256:
|
|
3
|
-
metadata.gz:
|
|
4
|
-
data.tar.gz:
|
|
3
|
+
metadata.gz: 0b32af910e6338f35f5dfadb57a77e0115c4a2179e3c5717c0dbb839ec89a2df
|
|
4
|
+
data.tar.gz: 1a08fc95ce0ace8422b5cd1e7f9b6d54aa4f60e715474e136532f6e610dfde0a
|
|
5
5
|
SHA512:
|
|
6
|
-
metadata.gz:
|
|
7
|
-
data.tar.gz:
|
|
6
|
+
metadata.gz: 909e6ef30aa7a1367b66c76fb436ed9fcb1ef6e4d77279014dc4a938afae4cdca3a3f4ec600b4436a31b1ace10c09fcd75f24745fa5c8f95665e70fe582ddb1e
|
|
7
|
+
data.tar.gz: 76213c4a675c7ed41507fad512c74245a410b1feba61275a622fad9320078e14ab5e2a640add82b91f86250b89656c09bb73211a7d6f037c02dfda3e9667df2d
|
data/AGENTS.md
CHANGED
|
@@ -1,118 +1,137 @@
|
|
|
1
1
|
# AGENTS.md — rb-portless
|
|
2
2
|
|
|
3
|
-
A native-Ruby port of Vercel's **portless** (`references/portless`,
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
##
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
3
|
+
A native-Ruby port of Vercel's **portless** (upstream clone: `references/portless`,
|
|
4
|
+
gitignored; `git clone https://github.com/vercel-labs/portless references/portless`).
|
|
5
|
+
This file is the map; read it before changing things.
|
|
6
|
+
|
|
7
|
+
## Goal: exact parity, nothing more
|
|
8
|
+
|
|
9
|
+
rb-portless does exactly what upstream portless does — same commands, flags, env vars,
|
|
10
|
+
config schema, routing, JSON shapes, exit codes, and output (with `portless` →
|
|
11
|
+
`rb-portless` in command examples). No rb-portless-only features: project-specific
|
|
12
|
+
needs (Rails tenant subdomains, etc.) live in a separate project. When the two
|
|
13
|
+
differ, match upstream. Port upstream changes by reading the TS function first and
|
|
14
|
+
writing the Ruby one with the same name in snake_case, so the two stay diffable.
|
|
15
|
+
|
|
16
|
+
Deliberate divergences (naming only, so both tools coexist):
|
|
17
|
+
|
|
18
|
+
- Executable/gem `rb-portless`, Ruby module `Portless`.
|
|
19
|
+
- State dir `~/.rb-portless` (`PORTLESS_STATE_DIR` overrides). File names inside it
|
|
20
|
+
match upstream.
|
|
21
|
+
- Hosts block markers `# rb-portless-start/end`; service ids `rb.portless.proxy` /
|
|
22
|
+
`rb-portless.service`; CA common name and page footer say "rb-portless".
|
|
23
|
+
- The child env also gets `SSL_CERT_FILE` (system roots + local CA, `ca_bundle.rb`) under
|
|
24
|
+
the same conditions as `NODE_EXTRA_CA_CERTS` — the Ruby analogue, so Ruby clients
|
|
25
|
+
trust sibling `.localhost` HTTPS apps.
|
|
26
|
+
- The child runs in `Bundler.unbundled_env` (plumbing, not a feature).
|
|
27
|
+
- `GEM_HOME`/`GEM_PATH` cross `sudo env` and go into the boot service env when set
|
|
28
|
+
(`Privilege.ruby_env`), so a gem under a custom GEM_HOME loads as root.
|
|
29
|
+
- `doctor` reports the Ruby runtime (`rubyVersion` in `--json`, "Ruby" in text) where
|
|
30
|
+
upstream reports Node.js.
|
|
31
|
+
|
|
32
|
+
Known limits of the async-http stack (not choices; don't "fix" them by hand-rolling HTTP):
|
|
33
|
+
empty bodies are framed as `content-length: 0` (responses, and bodiless requests sent to
|
|
34
|
+
the backend), and empty responses carry no `connection: keep-alive`; a rejected
|
|
35
|
+
WebSocket upgrade gets async-http's own `connection: close` instead of the backend's;
|
|
36
|
+
"socket hang up" is ECONNRESET/EPIPE/EOF/`Protocol::HTTP::RefusedError`; WebSocket over
|
|
37
|
+
HTTP/2 extended CONNECT reaches the backend with async-http's lowercase `connection: upgrade`;
|
|
38
|
+
no `100 Continue` interim response; malformed requests differ in detail (duplicate `Host`
|
|
39
|
+
→ 400, absolute-URI request lines route by the URI authority, no `Date` header or 5 s
|
|
40
|
+
idle keep-alive timeout, lowercase h1 response header names, duplicate headers not
|
|
41
|
+
joined); there is one loopback dialer per concurrency model (`Proxy.create_loopback_connection` on
|
|
42
|
+
fibers for the proxy, `Utils.create_loopback_connection` on threads for probes) where
|
|
43
|
+
upstream has one `createLoopbackConnection`.
|
|
44
|
+
|
|
45
|
+
Not ported (yet): Windows CA trust + Task Scheduler service, the legacy `/tmp/portless`
|
|
46
|
+
state migration.
|
|
47
|
+
|
|
48
|
+
Agent skills (`skills/`) are upstream's `skills/portless` and `skills/oauth`, rewritten
|
|
49
|
+
for Ruby/Rails as `rb-portless` and `rb-portless-oauth` (different names so they install
|
|
50
|
+
next to upstream's). Same section order as upstream; keep behaviour claims in sync with
|
|
51
|
+
the code, and port upstream skill edits when you port the feature they describe.
|
|
52
|
+
|
|
53
|
+
## Versioning
|
|
54
|
+
|
|
55
|
+
The version mirrors the upstream release we match, plus a fourth segment for our own
|
|
56
|
+
fixes: `0.17.0.0` = parity with upstream 0.17.0, `0.17.0.1` = first local fix on top.
|
|
57
|
+
Only claim an upstream version once its features are in. `script/upstream/PIN` is the exact
|
|
58
|
+
upstream commit we match; when it is past the release tag, say so in the CHANGELOG.
|
|
59
|
+
|
|
60
|
+
## Core mechanisms (upstream invariants)
|
|
61
|
+
|
|
62
|
+
- **No daemon IPC.** Coordination is files in the state dir: `routes.json` (upstream
|
|
63
|
+
`RouteMapping` array, camelCase keys, written atomically under a `mkdir` lock; dead
|
|
64
|
+
owners filtered on read, kept as `retired` for `prune`), plus the `proxy.*` markers
|
|
65
|
+
(`pid`, `port`, `start`, `tls`, `tlds`, `lan` = LAN IP, `unprivileged`,
|
|
66
|
+
`custom-cert`, `hosts-sync-token`). The daemon polls `routes.json` (upstream:
|
|
67
|
+
`fs.watch`).
|
|
68
|
+
- **Privileged ports.** Probe-bind first; only on `EACCES` re-run under
|
|
69
|
+
`sudo env PORTLESS_*=…`. Declined sudo exits with a recovery command (no fallback
|
|
70
|
+
port). `--unprivileged` binds without sudo and accepts loopback peers only.
|
|
71
|
+
- **Health header** `X-Portless: 1` on every response; a probe for it tells our proxy from
|
|
72
|
+
any other process on the port. Loops are counted with `x-portless-hops` (508 at 5).
|
|
73
|
+
- **Routing** is strict by default; `--wildcard` falls back to the most specific
|
|
74
|
+
registered parent. Hosts outside the configured TLDs get 421.
|
|
75
|
+
- **Per-host SNI certs**, minted only for names under the configured TLDs, cached on
|
|
76
|
+
disk and in memory.
|
|
77
|
+
- **Loopback by default.** `--lan` makes LAN a proxy mode: binds `0.0.0.0` + `::`,
|
|
78
|
+
forces `.local`, publishes every route over mDNS, re-checks the LAN IP every 5 s.
|
|
79
|
+
- **State-dir safety.** Commands refuse a state dir another user can change; root-side
|
|
80
|
+
writes never follow symlinks.
|
|
81
|
+
|
|
82
|
+
## Upstream test suite (test/upstream)
|
|
83
|
+
|
|
84
|
+
`test/upstream/` mirrors upstream's tests one to one: `packages/portless/src/foo-bar.test.ts`
|
|
85
|
+
→ `test/upstream/foo_bar_test.rb`, `tests/e2e/src/foo.test.ts` → `test/upstream/e2e/foo_test.rb`.
|
|
86
|
+
Each upstream `describe`/`it` is a Minitest::Spec `describe`/`it` with the **identical string**,
|
|
87
|
+
and the body ports the upstream body: same setup, same inputs, same assertions, adapted to
|
|
88
|
+
the Ruby API (snake_case names, Ruby exceptions, our naming divergences). `it.each`/`it.for`
|
|
89
|
+
keep the template string once and loop the rows. Never weaken an assertion to make it pass:
|
|
90
|
+
a failing ported test is a parity bug in `lib/`, fix the code. Upstream tests that cannot
|
|
91
|
+
apply (Windows-only) go in `test/upstream/skips.yml` with a reason. Ruby-only tests (CA
|
|
92
|
+
bundle, keychain safety, our e2e harness) stay in `test/*_test.rb`.
|
|
93
|
+
|
|
94
|
+
- `script/upstream/check_tests [--list] [--file x] [--ref sha]` — every upstream test has its
|
|
95
|
+
Ruby twin in the right file, nothing extra (`rake upstream:check`).
|
|
96
|
+
- `script/upstream/sync [--fetch] [--to ref]` — commits, source files → Ruby files to update
|
|
97
|
+
(`script/upstream/map.yml`), tests added/removed since `script/upstream/PIN`
|
|
98
|
+
(`rake upstream:sync`). Its header lists the release workflow; `--bump ref` moves PIN once
|
|
99
|
+
the mirror matches.
|
|
100
|
+
- `test/differential/run.rb` — same commands against both CLIs, output diffed.
|
|
37
101
|
|
|
38
102
|
## Module map (`lib/portless/`)
|
|
39
103
|
|
|
40
|
-
| File |
|
|
41
|
-
| --- | --- |
|
|
42
|
-
| `
|
|
43
|
-
| `
|
|
44
|
-
| `
|
|
45
|
-
| `
|
|
46
|
-
| `
|
|
47
|
-
| `
|
|
48
|
-
| `
|
|
49
|
-
| `
|
|
50
|
-
| `
|
|
51
|
-
| `
|
|
52
|
-
| `
|
|
53
|
-
| `
|
|
54
|
-
| `
|
|
55
|
-
| `
|
|
56
|
-
| `
|
|
57
|
-
| `
|
|
58
|
-
| `
|
|
59
|
-
| `
|
|
60
|
-
| `
|
|
61
|
-
| `
|
|
62
|
-
| `cli.rb` | command dispatch | cli.ts main |
|
|
63
|
-
|
|
64
|
-
## Status
|
|
65
|
-
|
|
66
|
-
- **Phase 0 ✅** scaffold + coordination layer (config, state, free_port,
|
|
67
|
-
route_store, health, privilege, hosts) + CLI dispatch.
|
|
68
|
-
- **Phase 1 ✅** HTTPS proxy on async-http (TLS+SNI, h1+wildcard routing,
|
|
69
|
-
X-Forwarded-*, loop guard), certs + macOS trust, runner, sudo bind + 1355
|
|
70
|
-
fallback. **Verified against shirabe** at `https://*.shirabe.org.localhost`.
|
|
71
|
-
- **Phase 2 ✅** HTTP/2, full command surface (doctor/clean/prune/alias/get/hosts),
|
|
72
|
-
boot service (launchd/systemd), daemon lifecycle.
|
|
73
|
-
- **Phase 3 ✅ (partial)** framework `--port`/`--host` injection, Linux CA trust,
|
|
74
|
-
Firefox/Chrome NSS trust (`certutil` into each profile + `~/.pki/nssdb`),
|
|
75
|
-
optional `portless/rails` railtie.
|
|
76
|
-
|
|
77
|
-
- **Phase 4 ✅** startup banner; monorepo multi-app (`apps` map); LAN mode
|
|
78
|
-
(`--lan`: LanIp + mDNS `<name>.local`); public sharing (`--ngrok`/`--tailscale`/
|
|
79
|
-
`--funnel`, experimental).
|
|
80
|
-
|
|
81
|
-
- **Phase 5 ✅** end-to-end tests (`test/e2e_*_test.rb`, modeled on portless's
|
|
82
|
-
`tests/e2e`): a real proxy daemon on a high port + live backends. Cover
|
|
83
|
-
TLS/SNI, wildcard subdomains, X-Forwarded-*, HTTP/2, the WebSocket relay,
|
|
84
|
-
`run` lifecycle, and a real Rails app booted with the railtie.
|
|
85
|
-
|
|
86
|
-
### Roadmap (not yet built)
|
|
87
|
-
|
|
88
|
-
Deliberately skipped for now (revisit on demand):
|
|
89
|
-
|
|
90
|
-
- Windows CA trust + Task Scheduler service (no Windows machine to verify).
|
|
91
|
-
- Custom certs (`proxy start --cert/--key` upstream) — niche; the local CA
|
|
92
|
-
covers the normal flow.
|
|
93
|
-
- HTTP/2 to the backend, mDNS LAN-IP re-publish on network change, and a
|
|
94
|
-
brief backend retry-while-booting — low practical value in dev.
|
|
95
|
-
- `PORTLESS_SYNC_HOSTS` auto hosts-sync (we keep `hosts sync` manual).
|
|
96
|
-
|
|
97
|
-
### Test backlog
|
|
98
|
-
|
|
99
|
-
- CLI arg edge cases (`alias` add/remove, `get`, `doctor` exit codes) and the
|
|
100
|
-
bin/dev → bin/rails resolved-command fallback.
|
|
101
|
-
|
|
102
|
-
### Known divergences from portless (deliberate)
|
|
103
|
-
|
|
104
|
-
- Wildcard subdomain fallback is always on (upstream defaults strict, opt-in
|
|
105
|
-
via `--wildcard`) — subdomain-per-tenant Rails apps are the headline here.
|
|
106
|
-
- `portless.json` schema: `tld`/`tls` are ours; upstream keys `script`,
|
|
107
|
-
`proxy`, path-keyed `apps`, and package.json config don't apply to Ruby.
|
|
108
|
-
- Health header is `x-rb-portless: <version>` (upstream: `X-Portless: 1`);
|
|
109
|
-
the version value drives the stale-proxy handshake.
|
|
104
|
+
| File | Upstream source |
|
|
105
|
+
| --- | --- |
|
|
106
|
+
| `cli.rb`, `commands.rb`, `help.rb` | cli.ts dispatch, commands.ts, help text |
|
|
107
|
+
| `args.rb` | args.ts (strict flag parsing, `UsageError` → exit 2) |
|
|
108
|
+
| `utils.rb` | utils.ts / cli-utils.ts shared helpers (ports, URLs, TLDs, env) |
|
|
109
|
+
| `config.rb`, `auto.rb` | config.ts, auto.ts (name inference, worktree prefix) |
|
|
110
|
+
| `workspace.rb`, `turbo.rb`, `multi.rb` | workspace.ts, turbo.ts, multi-app run |
|
|
111
|
+
| `runner.rb`, `run_support.rb`, `process_group.rb` | cli.ts runApp, child env, spawn/signals |
|
|
112
|
+
| `frameworks.rb`, `free_port.rb` | cli-utils.ts port/host injection, findFreePort |
|
|
113
|
+
| `route_store.rb` | routes.ts |
|
|
114
|
+
| `proxy.rb`, `pages.rb`, `fonts.rb` | proxy.ts, pages.ts, fonts.ts |
|
|
115
|
+
| `certs.rb`, `trust.rb`, `ca_bundle.rb` | certs.ts (+ Ruby CA bundle) |
|
|
116
|
+
| `daemon.rb` | cli.ts handleProxy/stopProxy/ensureProxyRunning, cli-utils.ts discoverState |
|
|
117
|
+
| `state.rb`, `privilege.rb`, `port_owner.rb` | utils.ts state dir + safety, elevation, port owners |
|
|
118
|
+
| `health.rb` | cli-utils.ts proxy probes |
|
|
119
|
+
| `hosts.rb`, `hosts_sync_auth.rb` | hosts.ts, hosts-sync-auth.ts |
|
|
120
|
+
| `lan_ip.rb`, `mdns.rb` | lan-ip.ts, mdns.ts |
|
|
121
|
+
| `tunnel.rb`, `cloudflare.rb`, `share/tailscale.rb` | tunnel.ts (ngrok), cloudflare.ts, tailscale.ts |
|
|
122
|
+
| `service.rb` | service.ts (launchd/systemd) |
|
|
123
|
+
| `clean_utils.rb`, `doctor.rb` | clean-utils.ts, cli.ts doctor |
|
|
124
|
+
| `mcp.rb` | mcp.ts |
|
|
125
|
+
| `compose.rb` | compose.ts |
|
|
110
126
|
|
|
111
127
|
## Conventions
|
|
112
128
|
|
|
113
|
-
- Stdlib-first;
|
|
114
|
-
- Minitest
|
|
115
|
-
|
|
116
|
-
|
|
117
|
-
-
|
|
118
|
-
`
|
|
129
|
+
- Stdlib-first; runtime deps are `async` + `async-http` (h1/h2/TLS/WebSocket).
|
|
130
|
+
- Minitest in `test/`. `bundle exec rake` runs every file in parallel (`script/test_parallel`,
|
|
131
|
+
~5 min, bounded by `test/upstream/cli_test.rb`) plus the mirror check; `rake test` is serial. `test_helper.rb` points `HOME` and `PORTLESS_STATE_DIR` at a temp
|
|
132
|
+
dir and puts shims for `security`/`sudo`/`certutil` first on `PATH`, so no test can touch
|
|
133
|
+
`~/.rb-portless`, the keychain, or `/etc/hosts`. Never undo that in a test. Port upstream's unit tests
|
|
134
|
+
alongside the code. The e2e layer (`test/e2e_helper.rb`) runs the real daemon on a
|
|
135
|
+
free high port with `--skip-trust` and `PORTLESS_SYNC_HOSTS=0` (no sudo, no keychain,
|
|
136
|
+
no `/etc/hosts`).
|
|
137
|
+
- Use jj in this repo (see the user's global instructions).
|
data/CHANGELOG.md
CHANGED
|
@@ -4,6 +4,94 @@ All notable changes to this project are documented here. The format follows
|
|
|
4
4
|
[Keep a Changelog](https://keepachangelog.com/), and the project adheres to
|
|
5
5
|
[Semantic Versioning](https://semver.org/).
|
|
6
6
|
|
|
7
|
+
## [0.17.0.0] — 2026-11-16
|
|
8
|
+
|
|
9
|
+
rb-portless now tracks Vercel portless exactly. Versions mirror the upstream
|
|
10
|
+
release we match, plus a fourth segment for our own fixes: this release matches
|
|
11
|
+
portless 0.17.0 plus the unreleased upstream commits up to `73f789e` (`--json` on
|
|
12
|
+
`list`/`get`/`doctor`, exit code 2 for usage errors, strict flag parsing, `clean`
|
|
13
|
+
confirmation, shorter help). Commands, flags, environment variables, `portless.json` /
|
|
14
|
+
`package.json` config, routing, JSON output, exit codes and messages follow
|
|
15
|
+
upstream. The only differences are names (`rb-portless`, `~/.rb-portless`, hosts
|
|
16
|
+
markers, service ids) so both tools can be installed side by side, plus
|
|
17
|
+
`SSL_CERT_FILE` for Ruby children. See README.md.
|
|
18
|
+
|
|
19
|
+
### Breaking
|
|
20
|
+
|
|
21
|
+
- **Ruby 3.3 or later** is required (Ruby 3.2 is end-of-life, and the async-http
|
|
22
|
+
releases rb-portless needs no longer support it), with async 2.46+ and
|
|
23
|
+
async-http 0.105+ (older releases hang WebSocket-over-HTTP/2 tunnels to HTTPS
|
|
24
|
+
backends on Linux).
|
|
25
|
+
- **Rails railtie removed** (`require "portless/rails"`). Allow `*.localhost`
|
|
26
|
+
in `config.hosts` yourself.
|
|
27
|
+
- **Routing is strict by default.** An unregistered subdomain now gets a 404.
|
|
28
|
+
Start the proxy with `--wildcard` (or `PORTLESS_WILDCARD=1`) for the old
|
|
29
|
+
subdomain fallback; it now picks the most specific registered parent.
|
|
30
|
+
- **`portless.json` keys `tld`, `tls` and `app_port`, and the name→command
|
|
31
|
+
`apps` map, are gone.** Use `proxy start --tld` / `PORTLESS_TLD`, `--no-tls` /
|
|
32
|
+
`PORTLESS_HTTPS=0`, `--app-port` / `PORTLESS_APP_PORT`, and path-keyed `apps`.
|
|
33
|
+
- **No `:1355` fallback.** Declining sudo now exits with the command to recover
|
|
34
|
+
(`--unprivileged`, or a port of your own).
|
|
35
|
+
- **`proxy restart` removed**, and `run --lan` no longer restarts the proxy; a
|
|
36
|
+
running proxy with different settings prints upstream's mismatch message.
|
|
37
|
+
- **The bare-run fallback to `bin/dev` / `bin/rails server` is gone.** A bare
|
|
38
|
+
`rb-portless` runs the `package.json` dev script, as upstream does.
|
|
39
|
+
- **Health header is `X-Portless: 1`** (was `x-rb-portless: <version>`), and the
|
|
40
|
+
stale-proxy restart prompt is gone. Restart the proxy after upgrading.
|
|
41
|
+
- **Startup banner** replaced by upstream's run output.
|
|
42
|
+
- **Firefox/Chrome NSS trust** (`certutil`) removed; trust matches upstream.
|
|
43
|
+
- `routes.json` uses upstream's schema. Restart running apps after upgrading.
|
|
44
|
+
|
|
45
|
+
### Security
|
|
46
|
+
|
|
47
|
+
- **LAN mode exposes every running app, as upstream does.** `--lan` is a proxy
|
|
48
|
+
mode: it binds `0.0.0.0` and `::`, switches to `.local`, and publishes every
|
|
49
|
+
route over mDNS. The 0.5.1 per-route `lan: true` gate and the hidden 404 app
|
|
50
|
+
list for LAN clients are removed. Without `--lan` the proxy stays loopback-only.
|
|
51
|
+
- Certificates are minted only for names under the configured TLDs (any SNI
|
|
52
|
+
name used to get a cert), and hosts outside them get 421 instead of a 404
|
|
53
|
+
listing your apps.
|
|
54
|
+
- `proxy stop` verifies the recorded pid is the proxy before signalling it, and
|
|
55
|
+
state dirs other users can change are refused. Root-side state writes never
|
|
56
|
+
follow symlinks.
|
|
57
|
+
- The test suite no longer adds CAs to the login keychain (a test started the
|
|
58
|
+
proxy without `--skip-trust`).
|
|
59
|
+
|
|
60
|
+
### Added
|
|
61
|
+
|
|
62
|
+
- `mcp` (stdio MCP server, `--tools core|proxy|diagnostics|all`), `compose`
|
|
63
|
+
(Docker Compose routes), `--cloudflare`, `alias --upstream` and `alias --tld`,
|
|
64
|
+
`--unprivileged`, multiple and multi-label TLDs, `--wildcard`, `--https`,
|
|
65
|
+
`--cert/--key`, `--skip-trust`, `proxy stop -p`, `--json` for `list`/`get`/
|
|
66
|
+
`doctor`, `clean --yes`, `run --prefix` / `PORTLESS_PREFIX`, the `worktree`
|
|
67
|
+
config, `--script`, `package.json` `"portless"` config, workspace and Turbo
|
|
68
|
+
multi-app runs, hosts sync owned by the daemon, styled error pages, plain HTTP
|
|
69
|
+
on the TLS port redirected to HTTPS, backend connection pooling with parallel
|
|
70
|
+
IPv4/IPv6 dialing, and routes handed to self-daemonizing servers.
|
|
71
|
+
- Agent skills, ported from upstream's `skills/` for Ruby and Rails:
|
|
72
|
+
`rb-portless` (setup, Rails `config.hosts` / `PORT` / `bin/dev`, troubleshooting)
|
|
73
|
+
and `rb-portless-oauth` (OmniAuth/Devise redirect URIs). Install with
|
|
74
|
+
`npx skills add davafons/rb-portless`.
|
|
75
|
+
|
|
76
|
+
### Fixed
|
|
77
|
+
|
|
78
|
+
- Routes whose owner died were still served; a corrupt `routes.json` lost every
|
|
79
|
+
route on the next write.
|
|
80
|
+
- `run` consumed its own flags anywhere in the command (`run vite --force` lost
|
|
81
|
+
`--force`) and ran unknown flags as the command. Usage errors exit 2.
|
|
82
|
+
- `get` dropped the proxy port and the TLD of dotted names.
|
|
83
|
+
- `--port` was added to `vite build` / `astro build` and duplicated after a
|
|
84
|
+
user's `--port`.
|
|
85
|
+
- Multi-app (workspace) runs didn't set `SSL_CERT_FILE` for their children.
|
|
86
|
+
- mDNS advertised port 80 instead of the proxy port; tailscale teardown could
|
|
87
|
+
remove a funnel it didn't create; the state dir under sudo now resolves through
|
|
88
|
+
`SUDO_USER`.
|
|
89
|
+
|
|
90
|
+
### Not ported
|
|
91
|
+
|
|
92
|
+
- Windows CA trust and the Windows boot service, and the legacy `/tmp/portless`
|
|
93
|
+
state migration.
|
|
94
|
+
|
|
7
95
|
## [0.5.2] — 2026-09-08
|
|
8
96
|
|
|
9
97
|
### Fixed
|