Skip to main content

tuna http

Start an HTTP tunnel.

Guide with examples: HTTP.

Usage
tuna http [port] [flags]
Examples
tuna http 8080
tuna http 10.0.0.1:8080
tuna http https://localhost:443
tuna http unix:///var/run/docker.sock
tuna http 8080 --subdomain=billing
tuna http 8080 --domain=my-api-project.example.com
tuna http 8080 --response-header="env:test"
tuna http 8080 --basic-auth="login:password"
tuna http 8080 --key-auth="my-secret-key"
tuna http --file-server ./
tuna http --webdav ./
FlagDescription
--api-key stringYour tuna.am api key with the tunnels:connect scope (env TUNA_API_KEY).
--basic-auth stringAdd basic authentication (e.g. user:pass). Can be repeated.
--capture-key stringCapture Key for reports.
--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.
--corsEnable CORS and handle OPTIONS requests.
-d, --domain stringHost tunnel on a custom domain.
-f, --file-server stringPath to directory that you want to serve.
-F, --file-server-spa stringPath to directory with Single Page Application that you want to serve.
--https-redirectRedirect http requests to https.
--inspectEnable or disable the request inspector. Default: true.
--inspect-port intInspector port, the tunnel fails if it is busy (also TUNA_INSPECT_PORT).
--key-auth stringAdd key authentication passed in X-Token header. Can be repeated.
--policy-file stringPath to policy file. Default: .tuna.yml.
--policy-url stringPolicy file URL, YAML or JSON (https only).
--qrGenerate and show QR code.
--rate-limit intLimit the amount of requests to your backend (e.g. 20 for 20 requests/sec).
--request-header stringRequest header (key:value) to override (e.g. host:myapp.com). Can be repeated.
--response-header stringResponse header (key:value) to override (e.g. role:admin). Can be repeated.
-s, --subdomain stringTemporary subdomain (default: random temporary subdomain).
--tls-skip-verifyIgnore TLS verification. Default: true.
--ua-allow stringReject requests that do not match to given User-Agent filters. Can be repeated.
--ua-deny stringReject requests that match to given User-Agent filters. Can be repeated.
--verify-webhook stringValidate webhooks are signed by this provider (e.g. gitlab).
--verify-webhook-secret stringSecret used by provider to sign webhooks, if any.
--webdav stringPath to directory that you want to serve.

Global flags work too.