Short answer
Use a VPN API for the network half and build only the app. Your app signs the customer in, gets a WireGuard config for the chosen server from the API (GET /vpn/config) and connects with the free WireGuard library for each platform. If you would rather not build an app at all, ready-made apps that show your logo after sign-in let you launch the same day.
The fastest option: no app to build
With ResellPortal your customers can use ready-made apps for Windows, Mac, Android and Android TV / Fire TV. After they sign in, the app shows your logo and colours. iPhone is coming soon, and Linux works with the free WireGuard app. You launch the same day and spend your time on selling instead of app store reviews.
Building your own app, step by step
- Sell the account. When a customer pays on your website or in your app, your server creates the VPN account with
POST /orders. - Show the locations. Your app gets the server list from your backend, which calls
GET /vpn/servers. - Get the config. When the customer taps a location, your backend calls
GET /vpn/configand passes the WireGuard config to the app. - Connect. The app starts the tunnel with the WireGuard library for its platform.
- Handle billing. Suspend the account with
POST /vpn/suspendif a payment fails, and turn it back on withPOST /vpn/unsuspend.
Keep your API key and secret on your server. The app should only ever talk to your own backend.
The libraries for each platform
| Platform | How the app connects |
|---|---|
| Android | The official WireGuard tunnel library for Android, inside a VpnService |
| iPhone and iPad | WireGuardKit inside a Packet Tunnel Network Extension |
| Mac | WireGuardKit inside a Network Extension |
| Windows | The embeddable WireGuard tunnel service |
All of them are free and open source. Apple requires a paid developer account for VPN apps on iPhone and Mac.
What it costs
The network costs $1.75 a month per customer at wholesale with ResellPortal, with no platform fee. Your own costs are the app development, the Apple and Google developer accounts, and your time on store reviews. If you use the ready-made apps, the network is your only cost.