Skip to content

Add multiplexed hostname routing#264

Open
RhysSullivan wants to merge 6 commits intovercel-labs:mainfrom
RhysSullivan:codex/multiplex-hostnames
Open

Add multiplexed hostname routing#264
RhysSullivan wants to merge 6 commits intovercel-labs:mainfrom
RhysSullivan:codex/multiplex-hostnames

Conversation

@RhysSullivan
Copy link
Copy Markdown

@RhysSullivan RhysSullivan commented Apr 29, 2026

AI generated PR disclosure

Screen.Recording.2026-04-29.at.12.14.13.AM.mov

Overall pretty happy with this, behavior:

  • If just one app is running, it works like normal
  • If multiple apps are running, it prompts you to select and app and saves your choice
  • There's a button in the bottom right to swap between selected apps and clear selection
  • Worktrees redirect you to the right location

Use case is for redirects with auth. Manually reviewed the code and am happy with it, the HTML insertion is ugly but works.

AI Summary below:

Summary

  • add multiplexed hostname routing behind --multiplex / PORTLESS_MULTIPLEX=1
  • show a selector when multiple apps share the same hostname and persist the selected app in a cookie
  • inject a small app switcher into HTML responses when multiple apps are available
  • update route persistence, CLI behavior, docs, and tests for multiplex mode

Validation

  • pnpm --filter portless build
  • pnpm --filter portless type-check
  • pnpm --filter portless lint
  • pnpm --filter portless test -- src/routes.test.ts src/proxy.test.ts src/cli-utils.test.ts src/cli.test.ts
  • pnpm --filter portless test

Notes

  • Manually tested two apps on mux.localhost:1355 with the portless proxy in multiplex mode.

@vercel
Copy link
Copy Markdown

vercel Bot commented Apr 29, 2026

@RhysSullivan is attempting to deploy a commit to the Vercel Labs Team on Vercel.

A member of the Team first needs to authorize it.

@RhysSullivan RhysSullivan marked this pull request as ready for review April 29, 2026 07:41
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant