ngrok is a great tool for exposing local services to the world with the magic of reverse proxies:
Spend more time programming. One command for an instant, secure URL to your localhost server through any NAT or firewall.
However, using ngrok
with a custom domain is a paid feature, and there are usage limits on the free tier.
Enter bifrost
!
The repo provides terraform scripts for setting up a free f1-micro
instance on Google Cloud Platform, as well as Ansible to set up the required nginx configuration.
Once configured, the server acts as a personal ngrok
clone with a custom domain.
Simply running ./bifrost http hello 127.0.0.1:3000
exposes a local webserver running on port 3000 to the world at hello.bifrost.kylesferrazza.com
with the default domain configuration.
The terraform scripts even provision a wildcard TLS certificate for the bifrost
subdomain, allowing nginx to serve valid TLS configurations for all of the proxied sites.