Toy 6 · two minutes

A tunnel to your laptop.

Your laptop runs a site you're working on, at localhost:3000. Open a tunnel, open it from outside, then close the lid and see what visitors find.

At home

  1. Your laptoplocalhost:3000 · on
  2. The home router203.0.113.7 · NAT
  3. weird's tunnel nodeno tunnel yet

Who opens it

A friend, anywherehttps://demo.numele-tau.ro
A stranger who found the addresshttps://demo.numele-tau.ro
Someone typing your home addresshttp://203.0.113.7:3000

An illustration. The address 203.0.113.7 is reserved for examples.

The laptop opens it, not the router

localhost means "this computer": localhost:3000 opens only on your laptop. At home, every device goes out to the internet through the same address, the router's (NAT), so the router doesn't know who to give a request from outside to, and drops it. That also protects you.

A tunnel is a connection the laptop opens itself, out to a weird node, and keeps open. Since it goes out, the router allows it, and requests for your address come back along it, over HTTPS. You open nothing on your network. The name must be under a domain of yours; if its zone is at weird, the record is written for you.

Who gets in: anyone with the address. A tunnel has no guest list, so for anything private put a sign-in in the app itself. While the laptop sleeps, visitors see a standard page, or your own offline page if you set one. The tunnel keeps existing and spends credits by the hour for as long as you keep it, connected or not; when you no longer need it, delete it.

More in the course

In the terminal

# the site on port 3000, at your address$ weird tunnel demo.numele-tau.ro 3000# a page of yours for when the laptop sleeps$ weird tunnels update demo.numele-tau.ro --offline-folder ./away# when you no longer need it$ weird tunnels delete demo.numele-tau.ro
Every command and its flags, in the documentation

Tell your assistant

„I'm working on a site at localhost:3000. Open a tunnel at demo.my-name.ro so I can show it to a friend, and set a simple "back soon" page for when I close the laptop.”