provide a go script to forward https requests to http#16
Open
ficapy wants to merge 1 commit into
Open
Conversation
bigdcore
reviewed
Nov 22, 2024
bigdcore
left a comment
There was a problem hiding this comment.
Well, I guess I'm a little lazier than you are because it took me two days to figure out that I was just bouncing off the wall
GloriaOS
reviewed
Jun 7, 2026
GloriaOS
left a comment
Collaborator
There was a problem hiding this comment.
Thanks for this PR, ficapy! This is a genuinely useful tool — auto-downloading the cert and setting up an HTTPS→HTTP proxy in one command is very clean.
I reviewed the code and have a few suggestions before merging:
🐛 Bug: Wrong download URL
The script downloads from https://aka.re/localhost but the self-signed cert bundle is at https://aka.re/localhost-ss. The current URL might 404 or return the wrong content.
💡 Suggestions
- Cert caching — Consider caching the downloaded cert in a temp directory (e.g.
/tmp/localhost-direct/) so it doesn't re-download on every restart. Only re-download if the cached cert is older than 24h. - Graceful shutdown — Add signal handling (SIGINT/SIGTERM) to clean up temp files.
- Default to self-signed cert — Since the public CA cert has revocation risk (#18), default to the self-signed 10-year cert bundle. The user can pass a flag for the public CA version.
- README placement — The usage section should go under the HTTPS/SSL section, not between the HTTP and HTTPS sections.
✅ What's great
- Clean flag parsing with sensible defaults
- IP validation
- Password-protected zip extraction
- Temp file cleanup with defer
I'd be happy to apply these fixes and merge. Want me to push the changes to this PR branch?
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.
This is a very useful certificate service. I've written a small script to make it easier to use this certificate directly. The script automatically downloads the certificate to a temporary directory each time it starts, then forwards HTTPS requests to the local HTTP service. This avoids the hassle of configuring HTTPS certificates for temporary use.