A viaduct tunnel has always come with a random name, something like
funny-otter.viaduct.sh, and that was on purpose. A URL you can
choose is a URL someone can squat, or dress up to look like a brand or a
login page. --pin softened it: it keeps the same URL across
reconnects, which is what a webhook or a long-lived demo needs. But the name
stayed derived from a secret on your machine, not something you type. You
could keep a name; you could not pick one.
A chosen name is a small, reasonable thing to want, though. A demo link you
can read down the phone. A webhook endpoint whose name still means something
months later. A project's name instead of a random animal. So
--name is here.
viaduct http 8080 --name myapp gives you
myapp.viaduct.sh if the name is free, and pins it so it stays
put across reconnects. It has to be a plain, well-formed label, and a short
list is reserved, region codes, www, api,
admin, the names that would only be used to confuse someone.
Everything else is first come, first served.
✓ tunnel live https://myapp.viaduct.sh → http://localhost:8080 press q to stop # taken or reserved names are refused up front, before any tunnel $ viaduct http 8080 --name admin viaduct: that --name is not allowed (some names are reserved)
Free, well-formed, and not reserved: the name is yours until you disconnect.
A few honest edges
A name is held only while the tunnel is live. Drop the connection and it is free again, so nothing is squatted for good. Availability is per server, so a name taken on one region can still be free on another.
Using it
Pick a name and start the tunnel as usual:
viaduct http 8080 --name myapp
It cannot be combined with --pin, which asks for the same thing
a different way, and there is more in the docs.
Available in viaduct 1.5.0. Already installed? Run viaduct upgrade to get it.
