dd9cef56fc
Implements the base of a small daemon to run within a file-restore VM. The binary spawns an API server on a virtio-vsock socket, listening for connections from the host. This happens mostly manually via the standard Unix socket API, since tokio/hyper do not have support for vsock built in. Once we have the accept'ed file descriptor, we can create a UnixStream and use our tower service implementation for that. The binary is deliberately not installed in the usual $PATH location, since it shouldn't be executed on the host by a user anyway. For now, only the API calls 'status' and 'stop' are implemented, to demonstrate and test proxmox::api functionality. Authorization is provided via a custom ApiAuth only checking a header value against a static /ticket file. Since the REST server implementation uses the log!() macro, we can redirect its output to stdout by registering env_logger as the logging target. env_logger is already in our dependency tree via zstd/bindgen. Signed-off-by: Stefan Reiter <s.reiter@proxmox.com> Signed-off-by: Thomas Lamprecht <t.lamprecht@proxmox.com> |
||
---|---|---|
.. | ||
scripts | ||
source | ||
changelog | ||
compat | ||
control | ||
control.in | ||
copyright | ||
debcargo.toml | ||
lintian-overrides | ||
pmt.bc | ||
pmtx.bc | ||
postinst | ||
prerm | ||
proxmox-backup-client.bash-completion | ||
proxmox-backup-client.bc | ||
proxmox-backup-client.install | ||
proxmox-backup-docs.install | ||
proxmox-backup-docs.links | ||
proxmox-backup-manager.bc | ||
proxmox-backup-server.bash-completion | ||
proxmox-backup-server.install | ||
proxmox-backup-server.maintscript | ||
proxmox-backup-server.udev | ||
proxmox-file-restore.bash-completion | ||
proxmox-file-restore.bc | ||
proxmox-file-restore.install | ||
proxmox-tape.bc | ||
pxar.bc | ||
rules |