mirror of
https://github.com/vercel-labs/portless.git
synced 2026-09-14 16:37:59 +08:00
9.8 KiB
9.8 KiB
Changelog
0.9.0
Breaking Changes
- HTTPS on port 443 is now the default: The proxy defaults to HTTPS on port 443 instead of HTTP on port 1355. Auto-elevates with sudo on macOS/Linux to bind privileged ports. Use
--no-tlsfor plain HTTP on port 80, or-p 1355for the previous unprivileged port. (#172) PORTLESS_HTTPSenv var inverted: HTTPS is on by default; setPORTLESS_HTTPS=0to disable (replaces the oldPORTLESS_HTTPS=1opt-in). (#172)
New Features
- HTTP-to-HTTPS redirect: When the HTTPS proxy runs on port 443, a companion HTTP server on port 80 automatically redirects all requests to HTTPS. (#172)
- Auto-sudo for proxy lifecycle:
portless proxy startauto-elevates with sudo when binding privileged ports.portless proxy stopdoes the same when the running proxy is owned by root. (#172) - Clean URLs: URLs are now
https://myapp.localhostinstead ofhttp://myapp.localhost:1355. No port numbers to remember. (#172)
Contributors
- @ctate
0.8.0
Breaking Changes
- Strict subdomain routing is now the default: Subdomains no longer automatically match parent hostnames (e.g.
api.myapp.localhostno longer routes tomyapp.localhost). Use the--wildcardflag orPORTLESS_WILDCARD=1env var to restore the previous behavior. (#158)
New Features
--wildcardflag: Opt in to wildcard subdomain routing where subdomains match registered parent hostnames. Configurable viaPORTLESS_WILDCARDenv var. (#158)
Bug Fixes
- Cert generation with dots in
$HOME: Fix TLS certificate generation failing when the home directory path contains dots (#157) - DNS label limit for
--nameflag: Fix regression where long--namevalues could exceed the 63-character DNS label limit (#144) - Windows
DEP0190deprecation warning: Silence Node.js deprecation warning on Windows by replacingshell: truewith explicitcmd.exe /d /s /cspawning (#160) - Windows duplicate
PATHentries: DeduplicatePATHenvironment variables in child process spawn on Windows (#155)
Improvements
- Removed chalk dependency: Replaced chalk with lightweight ANSI color utilities to reduce install size (#170)
- Automated release process: Added CI workflow for automated npm publishing and GitHub releases (#169)
Contributors
- @ctate
- @mynameistito
0.7.2
Bug Fixes
--portinjection for package runners: Fixed--portinjection for commands run via package runners likenpx,pnpm dlx, etc. (#150)- TLS cert generation: Fixed TLS cert generation for long hostnames and proxy startup races (#149)
- Proxy crash on ECONNRESET: Handle
ECONNRESETerrors on TLS wrapper sockets to prevent proxy crash (#127) - Windows
node not recognized: Resolvednode not recognizederror on Windows when runningportless run(#126)
Documentation
- Added Windows to docs requirements section (#122)
Improvements
- Added GitHub Action for automated npm publishing (#130)
0.7.1
Documentation
- Updated docs site header (#118)
0.7.0
Features
- Windows support: Full cross-platform support for Windows. Uses
os.tmpdir()for state directory,netstat -anofor port detection,shell: truefor command spawning,certutilfor CA trust, andwindowsHidefor daemon spawn. Includes Windows CI job in GitHub Actions. (#6)
Bug Fixes
--namesanitization inportless run: Stop replacing dots with hyphens in--namevalues. Dots are valid and intentional in hostnames likelocal.metaview. The direct form andportless getalready preserved dots; nowrun --nameis consistent. (#108)- worktree prefix only for linked worktrees: Only prepend the branch name for linked worktrees, not the root worktree. Previously any non-main branch got a prefix when multiple worktrees existed, even in the primary clone. (#108)
- Windows hosts file paths: Use platform-aware hosts file path (
C:\Windows\System32\drivers\etc\hostson Windows,/etc/hostson Unix) and platform-appropriate error messages (Administrator vs sudo). (#113)
0.6.0
Features
- custom TLD: Use
--tldto set a custom TLD (e.g..test) instead of.localhost. Configurable viaPORTLESS_TLDenv var. The proxy auto-syncs/etc/hostsfor custom TLDs when started with sudo. Warns about risky TLDs like.local(mDNS/Bonjour conflicts) and.dev(Google-owned, HSTS). Recommended:.test(IANA-reserved, no collision risk). (#93) portless getcommand: Print the URL for a service, useful for wiring services together (e.g.BACKEND_URL=$(portless get backend)). Applies worktree prefix detection by default; use--no-worktreeto skip it. (#88)--nameflag forportless run: Override the inferred base name while preserving the worktree prefix (e.g.portless run --name myapp next devin a worktree producesfix-ui.myapp.localhost). (#89)
Bug Fixes
- HTTPS proxy trust and stop on macOS with sudo: Fix CA trust check and
proxy stopwhen the proxy was started with sudo on macOS. (#98) - DNS label length for worktree hostnames: Truncate worktree-prefixed hostnames to respect the 63-character DNS label limit. (#87)
0.5.2
Documentation
- Add git worktree documentation to README, docs site, and agent skill.
portless runautomatically detects linked worktrees and prefixes the URL with the branch name (e.g.fix-ui.myapp.localhost). - Document worktree support in 0.5.0 changelog entry.
0.5.1
Bug Fixes
- npm README: Copy root
README.mdinto the package at publish time so it appears on npmjs.com. - homepage: Point npm homepage to https://port1355.dev.
0.5.0
Features
portless runsubcommand: Automatically infer the project name frompackage.json, git root, or directory name instead of specifying it manually. In git worktrees, the branch name is prepended as a subdomain prefix (e.g.fix-ui.myapp.localhost) so each worktree gets a unique URL with no config changes. (#55, #68)portless aliascommand: Register routes for services not spawned by portless (e.g. Docker containers with published ports). Aliases persist across stale-route cleanup. (#73)PORTLESS_URLenv var: Child processes now receivePORTLESS_URLcontaining the public.localhostURL (e.g.http://myapp.localhost:1355) so apps can self-reference their own URL. (#56)--app-portflag: Specify a fixed port for the app instead of automatic assignment. Also configurable viaPORTLESS_APP_PORTenv var. Useful when integrating with tools that provide their own port. (#72)- wildcard subdomain routing: Subdomains now match registered hostnames (e.g.
tenant.myapp.localhostmatchesmyapp.localhost). Exact matches take priority over wildcard matches. (#71) /etc/hostssync: Automatically sync.localhosthostnames to/etc/hostsfor environments where.localhostdoes not resolve to127.0.0.1by default. (#74)- multi-distro Linux CA trust:
portless trustnow supports Arch, Fedora/RHEL/CentOS, and openSUSE in addition to Debian/Ubuntu. Falls back to command probing when/etc/os-releasedetection fails. (#45) - Expo and React Native support: Auto-inject
--portand--hostflags forexpo startandreact-native start. (#42) - branded error and status pages: The proxy now renders styled HTML pages for 404, 502, 508, and other status codes instead of plain text. (#70)
Bug Fixes
- stream errors: Handle proxy stream errors gracefully to prevent unhandled exceptions from crashing the proxy. (#57)
0.4.2
Bug Fixes
- spawn ENOENT: Use
/bin/sh -cfor command execution so shell scripts and version-manager shims (nvm, fnm, mise) are resolved correctly. Prependnode_modules/.bintoPATHso local project binaries (e.g.next,vite) are found without a global install. (#21, #29) - sudo state directory permissions: System state directory (
/tmp/portless) now uses world-writable + sticky-bit permissions (1777) so non-root processes can register routes after a sudo proxy start. Route and state files created under sudo are chowned back to the real user. (#16) - duplicate route names:
addRoutenow checks for an existing live route and throwsRouteConflictErrorif the hostname is already registered by a running process. Use--forceto override. (#38) - TLS SHA-1 rejection: Force SHA-256 for all CA and server certificate generation. Detect and regenerate existing SHA-1 certificates automatically. Uses the
opensslCLI for signature algorithm checks to maintain compatibility with Node.js < 24.9. (#36) - per-hostname certs for
.localhostsubdomains: Issue a per-hostname certificate with an exact SAN for every.localhostsubdomain (including single-level likemyapp.localhost).*.localhostwildcard certs are invalid because.localhostis a reserved TLD per RFC 2606 section 2. (#18) - terminal left in raw mode: Reset
stdin.setRawMode(false)on process exit so the terminal is not left in raw mode after SIGINT. (#51)
Features
- proxy loop detection: Detect forwarding loops (e.g. a Vite dev server proxying back through portless without
changeOrigin: true) using theX-Portless-Hopsheader. Respond with508 Loop Detectedand a message explaining the fix. Also detects loops on WebSocket upgrades. (#48, #52) --forceflag: Override a route registered by another process withportless <name> --force <cmd>.
0.4.1
Bug Fixes
- Fix Vite support and add e2e tests for 11 frameworks. (#32)
0.4.0
Features
- HTTP/2 + HTTPS support with auto-generated local CA and per-hostname TLS certificates. (#10)
0.3.0
Bug Fixes
- Fix proxy routing issues. (#4)
0.2.2
Improvements
- Block
npx/pnpm dlxusage and improve agent skill. (#1, #2)
0.2.1
Bug Fixes
- Fix proxy routing issue.
0.2.0
Features
- Add
--port/-pflag to the proxy command.
0.1.0
Initial release.