#564
--unprivileged --https proxy comes back as plain HTTP after it stops
Version
0.16.0 (also on main, 49586cf)
Steps to reproduce
portless proxy start --unprivileged --httpsportless proxy stop(killing the proxy does the same)portless run next dev, or anything else that auto-starts the proxy
Expected behavior
The auto-started proxy uses HTTPS on 443 again. The docs say unprivileged mode is remembered for auto-start, and --https is how you keep HTTPS in that mode.
Actual behavior
It starts a plain HTTP proxy on port 80, so apps get http:// URLs. --unprivileged survives the restart and --https doesn't.
The exit cleanup resets proxy.tls (cli.ts#L1078) but keeps proxy.unprivileged, and unprivileged mode falls back to HTTP unless HTTPS is passed explicitly (cli.ts#L310). PORTLESS_HTTPS=1 works around it.
With --idle-exit from #563 this would happen on every cycle.
Environment
macOS 27.2, Node 26.13.0
Thanks for the clear repro and for tracing it to the cleanup. Reproduced on main (49586cf) with both
proxy stopand a SIGTERM: after the exitproxy.tlsis gone whileproxy.unprivilegedstays, so the nextportless runcomes up as plain HTTP on port 80.For #563, the latest commit (4f5f757) makes an idle exit keep the remembered port, TLS, TLD and LAN settings, so the idle-exit cycle won't hit this.
For a regular stop, I'll open a small fix that keeps the TLS setting together with the unprivileged marker, so
--unprivileged --httpscomes back as HTTPS on 443. Until then,PORTLESS_HTTPS=1is the right workaround.