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>
83 lines
2.4 KiB
TOML
83 lines
2.4 KiB
TOML
[package]
|
|
name = "proxmox-backup"
|
|
version = "1.0.13"
|
|
authors = [
|
|
"Dietmar Maurer <dietmar@proxmox.com>",
|
|
"Dominik Csapak <d.csapak@proxmox.com>",
|
|
"Christian Ebner <c.ebner@proxmox.com>",
|
|
"Fabian Grünbichler <f.gruenbichler@proxmox.com>",
|
|
"Stefan Reiter <s.reiter@proxmox.com>",
|
|
"Thomas Lamprecht <t.lamprecht@proxmox.com>",
|
|
"Wolfgang Bumiller <w.bumiller@proxmox.com>",
|
|
"Proxmox Support Team <support@proxmox.com>",
|
|
]
|
|
edition = "2018"
|
|
license = "AGPL-3"
|
|
description = "Proxmox Backup"
|
|
homepage = "https://www.proxmox.com"
|
|
|
|
exclude = [ "build", "debian", "tests/catar_data/test_symlink/symlink1"]
|
|
|
|
[lib]
|
|
name = "proxmox_backup"
|
|
path = "src/lib.rs"
|
|
|
|
[dependencies]
|
|
apt-pkg-native = "0.3.2"
|
|
base64 = "0.12"
|
|
bitflags = "1.2.1"
|
|
bytes = "1.0"
|
|
crc32fast = "1"
|
|
endian_trait = { version = "0.6", features = ["arrays"] }
|
|
env_logger = "0.7"
|
|
flate2 = "1.0"
|
|
anyhow = "1.0"
|
|
futures = "0.3"
|
|
h2 = { version = "0.3", features = [ "stream" ] }
|
|
handlebars = "3.0"
|
|
http = "0.2"
|
|
hyper = { version = "0.14", features = [ "full" ] }
|
|
lazy_static = "1.4"
|
|
libc = "0.2"
|
|
log = "0.4"
|
|
nix = "0.19.1"
|
|
num-traits = "0.2"
|
|
once_cell = "1.3.1"
|
|
openssl = "0.10"
|
|
pam = "0.7"
|
|
pam-sys = "0.5"
|
|
percent-encoding = "2.1"
|
|
pin-utils = "0.1.0"
|
|
pin-project = "1.0"
|
|
pathpatterns = "0.1.2"
|
|
proxmox = { version = "0.11.0", features = [ "sortable-macro", "api-macro", "websocket" ] }
|
|
#proxmox = { git = "git://git.proxmox.com/git/proxmox", version = "0.1.2", features = [ "sortable-macro", "api-macro" ] }
|
|
#proxmox = { path = "../proxmox/proxmox", features = [ "sortable-macro", "api-macro", "websocket" ] }
|
|
proxmox-fuse = "0.1.1"
|
|
pxar = { version = "0.10.1", features = [ "tokio-io" ] }
|
|
#pxar = { path = "../pxar", features = [ "tokio-io" ] }
|
|
regex = "1.2"
|
|
rustyline = "7"
|
|
serde = { version = "1.0", features = ["derive"] }
|
|
serde_json = "1.0"
|
|
siphasher = "0.3"
|
|
syslog = "4.0"
|
|
tokio = { version = "1.0", features = [ "fs", "io-util", "io-std", "macros", "net", "parking_lot", "process", "rt", "rt-multi-thread", "signal", "time" ] }
|
|
tokio-openssl = "0.6.1"
|
|
tokio-stream = "0.1.0"
|
|
tokio-util = { version = "0.6", features = [ "codec" ] }
|
|
tower-service = "0.3.0"
|
|
udev = ">= 0.3, <0.5"
|
|
url = "2.1"
|
|
#valgrind_request = { git = "https://github.com/edef1c/libvalgrind_request", version = "1.1.0", optional = true }
|
|
walkdir = "2"
|
|
webauthn-rs = "0.2.5"
|
|
xdg = "2.2"
|
|
zstd = { version = "0.4", features = [ "bindgen" ] }
|
|
nom = "5.1"
|
|
crossbeam-channel = "0.5"
|
|
|
|
[features]
|
|
default = []
|
|
#valgrind = ["valgrind_request"]
|