feat: ca cert download#240
Open
deblasis wants to merge 12 commits intovercel-labs:mainfrom
Open
Conversation
Co-Authored-By: Claude Opus 4.7 <noreply@anthropic.com>
Co-Authored-By: Claude Opus 4.7 <noreply@anthropic.com>
Co-Authored-By: Claude Opus 4.7 <noreply@anthropic.com>
Co-Authored-By: Claude Opus 4.7 <noreply@anthropic.com>
Co-Authored-By: Claude Opus 4.7 <noreply@anthropic.com>
Co-Authored-By: Claude Opus 4.7 <noreply@anthropic.com>
Co-Authored-By: Claude Opus 4.7 <noreply@anthropic.com>
Co-Authored-By: Claude Opus 4.7 <noreply@anthropic.com>
…mmands Co-Authored-By: Claude Opus 4.7 <noreply@anthropic.com>
Prints a plain https://127.0.0.1:<port> URL during proxy startup so VS Code and other IDEs automatically detect and forward the port. Co-Authored-By: Claude Opus 4.7 <noreply@anthropic.com>
|
@deblasis is attempting to deploy a commit to the Vercel Labs Team on Vercel. A member of the Team first needs to authorize it. |
The substring "win" appears in "darwin", causing macOS clients to be detected as Windows. Check mac/darwin first and narrow the Windows check to "windows", "win32", "win64".
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
cert.<tld>HTTP endpoint that serves an OS-aware HTML instructions page (detects OS from User-Agent) or a raw PEM download at/downloadand/ca.pemportless certCLI command that outputs the CA certificate to stdout for piping over SSH (ssh <host> portless cert > portless-ca.pem)getCaCertcallback toProxyServerOptionsso the cert is available even without TLS enabledWhy
My use case, which this PR solves is the following:
Multi-machine environment. One machine (A) has a webapp that uses portless. Another machine (B) effectively controls A via ssh and conveniently uses port-forwarding to access resources on A, including the aforementioned webapp.
Portless handles the CA management locally on A but in this case, the CA needs to be installed on B.
So, yeah, I built this little thing and functionally it works. Now I can download the cert from B and install it and it works fine.
I am not 100% sure about the UX yet but I am sharing this in case you like the idea and we want to push this down the line together.
Happy to put some neurons and tokens to work to ship it if you like it.
There is dark mode as well, don't freak out! 😄
Gotchas
I manage machine A from VSCode/Cursor in B for some design work, so I echo the listening server so that VSCode can pick up the port-forwarding automatically.
It works by pattern matching, so perhaps it could look better with a nicer message, unless you reckon it's just better to drop it entirely and let the user handle it manually.
Test Plan
detectOSandrenderCertPageinpages.test.tshttps://cert.localhostin browser and verify page rendersportless cert > /tmp/test-ca.pemand verify valid PEM output