Your First Tunnel
In this guide you will start a local web server, expose it through an Airdress anycast relay, inspect the tunnel, and shut it down cleanly. Plan about fifteen minutes.
What you will build
Section titled “What you will build”A publicly reachable tunnel from a service running on your machine, through a WireGuard connection to an Airdress relay PoP, out to the internet over anycast BGP. You will see the full path traffic takes and learn how to verify each hop.
-
Start a local web server
Open a terminal and start a simple HTTP server on port 8000:
Terminal window python3 -m http.server 8000Confirm it is responding:
Terminal window curl -s http://127.0.0.1:8000/ | head -5You should see the HTML directory listing. Leave this terminal running.
-
Start the operator with explicit bind and WireGuard settings
In a second terminal, start the operator and tell it which address and WireGuard port to use:
Terminal window airdress-operator serve --bind 0.0.0.0:8080 --wg-port 51820Flag Purpose --bind 0.0.0.0:8080Address and port the operator’s HTTP listener binds to. --wg-port 51820UDP port for the WireGuard tunnel to the relay PoP. The operator connects to the nearest relay PoP, establishes a WireGuard tunnel, and begins accepting forwarded traffic. Log output confirms the connection:
INFO wireguard handshake complete relay=ewr latency=18msINFO operator ready bind=0.0.0.0:8080 wg_port=51820 -
Check the operator status
In a third terminal, inspect the running operator:
Terminal window airdress-operator statusExample output:
operatorstate: runningbind: 0.0.0.0:8080wg_port: 51820tunnelrelay: ewr (Newark)endpoint: 185.43.32.11handshake: 12s agorx: 1.2 KiBtx: 856 BThe
handshakefield shows how recently the WireGuard session was confirmed. A value under 120 seconds means the tunnel is active. -
Verify the health endpoint
Terminal window airdress-operator healthOr with
curl:Terminal window curl http://127.0.0.1:8080/healthzA healthy response means the operator, its tunnel, and the relay PoP are all functioning.
-
Stop the operator
Press
Ctrl+Cin the terminal whereairdress-operator serveis running. The operator drains active connections, tears down the WireGuard interface, and exits:INFO shutting down reason=SIGINTINFO wireguard interface removedINFO operator stoppedThen stop the Python web server with
Ctrl+Cas well.