WebUI and API

Query the network status and operate the ledger with the built-in API

The API has a simple webUI embedded to display network informations.

To access the web interface, run in the console:

$ edgevpn api


Dashboard (Dark mode) Dashboard (Light mode)
Screenshot 2021-10-31 at 00-12-16 EdgeVPN - Machines index Screenshot 2021-10-31 at 23-03-26 EdgeVPN - Machines index
DNS Machine index
Screenshot 2021-10-31 at 23-03-44 EdgeVPN - Services index Screenshot 2021-10-31 at 23-03-59 EdgeVPN - Files index
Services Blockchain index
Screenshot 2021-10-31 at 23-04-12 EdgeVPN - Users connected Screenshot 2021-10-31 at 23-04-20 EdgeVPN - Blockchain index

In API mode, EdgeVPN will connect to the network without routing any packet, and without setting up a VPN interface.

By default edgevpn will listen on the 8080 port. See edgevpn api --help for the available options

API can also be started together with the vpn with --api.

API endpoints



Returns the users connected to services in the blockchain


Returns the services running in the blockchain


Returns the domains registered in the blockchain


Returns the machines connected to the VPN


Returns the latest available blockchain


Returns the current data in the ledger


Returns the current data in the ledger inside the :bucket


Returns the current data in the ledger inside the :bucket at given :key


Returns peergater status



Puts :value in the ledger inside the :bucket at given :key


Enables/disables peergating:

# enable
$ curl -X PUT 'http://localhost:8080/api/peergate/enable'
# disable
$ curl -X PUT 'http://localhost:8080/api/peergate/disable'



The endpoint accept a JSON payload of the following form:

{ "Regex": "<regex>", 
  "Records": { 
     "A": "",
     "AAAA": "...",

Takes a regex and a set of records and registers them to the blockchain.

The DNS table in the ledger will be used by the embedded DNS server to handle requests locally.

To create a new entry, for example:

$ curl -X POST http://localhost:8080/api/dns --header "Content-Type: application/json" -d '{ "Regex": "foo.bar", "Records": { "A": "" } }'



Deletes the :key into :bucket inside the ledger


Deletes the :bucket from the ledger

Binding to a socket

The API can also be bound to a socket, for instance:

$ edgevpn api --listen "unix://<path/to/socket>"

or as well while running the vpn:

$ edgevpn api --api-listen "unix://<path/to/socket>"