webUI and API
The API has a simple webUI embedded to display network informations.
To access the web interface, run in the console:
$ edgevpn api
with either a EDGEVPNCONFIG
or EDGEVPNTOKEN
.
Dashboard (Dark mode) | Dashboard (Light mode) |
---|---|
![]() |
![]() |
DNS | Machine index |
---|---|
![]() |
![]() |
Services | 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
GET
/api/users
Returns the users connected to services in the blockchain
/api/services
Returns the services running in the blockchain
/api/dns
Returns the domains registered in the blockchain
/api/machines
Returns the machines connected to the VPN
/api/blockchain
Returns the latest available blockchain
/api/ledger
Returns the current data in the ledger
/api/ledger/:bucket
Returns the current data in the ledger inside the :bucket
/api/ledger/:bucket/:key
Returns the current data in the ledger inside the :bucket
at given :key
PUT
/api/ledger/:bucket/:key/:value
Puts :value
in the ledger inside the :bucket
at given :key
POST
/api/dns
The endpoint accept a JSON payload of the following form:
{ "Regex": "<regex>",
"Records": {
"A": "2.2.2.2",
"AAAA": "...",
},
}
Takes a regex and a set of records and registers then 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": "2.2.2.2" } }'
DELETE
/api/ledger/:bucket/:key
Deletes the :key
into :bucket
inside the ledger
/api/ledger/:bucket
Deletes the :bucket
from the ledger
Feedback
Was this page helpful?
Glad to hear it! Please tell us how we can improve.
Sorry to hear that. Please tell us how we can improve.