Menu

Tunnels

Put an app running on your own computer on the internet, at a hostname of yours, with HTTPS.

A tunnel makes something running on your computer reachable at https://<your hostname>: a local web app, a demo, a home dashboard. Visitors reach the tunnel's node over HTTPS; your computer keeps an outgoing connection to it, so nothing on your network needs to be opened.

Start one#

$ weird tunnel demo.example.ro 3000

This creates the tunnel for that hostname (or reuses yours), connects it, and waits until it is live. Visitors to https://demo.example.ro reach what runs on this computer at port 3000.

The hostname must be under a domain you control:

  • Its DNS zone is at weird: the record pointing the name at the tunnel is written for you. A name that already has an A, AAAA or CNAME record is refused, so nothing of yours is overwritten.
  • Its DNS is elsewhere (or in a zone of yours that is not live yet): you are shown the records to add where the domain's DNS is managed: the address record, and a TXT record at _atunnel.<hostname> holding the value you are given, which proves the name is yours (the API's dns_txt_name and dns_txt_value, while hostname_verified is false). The tunnel waits for them (pending-dns); after you add them, weird tunnels verify-dns demo.example.ro checks again.

A tunnel bills by the hour while it exists, connected or not.

Credit charge: see the credit charges (contract recurring.tunnel-hourly per_hour)

One tunnel kept for a full year.

The background helper#

A helper program keeps your tunnels connected after you close the terminal.

$ weird agent status$ weird agent autostart on$ weird agent logs

weird agent autostart on starts it when you log in to your computer. The helper remembers each tunnel node's identity the first time it connects and refuses to connect if it ever changes, since the connection could be intercepted. Only when weird tells you a node was replaced, run weird agent forget-node <host>.

Manage your tunnels#

$ weird tunnels list$ weird tunnels get demo.example.ro$ weird tunnels stop demo.example.ro$ weird tunnels delete demo.example.ro
  • weird tunnels stop stops forwarding from this computer; the tunnel keeps existing and billing.
  • weird tunnels delete deletes it: the hourly billing stops and the record written in your zone is removed.

Listing and showing tunnels is a small charge per successful request.

Credit charge: see the credit charges (contract tunnel.reads per_request)

Each successful read of your tunnels.

The page shown while you are offline#

When your computer is off, visitors see a standard page. Show your own instead:

$ weird tunnels update demo.example.ro --offline-url https://example.ro/away$ weird tunnels update demo.example.ro --offline-folder ./away$ weird tunnels update demo.example.ro --clear-offline

--offline-folder uploads a folder (with an index.html) to storage and serves it from its gateway address; it is stored and billed like any upload, and storage must be switched on first.

Reference#