Exit sends your box's traffic from your home

Your box's traffic leaves from your home address, so sites see you, not a data center. lnk exit start makes this computer, the one you run it on, the way out for a box or for any machine you reach over SSH. You need a Mac or Linux, and a box (lnk box create) or any machine you reach over SSH; there's nothing to pay for beyond the box.

lnk up boxes                     # add the box and exit plugins
lnk exit start --on aws-1   # the traffic of your box aws-1 can leave from here
lnk exit list                    # the exits this computer keeps, and for whom
lnk exit stop --on aws-1              # stop

Make this computer a machine's exit

The machine is the one whose traffic leaves from here: any host you reach with ssh (--ssh), or a box (--on). The exit is always this computer.

lnk exit start --on gcp-1                   # a box, by its name in lnk box list
lnk exit start --ssh me@server.example      # any host you SSH to, or a name in ~/.ssh/config

--on

A box is named as lnk box list names it. The box plugin reaches it with its own lnk box forward <machine> --socket <path> --proxy-port <port>, which the exit keeps running.

The proxy on the machine

The machine gets a SOCKS5 proxy on a Unix socket in its home folder, ~/.lnk/exit/exit.sock, and its connections leave from this computer. A program on the machine has to use the proxy, and give it addresses, not names. Only your user on the machine can use the socket (who can reach what).

# on the machine: your home address, curl 7.84 or newer
curl --proxy "socks5://localhost$HOME/.lnk/exit/exit.sock" https://ifconfig.me

In the background

The exit runs in the background here. It reconnects when the connection drops, starts again at login, and keeps a Mac awake while it's an exit. For a host that isn't a box, your SSH to it must work without typing anything, with a key that has no passphrase or with your SSH agent.

For an agent on a box

Use lnk agent exit --here instead. It holds the exit for the agent and sends the agent's traffic through it (agents).

Stop being its exit

The exit stops once nobody holds it. You hold it when you run lnk exit start, and each agent that exits from here on that machine holds it too, so it stays up while any of them does.

lnk exit stop --on gcp-1    # the exit of gcp-1
lnk exit stop          # the only exit, or the one you pick
lnk exit stop --all    # every exit here, at once, and who holds each stays

After --all

lnk exit start --on <machine> starts one again, and lnk uninstall runs stop --all before it removes the programs.

See the exits

lnk exit list shows each exit this computer keeps, up or down, and who holds it: you, or each agent that exits from here on that machine.

Where things live

What the exit keeps on this computer, and on the machine (Configuration).

~/.lnk/exit/exits.toml and its logs

exits.toml holds the exits this computer keeps, and ~/.lnk/exit/<machine>.log is each exit's log.

Its sockets

~/.lnk/exit/<machine>.ssh, while a host's exit on the socket runs, is its SSH connection's control socket, and ~/.lnk/exit/exit.sock on the machine is the exit's socket.

More about it

Every flag is in lnk exit --help.

  • Troubleshooting: what to do when an exit is down, or traffic still leaves from the cloud
  • Security: what the exit protects and what it doesn't
  • Decisions: why it works this way

Docs

  • Configuration: The files lnk exit keeps, and what each one holds
  • Security: What lnk exit start --on <machine> exposes, and what it doesn't
  • Decisions: Why lnk exit works the way it does
  • Troubleshooting: What to do when an exit is down, or a machine's traffic still leaves from the cloud (Your box's traffic, from your home address)