Interface

What other programs can rely on from lnk exit, and the ends of an exit that link-exit-contract holds: where a machine gets one, and the ssh -R forward that gives it. The exit plugin serves the exit and makes the forward to a host, the box plugin to a box, the harness plugin routes an agent through it, and every sandbox hides its folder.

lnk exit

The exit plugin's commands that other programs run, and what each answers.

lnk exit start --on <machine> [--agent <agent>]

Holds the machine's exit for <id> (you unless given): a SOCKS proxy whose connections leave from here, running while anyone holds it, on a Unix socket at ~/.lnk/exit/exit.sock of the machine. It exits 0 once done.

Who runs it

lnk agent exit runs it, and lnk agent move for the agent's box, by the agent's ID.

lnk exit stop --on <machine> [--agent <agent>]

Gives back the machine's exit for <id> (you unless given), and exits 0 once done. The exit stops once nobody holds it.

lnk exit socks -- <command>

Hidden. While <command> runs, a SOCKS5 server (CONNECT to an address, no authentication) on this machine's loopback at a free port, {port} in the command, that reaches only the internet, never this machine or its networks. It exits with the command's code. lnk exit start <machine> runs it as its background service.

lnk exit list --json

[{"machine", "via", "running", "holders"}]: the exits this computer keeps. lnk agent status reads it, for whether its box's exit is up.

The exit's ends

What link-exit-contract names, so every part reaches the same exit.

HOME_EXIT_SOCKET

Where a machine gets its exit: .lnk/exit/exit.sock in its home folder, a Unix socket only its user reaches, in the machine folder, ~/.lnk, which every sandbox hides.

socket_forward_prepare and socket_forward

What a machine runs over SSH before ssh -R gives it the socket: the socket's folder made, only its user's; a socket a connection before left there removed, since sshd binds over none and removes none; and its home folder printed, which ssh -R needs whole. It's one line with no ', ! or \, so any login shell passes it to sh as it is. socket_forward is ssh -R's forward to the socket, from a port on this machine's loopback.

net

Addresses and names on the network, as every way out of a machine's programs checks them: what no proxy, exit or fetch ever reaches (forbidden, this_machine), the shapes a host, an endpoint and a machine of a network are written in, and where a proxy's connections leave from (Upstream).