Relay CLI provides a variety of ways to configure request routing and also acts as an agent for request forwarding and tunneling. Main features:
In order to start using your CLI, you first have to authenticate. Create your key & secret pair here: https://my.webhookrelay.com/tokens. Then, there are two ways to do it:
logincommand CLI will take advantage of native secure storage:
Forward command automatically creates configuration and starts one-way request forwarding:
Connect command automatically creates tunnel configuration and starts two-way request streaming:
-d, --destination: is a destination to connect to.
--no-agent: only configures tunnel without starting an agent.
-p --password: is a password for the basic authentication.
-u --username: is a username for the basic authentication.
-t --token: is a token for the token authentication.
-s --subdomain: is an optional parameter for preferred subdomain. If not supplied - random subdomain will be generated.
Buckets are used to group inputs and outputs for webhook relaying. Any request that hits an input in a bucket will be relayed to all outputs inside the same bucket.
To list all buckets:
To update an existing bucket:
To delete existing bucket:
Note that this command will only delete buckets that have no Inputs or Outputs inside, but you can force
delete a bucket:
Inputs are your personal endpoints to receive webhooks.
To list all inputs:
To create an input:
To remove an input
Outputs are destination where requests should be routed
To list all outputs:
To create an output:
-b --bucket: is a bucket name to use. Defaults to output name if not supplied.
-d --destination: is destination where request should be relayed.
-t --type: is output type. Available options: internal (default), public.
--description: is a description for the output.
To remove an output:
Tokens are used for API, CLI or webhookrelayd authentication.
To list all tokens:
To create a new token:
Once token is generated - secret is already encrypted. Save it somewhere as we don’t store decrypted credentials.
If you lost your token’s secret - just remove it and create a new one.
To remove a token:
Tunnels are used to create bidirectional connections between public endpoint (ie: yourtunnel.webrelay.io) and local endpoint on your computer, private network or even remote website.
To list all tunnels:
To update an existing tunnel:
Usage example to enable public endpoint encryption:
To delete existing tunnel:
Ingresses are tunnels but with additional configuration to enable path based routing, tailored for Kubernetes ingresses. Tunnels that are of type ingress can be created using special group:
Then, these tunnels will be used by the ingress controller.
To view existing ingress type tunnels that already have path based routing rules:
Init command initializes ingress controller in your Kubernetes cluster. It prepares namespace, configures RBAC, provisions credentials for your account and creates a secret:
There are additional options for this command (ie: if you don’t have RBAC enabled in your cluster, use
Reset command removes ingress controller from your cluster. Use this when you don’t want to use ingress controller anymore. However, dormant ingress controller barely uses any resources so it’s recommended to just remove your
ingress.yaml resources to disconnect tunnels.