Skip to main content

tuna trigger webhook

Trigger command by incoming HTTP request.

The request body is passed to the command's stdin, the rest of the request is passed in environment variables:

TUNA_REQUEST_METHOD request method
TUNA_REQUEST_PATH URL path
TUNA_REQUEST_QUERY raw query string
TUNA_REQUEST_HEADER_<NAME> header value, e.g. TUNA_REQUEST_HEADER_CONTENT_TYPE
Usage
tuna trigger webhook [flags]
Examples
tuna trigger webhook /tmp/trigger.sh
FlagDescription
--api-key stringYour tuna.am api key with the tunnels:connect scope (env TUNA_API_KEY).
--cidr-allow stringReject connections that do not match the given CIDRs. Can be repeated.
--cidr-deny stringReject connections that match the given CIDRs. Can be repeated.
-p, --port stringPort for incoming connections.
--secret stringSecret to use for validation of an X-Webhook-Secret header.
-l, --location stringDeprecated in 0.39: new names and ports are created in the global zone and need no location. If your name or port is reserved in the ru or nl zone, keep the location: the tunnel connects as before.
--token stringDeprecated in 0.39: use --api-key instead.

Global flags work too.

History​

0.39.0Added the --api-key flag.
Deprecated the --location flag: new names and ports are created in the global zone and need no location. If your name or port is reserved in the ru or nl zone, keep the location: the tunnel connects as before.
Deprecated the --token flag: use --api-key instead.
0.25.0Added the --cidr-allow and --cidr-deny flags.