Use the VPN
Today the client is a command-line program for Linux, smartvpn. It needs root, because it creates network interfaces and a kill switch. The apps that come later will do all of this with a button.
Before you start
- Install the programs.
- There is no public network yet. Until there is, these steps run against a test chain, such as the one on the build page. Nothing on it has value.
1. Get tickets
A wallet file holds your tickets. You make it on your own machine, and it never leaves it. On the test network, buying works in three steps: your device makes blinded tickets, you pay for them on the chain, and the issuer signs them without seeing them.
# make 12 blinded tickets under issuer key 0
BLINDED=$(ticketctl wallet-new -out wallet.json -chain-id smartnodes -key-id 0 -count 12)
# pay for them (any account can pay; it does not have to be yours)
smartnodesd tx tickets buy-tickets 0 $BLINDED --from mykey --gas auto --gas-prices 0.025usnode
# once the issuer has signed purchase N, unblind and check the signatures
ticketctl wallet-unblind -wallet wallet.json -pubkey ISSUER_PUBLIC_KEY \
$(smartnodesd query tickets get-purchase N -o json | jq -r '.purchase.signatures | join(" ")')
The account that pays sees only that it bought some tickets. When you later spend them, nothing links the spend back to this purchase.
wallet.json private: it is readable by its owner only, and the client refuses it otherwise. Several programs can share one wallet safely; each spend locks the file first.2. Choose nodes
Pick one entry node (tier 1) and one exit node (tier 2), run by different operators. The chain lists them with their address and public key:
smartnodesd query registry list-node -o json | \
jq -c '.node[] | {id, tier, endpoint, pubkey, operator}'
Nodes that failed verification are left out of what the apps will show; you can see a node's record with smartnodesd query verify node-record ID.
3. Connect
sudo smartvpn run -wallet wallet.json \
-entry-id 0 -entry-key ENTRY_PUBKEY -entry-endpoint 203.0.113.10:51820 \
-exit-id 1 -exit-key EXIT_PUBKEY -exit-endpoint 198.51.100.20:51821
It pays both nodes, waits a random time before using the exit (so the payment cannot be matched to your connection), then connects and keeps the session going, paying for more time as it runs out.
-wait 10msets the longest random wait. Shorter is faster, longer is more private.-credit-diris where time bought ahead at an exit is kept.- All your traffic, including name lookups, goes through the tunnel. If it drops, the kill switch stops traffic rather than letting it leak.
4. Disconnect
Press Ctrl+C. The client tells both nodes the session is over, removes its interfaces and lifts the kill switch. If it was killed and left something behind:
sudo smartvpn down
If VPNs are blocked where you are
By default the client uses -transport auto: it tries WireGuard, and if that is blocked it reaches the entry through the disguise, which looks like an ordinary visit to a well-known website. It needs xray installed, and the entry's disguise details from the registry:
sudo smartvpn run -wallet wallet.json -transport auto -entry-reality PORT/PUBLICKEY/SHORTID/SERVERNAME/UUID ...
Use -transport reality to always use the disguise, or -transport wireguard never to.
Bridges
If every listed node is blocked, you need a bridge: an entry node that is on no public list. Buy bridge lines while you can still connect, and keep them for when you cannot.
Buy a line
# while connected; costs one ticket
sudo smartvpn get-bridge -wallet wallet.json \
-exit-id 1 -exit-key EXIT_PUBKEY -exit-endpoint 198.51.100.20:51821 \
-check-id 2 -check-key OTHER_PUBKEY -check-endpoint 192.0.2.30:51821
The request goes through your exit, so no account of yours appears on the chain. -check names a second node that confirms the answer, so a dishonest exit is caught. If the bridge answers with rubbish, the client proves it on the chain and is given another bridge for the same ticket. Lines are saved in /var/lib/smartvpn/bridges.txt.
Use a line
sudo smartvpn run -wallet wallet.json -bridge @/var/lib/smartvpn/bridges.txt \
-exit-id 1 -exit-key EXIT_PUBKEY -exit-endpoint 198.51.100.20:51821
Report a line that stopped working
sudo smartvpn report-bridge -bridge 4 -exit-id 1 -exit-key EXIT_PUBKEY -exit-endpoint 198.51.100.20:51821
Only the device that was given a line can report it, and the report does not say who it is. Enough reports and the line stops being handed out until the bridge moves.
Flag a bad node
If a node gave you a bad session, flag it. It costs one ticket, which pays that node as usual, and has the node tested more often for about a day. It does not punish the node: probers decide whether it passes.
sudo smartvpn flag -wallet wallet.json -node 0 \
-exit-id 1 -exit-key EXIT_PUBKEY -exit-endpoint 198.51.100.20:51821
Your files
wallet.json | Your tickets, and which are used. Never which node they paid. |
/var/lib/smartvpn/ | Exit credits bought ahead, saved bridge lines, and whether WireGuard was blocked here recently (a time only). |