I have tinyproxy
installed on localhost (I also tried squid
and failed similarly). It runs on port 8888. This works:
curl -x localhost:8888 http://www.google.com
And I see output in the tinyproxy logs.
Now I run the latest version of ngrok
and get the following forwarding established:
http://<identifier>.ngrok.io -> localhost:8888
If I open http://<identifier>.ngrok.io
on my browser the ngrok connection counter goes up, and I successfully see tinyproxy's "not implemented" error page.
However, this fails:
curl -x <identifier>.ngrok.io:80 http://www.google.com
# => curl: (56) Received HTTP code 404 from proxy after CONNECT
The ngrok counter does not go up, and I do not see messages in the tinyproxy logs, suggesting that the failure is before ngrok accepted the connection.
What am I missing here? I had assumed that both ngrok and tinyproxy forward the HTTP request, but it seems like there might be another protocol operating behind the scenes of curl -x
. Is there a way to successfully establish the proxy chain starting at ngrok and going through my localhost?
Your setup is accurate. All you need to do is run the following tcp command instead of http command:
It will create a tcp tunnel and print something like this:
You can then use it like this.