Give a Friend an Address

An nf1… address opens one service of your machine to whoever holds it, with no account on their side. The session is end to end encrypted: the relay sees neither the address's secret nor the bytes.


Goal

A friend opens a web app on your machine's port 8080 from their own laptop, without an nfltr account.

Prerequisites

1. A service on your machine

Use your own service. This tutorial serves one page on port 8080:

$ echo 'hello, friend' > index.html
$ python3 -u -m http.server 8080
Serving HTTP on :: port 8080 (http://[::]:8080/) ...

2. Serve it under an address

In a second terminal, serve port 8080 as the service web under an address, written to a file only you can read:

$ nfltr cat serve web --forward localhost:8080 --address --address-file friend.addr
Address of you/web written to friend.addr (mode 0600; anyone who has it can open the service; keep it secret)

The address is never printed, so it stays out of terminal scrollback and logs. It is a password for this one service: send the file over a channel you trust (a password manager's share, an encrypted message). The same address comes back each time you serve web again.

3. Your friend connects

Your friend saves the address in a file only they can read (chmod 600 friend.addr) and opens a local port to the service:

$ nfltr cat forward --address-file friend.addr --listen 127.0.0.1:18080
connect forward: listening -> nf1:14efa3ee@nfltr.xyz on 127.0.0.1:18080
$ curl -s http://127.0.0.1:18080/
hello, friend

The two machines take a direct path between them when their networks allow it; otherwise the relay carries the session, still end to end encrypted, and sessions count against your account. An address on the command line is refused: other users of a machine can read a command line.

4. Revoke it

Stop nfltr cat serve (Ctrl+C) and the address reaches nothing. To revoke it for good, serve the service with --new-address: the old address stops working at once, and the file holds the new one, for whoever you give it to next.

# Ctrl+C in the nfltr cat forward terminal
# Ctrl+C in the nfltr cat serve terminal
$ nfltr cat serve web --forward localhost:8080 --address --new-address --address-file friend.addr
Address of you/web written to friend.addr (mode 0600; anyone who has it can open the service; keep it secret)

Next