What is ngrok?
ngrok is a cross-platform application that enables developers to expose a local development server to the Internet with minimal effort. The software makes your locally-hosted web server appear to be hosted on a subdomain of ngrok.com, meaning that no public IP or domain name on the local machine is needed.Problem with ngrok
Usually ngrok CLI tool and ngrok.com URL are blocked on corporate systems.Although there are many alternatives of ngrok but all of them requires their specific CLI tool to be downloaded but those fails to pass through corporate network.
Most suitable alternative of ngrok
Now we have got https://localhost.run/ as the best alternative of ngrok because of no specific CLI tool is required to be downloaded.
How to setup localhost.run?
To setup you need to generate SSH key and add it to the ssh-agent.
Follow this article, Generating a new SSH key and adding it to the ssh-agent to do that.
How to use localhost.run?
Open the folder which you want to serve.
Run any preferred static-server on that folder at port 8080. Otherwise you may use https://isurfer21.github.io/Suxm/.
After that, run this command:
ssh -R 80:localhost:8080 ssh.localhost.run
It would create a subdomain like https://yourproject.localhost.run, where you could find the same content which is being served at localhost:8080.
It would create a subdomain like https://yourproject.localhost.run, where you could find the same content which is being served at localhost:8080.
Comments
Post a Comment