Webhook Relay
PricingLogin
  • Introduction
  • Quick Start - Forwarding
  • Quick Start - Tunnels
  • 🛠️Installation
    • Relay CLI
      • Install
      • Auto-start
      • Run config.yaml reference
    • Containerized
      • Kubernetes Installation
      • Podman
      • Docker
      • Docker Compose
  • Products
    • 🛰️Webhook Forwarding
      • Glossary
      • WebSocket Server
      • Authentication
      • Custom Domains
    • ⚡Functions
      • Managing functions
      • Edit request/response
      • Working with JSON
      • 🦾Advanced
        • Working with time
        • Testing functions in CLI
        • Making HTTP Requests
        • Multipart Form Data
        • URLEncoded Form Data
        • GCP BigQuery
        • Sending Emails
        • JWT authentication
        • Base64, Hashes, Encryption
      • 🤖Integrating into CI/CD
    • 🔃Tunnels
      • Using tunnels
      • Custom Domains
      • Encryption (HTTPS)
      • Regions
  • 📝Examples
    • Intro to examples
    • Webhooks
      • Receiving webhooks on localhost
      • Receive webhooks inside your JavaScript app
      • Execute shell scripts on remote machines
    • Functions
      • Enrich webhooks from 3rd party APIs
      • Convert DockerHub webhook to Slack notification
      • Allowing only POST requests through
      • Manipulate webhook request body
    • Tunnels
      • Ingress for any Kubernetes environment
      • Demoing your website
    • 🏠Home Automation
      • Home Assistant
      • Node-RED
      • Raspberry Pi
  • Platform
    • CLI Basics
    • Using CLI Behind Proxy
    • Self-hosting Server
      • Server deployment
      • Client configuration
    • Security & Tech
Powered by GitBook
On this page
  • Username + password authentication
  • Token authentication
  • Tunnels with Docker
  • Tunnels for Kubernetes

Was this helpful?

  1. Products
  2. Tunnels

Using tunnels

Tunnels provide bidirectional access to your local services. In this section we demonstrate basic functionality.

Web Relay assigns random hexadecimal names to the created HTTP tunnels. This is okay for one-time personal uses or development.

But if you're displaying the URL at a hackathon or integrating with a third-party webhook or just use it regularly, it can be frustrating if it is difficult to read and remember. You can specify a custom subdomain for your tunnel URL when you are creating a new tunnel:

$ relay tunnel create www --subdomain demo-1
www

To specify a tunnel name when using connect command:

$ relay connect --name www http://localhost:4000/
Connecting:
http://demo-1.webrelay.io <----> http://localhost:4000/
1.5110973039938712e+09	info	client starting	{"version": "develop"}
1.5110973041917999e+09	info	adding HTTP tunnel demo-1.webrelay.io ---> http://localhost:4000/
1.511097304192018e+09	info	tunnel proxy configuration updated

Username + password authentication

Anyone who can guess your tunnel URL can access your local or private web service unless you protect it.

To enable HTTP Basic Auth provide --username and --password flags:

 relay connect --username foo --password bar http://localhost:4000

Accessing a URL now will prompt users for credentials.

Token authentication

Similarly to HTTP Basic Auth you can also specify token protection. Tokens are easier to pass around:

relay connect --subdomain landing  --token <token>

Even though basic auth and token protection can prevent unwanted visitors to your websites, it is advisable to also enable SSL.

Tunnels with Docker

When using with Docker webhookrelayd container needs a way to communicate with other containers. For this, we can use "links". Here's an example how to connect to a running container called jupyter:

docker run --link jupyter:jupyter -e KEY=TokenKey -e SECRET=TokenSecret webhookrelay/webhookrelayd:latest --mode tunnel -t jupyter

Tunnels for Kubernetes

PreviousTunnelsNextCustom Domains

Last updated 3 years ago

Was this helpful?

Do you want to use tunnels inside Kubernetes? See for installing and configuring Kubernetes ingress controller.

🔃
ingress section