API
The six interfaces a UI reads the app through, with every shape they carry: state, features, settings and profiles. The app's web hosts serve them over HTTP, and the HTTP clients answer them from anywhere else.
When to use it
- You write a UI for the app: it needs AppLib.Api and nothing else of the app.
- Your UI runs somewhere else: a paired browser, a WebAssembly head, another app, or a second VpnHood client on the network.
Which package to take
- AppLib.Api: the interfaces and their shapes.
- AppLib.Api.WebHost: serve the API, and a web UI's files, over HTTP.
- AppLib.Api.HttpClients: reach the app's web host from somewhere else.
Its packages
| Package | What it does | |
|---|---|---|
| VpnHood.AppLib.Api | The VpnHood app's API: the six interfaces a UI reads the app through, every shape they carry - state, features, settings, profiles - and the client that dials them over HTTP. | Overview · API |
| VpnHood.AppLib.Api.HttpClients | The app's API reached from somewhere else: the six interfaces answered by HTTP calls to a VpnHoodAppWebHost. | Overview · API |
| VpnHood.AppLib.Api.WebHost | The VpnHood app's web hosts: they serve the app's API over HTTP, and a web UI's files, to a UI on the device and to a paired device on the network. | Overview · API |