create_tunnel
Provision a peer and return its WireGuard configuration. Three routing modes, and the right one depends on the machine.
source (the default) sends only traffic from the leased address through us and leaves the default route alone — but it is written with wg-quick PostUp rules that invoke ip, so it runs on Linux under wg-quick and nowhere else. On macOS it aborts and deletes the interface.
full works in every client but claims the default route, so it cannot run beside an always-on corporate VPN.
destinations routes only the addresses you name. It needs no PostUp and takes no default route, so it runs in any client on any platform, and it matches what is usually being bought — one partner seeing a fixed address. It survives beside a VPN that installs a default route, but not one that captures traffic below the routing table. It cannot receive inbound connections from anywhere but those destinations.
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| label | No | For the customer's own reference. | |
| transport | No | Defaults to wireguard. Use amneziawg where deep packet inspection blocks a plain WireGuard handshake; it needs an AmneziaWG client rather than wg-quick. | |
| access_token | Yes | Returned by order_lease. The only credential for a lease. | |
| destinations | No | Addresses or ranges to route through the tunnel, like 203.0.113.10 or 203.0.113.0/24. Required with routing_mode=destinations and rejected without it. Ask the user which partner requires the address rather than guessing a range. | |
| routing_mode | No | Defaults to source, which is Linux only. Use destinations when the machine is not a Linux server, or when only certain partners need to see the address. |