The automatic hosts sync that runs on route registration ignores the result of syncHostsFile, which swallows the write error. The manual portless hosts sync command reports failure; the automatic path prints nothing.
So an unprivileged run registers a route, skips the hosts block, and stays quiet. On resolvers that do not handle multi-label .localhost (macOS, see #23), the app then fails server-side with ENOTFOUND and nothing points at the skipped sync. portless doctor catches it, but only if you think to run it.
Repro:
portless proxy start --port 1355 --https (unprivileged).
portless myapp <cmd>. The route registers, /etc/hosts stays unchanged, nothing is printed.
portless doctor warns. Registration time is where the signal belongs.
A one-line warning when the sync cannot write would cover it: hosts sync skipped: /etc/hosts not writable. Run: sudo portless hosts sync.
The automatic hosts sync that runs on route registration ignores the result of
syncHostsFile, which swallows the write error. The manualportless hosts synccommand reports failure; the automatic path prints nothing.So an unprivileged run registers a route, skips the hosts block, and stays quiet. On resolvers that do not handle multi-label .localhost (macOS, see #23), the app then fails server-side with
ENOTFOUNDand nothing points at the skipped sync.portless doctorcatches it, but only if you think to run it.Repro:
portless proxy start --port 1355 --https(unprivileged).portless myapp <cmd>. The route registers,/etc/hostsstays unchanged, nothing is printed.portless doctorwarns. Registration time is where the signal belongs.A one-line warning when the sync cannot write would cover it: hosts sync skipped: /etc/hosts not writable. Run: sudo portless hosts sync.