1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
//! Optional HTTP services hosted by Axvisor.
//!
//! Served by an axum `Router` running on a tokio current-thread runtime
//! (see [`server`]). The browser console and VM management API are independent
//! features that may share this listener when both are enabled.
//!
//! The server binds `127.0.0.1:8080` by default and only binds wider when
//! `[env] AXVM_HTTP_BIND` opts in. With `http-axum`, mutating VM routes also
//! require the build-time bearer token implemented by the `auth` module.
//!
//! This module is compiled when either optional HTTP feature is selected. Both
//! features are off by default.
/// Blocking entry point for the configured HTTP services.
///
/// Spawned on its own task (see `crate::main`); builds the tokio runtime and
/// serves until the hypervisor shuts down.
/// Configured HTTP listener address used by the startup access banner.
pub
/// Whether the HTTP listener has successfully bound its configured address.
pub