SSH Tunnels
What is it Used for?
Such tunnels are useful to test webhooks in local for example.
The client asks an HTTP proxy server to forward the TCP connection to the desired destination, meaning that you can expose your local web server through a public URL.
How?
Using Cloudflare Argo Tunnels. You can find more details here: https://developers.cloudflare.com/cloudflare-one/connections/connect-apps/install-and-setup/tunnel-guide.
Installation
The procedure to create a tunnel is quite simple:
Install the Cloudflare utility on your machine:
$ brew install cloudflare/cloudflare/cloudflaredConnect the utility to your cloudflare account with
$ cloudflared tunnel loginand choose the a domain that is not part of our infrastructureCreate a new tunnel in Cloudflare with
$ cloudflared tunnel create <tunnel_name>(for excloudflared tunnel create overloop-developers-johndoe)Add a new CNAME record to redirect the traffic to the tunnel:
$ cloudflared tunnel route dns <tunnel_UUID> <cname>(for excloudflared tunnel route dns 0327bfe5-0d20-4e92-8496-08356d5cf660 johndoeto route the traffic to johndoe.yourdomain.com)Configure your tunnel in
~/.cloudflared/config.ymlfor example:url: http://localhost:3001 tunnel: 0327bfe5-0d20-4e92-8496-08356d5cf660 credentials-file: /Users/johndoe/.cloudflared/0327bfe5-0d20-4e92-8496-08356d5cf660.jsonStart your tunnel
$ cloudflared tunnel run <tunnel_UUID>(for ex:cloudflared tunnel run 0327bfe5-0d20-4e92-8496-08356d5cf660)
Last updated
Was this helpful?
