Hacker News new | ask | show | jobs
by avh02 3336 days ago
i tend to fire up reverse port forwarding with ssh + special subdomain + ask nginx to proxy to the reverse-forwarded port on that special subdomain to resolve this, obviously you'd still need a static and public ip somewhere, but any ssh-accessible host will now do.

it's a bit of setup, but works quite well once set. does _not_ provide the features ngrok does of replay, etc, but at least it's 100% your own infrastructure.

edit: to clarify: no reason why it should be a special subdomain, i just use beta.mywebsite.com, just something that belongs to you and is globally dns resolvable, could be mytestdomain.com for your use. you can skip nginx if you don't mind binding to port 80 directly (i.e: no webserver already exists on that machine)

2 comments

> but at least it's 100% your own infrastructure

This is probably a good thing for security. But for the use case of development against third party services, it seems like an unnecessary constraint.

I do exactly this. I also have it set up with let's encrypt so that the Webhooks are encrypted.

Locally, I also mirror the LE keys and add a hosts file entry for the test domain to localhost.

This means I can test locally with proper ssl certs.

+1 original reason i did it was so i can have the LE cert to test a slack bot i was developing (they require webhooks have SSL to do that)