Questions tagged [ngrok]

ngrok provides HTTPS tunnels from the Internet to local machines with the ability to capture and replay traffic.

ngrok is a tunneling, reverse proxy that establishes secure tunnels from a public endpoint to a locally running network service while capturing all traffic for inspection and replay.

Useful links:

999 questions
354
votes
7 answers

Invalid Host Header when ngrok tries to connect to React dev server

I'm trying to test my React application on a mobile device. I'm using ngrok to make my local server available to other devices and have gotten this working with a variety of other applications. However, when I try to connect ngrok to the React dev…
Patrick Connors
  • 5,677
  • 6
  • 27
  • 54
295
votes
12 answers

Exposing localhost to the internet via tunneling (using ngrok): HTTP error 400: bad request; invalid hostname

From previous versions of the question, there is this: Browse website with ip address rather than localhost, which outlines pretty much what I've done so far...I've got the local IP working. Then I found ngrok, and apparently I don't need to…
Chris
  • 28,822
  • 27
  • 83
  • 158
169
votes
20 answers

ngrok command not found

I'm trying to install ngrok (which I've been using for a while on Windows with no issues) on my 1 week old yosemite and these are the steps I've followed so far. Downloaded ngrok from here https://ngrok.com/download. Unziped the file and copied the…
Valina
  • 1,739
  • 2
  • 11
  • 9
120
votes
8 answers

Ngrok configure multiple port in same domain

Is it possible to open multiples ports in ngrok in same domain? Something like: Fowarding http://example.ngrok.com:50001 -> 127.0.0.1:50001 Fowarding http://example.ngrok.com:50002 -> 127.0.0.1:50002 I´m working in windows and it'll be useful for…
fravelgue
  • 2,633
  • 2
  • 24
  • 23
109
votes
9 answers

How to generate fixed url with ngrok

I am working on Facebook messenger. My Facebook app only accept one url for a webhook but ngrok is generating a new URL every time. Now I am unable to test my app because the webhook URL has changed.
Saxid
  • 1,199
  • 2
  • 8
  • 6
78
votes
7 answers

Is ngrok safe to use or can it be compromised?

Is ngrok a safe tool to use? I was reading a tutorial which recommended to use ngrok test API responses that I make to outside services that need to connect to my endpoints also.
cool breeze
  • 4,461
  • 5
  • 38
  • 67
71
votes
24 answers

Ngrok errors '502 bad gateway'

Quite new to using any sort of Web App stuff, and I've been trying to slowly build a Facebook Messenger Bot. When I try to use ngrok I can't visit the address I'm given, i.e: ngrok http 5000 is what I'm putting in the command line, and it's…
Jordan Cagney
  • 787
  • 1
  • 5
  • 8
66
votes
6 answers

Bad Request - Invalid Hostname HTTP Error 400. The request hostname is invalid. when i am using ngrok

When I am using ngrok & run url given by ngrok with following configuration: my local url is : localhost:8080/someexample my ngrok url is : http://f07d0862.ngrok.io/ it show this error: Bad Request - Invalid Hostname HTTP Error 400.
Sunny
  • 661
  • 1
  • 5
  • 5
56
votes
16 answers

View random ngrok URL when run in background

When I start an ngrok client with ./ngrok tcp 22 it runs in the foreground and I can see the randomly generated forwarding URL, such as tcp://0.tcp.ngrok.io:12345 -> localhost:22. If I run in it the background with ./ngrok tcp &, I can't find any…
Julia Ebert
  • 1,583
  • 1
  • 21
  • 39
53
votes
8 answers

Configure ngrok's CORS headers

I am running a local webserver, which runs an XHR request to an ngrok server, also run from my PC. I'm getting XMLHttpRequest cannot load http://foo.ngrok.io/. No 'Access-Control-Allow-Origin' header is present on the requested resource. Origin…
wildeyes
  • 6,767
  • 5
  • 19
  • 37
37
votes
3 answers

How to specify which domain using ngrok

I use mamp and I have virtual hosts all on port 8888. For example: site1.dev:8888 site2.dev:8888 would point to localhost/site1/, localhost/site2/ etc. Before using virtual hosts, I would just change my docroot to whatever project I was currently…
Ronnie
  • 11,138
  • 21
  • 78
  • 140
36
votes
22 answers

How to run ngrok in background?

I tried running ngrok in the background with following command: ./ngrok -subdomain test -config=ngrok.cfg 80 & the process is running: [1] 3866 and the subdomain doesn't work. It works with: ./ngrok -subdomain test -config=ngrok.cfg 80 Does…
martinenzinger
  • 2,166
  • 2
  • 17
  • 20
35
votes
2 answers

Github Webhook With Jenkins return 302 Found

I set up localhost jenkins, using ngrok to expose my jenkins to github. I didn't set up any credentials. When I test delivery from webhook, it shows 302 not found. Response: Content-Length: 0 Date: Mon, 16 Apr 2018 02:09:22 GMT Location:…
Xiaoxi Bian
  • 359
  • 1
  • 3
  • 4
33
votes
4 answers

targeting dev sites with vhost setup using ngrok

I'm trying to tunnel a clients site in my sites directory with "ngrok http -host-header = client1.dev 80", I get a 404 when accessing the url. After some experimenting, if I put an index.html file in the home directory, it will display that file.…
paul degrand
  • 345
  • 1
  • 3
  • 7
32
votes
3 answers

using ngrok with websocket (or socket.io)

Are there any simple sample code showing ngrok forwarding socket.io/websocket (running under nodejs on localhost)? In other words, does ngrok http 3000 work with a nodejs server and socket.io running on port 3000? Or something like ngrok http+tcp…
Zhe Hu
  • 3,777
  • 4
  • 32
  • 45
1
2 3
66 67