How to find out if your Urbit ship is directly or indirectly routing to another Urbit ship

published Apr 13, 2021, last modified Apr 21, 2021

Direct routes go faster than indirect routes. Indirect routes can also be evidence of problems getting UPnP / NAT working correctly with your ship (when you run your ship behind a NAT firewall).

The command to use in the Urbit dojo is:

=/(ss .^(ship-state:ames ax+/=//=/peers/~zod) ?>(?=(%known -.ss) route.ss))

Replace ~zod with the actual ship name.

You'll see something like this as a response, if your ship is in fact directly linked to the other one (instead of being indirectly routed by a star):

[~ [direct=%.y lane=[%.n p=0x1453.6342.5dcf]]]

If your connection is indirect, you will see %.n instead (which means false in Hoon).

There are more tricks in this notebook: ~middev/the-forge/resource/publish/ship/~middev/arbor-press-3191