fix: remote browser port proxy and UX improvements#607
Open
simple-agent-manager[bot] wants to merge 5 commits intomainfrom
Open
fix: remote browser port proxy and UX improvements#607simple-agent-manager[bot] wants to merge 5 commits intomainfrom
simple-agent-manager[bot] wants to merge 5 commits intomainfrom
Conversation
- BrowserSidecar component opens Neko URL in a new tab instead of iframe - Add "Remote Browser" button to SessionHeader in project chat view - useBrowserSidecar hook supports session-mode (projectId + sessionId) Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
- GetNekoTarget() in browser manager resolves Neko container's bridge IP so port proxy routes to the Neko sidecar instead of the DevContainer - Port proxy strips split auth headers (X-SAM-Port-Token-A/B) before forwarding to container apps to prevent credential leakage - Token resolution supports split JWT headers from API Worker, with fallback to single header, Bearer, and query parameter Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
Cloudflare's edge proxy returns 502 for same-zone subrequests when a
single header value contains a full JWT token. Splitting the JWT across
X-SAM-Port-Token-A and X-SAM-Port-Token-B headers bypasses this.
The VM agent reassembles the split token before JWT validation. The
Worker also strips the client Authorization header to prevent it from
being forwarded to the origin.
Verified end-to-end: Neko browser sidecar accessible via port proxy
subdomain (ws-{id}--8080.sammy.party) on fresh staging node.
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
Append ?usr=user&pwd={password} to the Neko URL so users connect
automatically without needing to know the credentials. Neko supports
these query parameters for prefilling the login form.
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
…fault port to 6080
Two fixes:
1. Auto-login URL was using config default password ("neko") instead of the
actual per-container random password stored in SidecarState. Now uses
state.Password which is the 64-char hex string generated at container start.
2. Changed default Neko port from 8080 to 6080 to avoid shadowing user dev
servers (many frameworks default to 8080). Port is configurable via
NEKO_WEBRTC_PORT env var.
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
|
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.



Summary
X-SAM-Port-Token-A/B) to avoid Cloudflare edge 502 on same-zone subrequests with large header valuesworkspace_routing.goto reassemble split JWT headers, with fallback to single header, Bearer, and query param?usr=user&pwd={random_password}using the actual per-container random password (not config defaults). Neko'sconnect.vue:mounted()auto-connects when both params are present.NEKO_WEBRTC_PORTenv var) to avoid shadowing user dev serversVerification Evidence (Staging)
Tested on staging with fresh node (rule 27: delete all nodes → deploy → test fresh):
Port isolation
<h1>Hello from Elysia</h1>Auto-login
member/list,screen/resolution(1920x1080@30),system/initWorkspace isolation
neko-{workspaceId}— each workspace gets its own containersidecarsmap inmanager.gokeyed by workspaceIDTest plan
🤖 Generated with Claude Code