8e5c0969ef
build / build-linux-amd64 (push) Successful in 1m49s
Adds an admin UI page that produces an Ed25519-signed custom.txt the
patched RustDesk client picks up at startup. The blob carries
app-name, default-settings, override-settings, an optional logo
image, and arbitrary buildin keys.
- gen_branding_sk + read_branding_sk + read_branding_pubkey in
common.rs; called once on hbbs startup so the branding keypair
(separate from the rendezvous id_ed25519) is created on first boot
alongside it. Decoupling lets the two rotate independently.
- src/api/admin/pages/customization.rs: form with multipart logo
upload (PNG/ICO/JPEG, magic-byte sniffed, capped at 256 KiB), JSON
default/override settings fields, kv-pair rows for arbitrary
buildin keys. Signs with sodiumoxide and emits standard-base64
matching the client's decode64 path. Result block has a copyable
blob and a "Download custom.txt" button.
- Routes wired under /admin/pages/customization{,/generate,/download}
and the admin nav gets a Customization link.
- src/verify_branding.rs: smoke-test binary the operator can run
before cutting a client release to confirm the signature
round-trips.
- axum gains the multipart feature flag for the upload handler.
Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
90 lines
2.8 KiB
TOML
90 lines
2.8 KiB
TOML
[package]
|
|
name = "hbbs"
|
|
version = "1.1.15"
|
|
authors = ["rustdesk <info@rustdesk.com>"]
|
|
edition = "2021"
|
|
build = "build.rs"
|
|
default-run = "hbbs"
|
|
|
|
[[bin]]
|
|
name = "hbbr"
|
|
path = "src/hbbr.rs"
|
|
|
|
[[bin]]
|
|
name = "rustdesk-utils"
|
|
path = "src/utils.rs"
|
|
|
|
[[bin]]
|
|
name = "verify_branding"
|
|
path = "src/verify_branding.rs"
|
|
|
|
# See more keys and their definitions at https://doc.rust-lang.org/cargo/reference/manifest.html
|
|
|
|
[dependencies]
|
|
hbb_common = { path = "libs/hbb_common" }
|
|
tokio = { version = "1", features = ["fs", "io-util"] }
|
|
totp-rs = { version = "5.4", default-features = false }
|
|
qrcode = { version = "0.14", default-features = false, features = ["svg"] }
|
|
lettre = { version = "0.10", default-features = false, features = ["smtp-transport", "tokio1-rustls-tls", "builder"] }
|
|
toml = "0.7"
|
|
serde_derive = "1.0"
|
|
serde = "1.0"
|
|
serde_json = "1.0"
|
|
lazy_static = "1.4"
|
|
clap = "2"
|
|
rust-ini = "0.18"
|
|
minreq = { version = "2.4", features = ["punycode"] }
|
|
machine-uid = "0.2"
|
|
mac_address = "1.1.5"
|
|
whoami = "1.2"
|
|
base64 = "0.13"
|
|
axum = { version = "0.5", features = ["headers", "multipart"] }
|
|
sqlx = { version = "0.6", features = [ "runtime-tokio-rustls", "sqlite", "macros", "chrono", "json" ] }
|
|
deadpool = "0.8"
|
|
async-trait = "0.1"
|
|
async-speed-limit = { git = "https://github.com/open-trade/async-speed-limit" }
|
|
uuid = { version = "1.0", features = ["v4"] }
|
|
bcrypt = "0.13"
|
|
chrono = "0.4"
|
|
jsonwebtoken = "8"
|
|
headers = "0.3"
|
|
once_cell = "1.8"
|
|
sodiumoxide = "0.2"
|
|
tokio-tungstenite = "0.17"
|
|
tungstenite = "0.17"
|
|
regex = "1.4"
|
|
tower-http = { version = "0.3", features = ["fs", "trace", "cors"] }
|
|
tower = { version = "0.4", features = ["util"] }
|
|
http = "0.2"
|
|
http-body = "0.4"
|
|
flexi_logger = { version = "0.22", features = ["async", "use_chrono_for_offset", "dont_minimize_extra_stacks"] }
|
|
ipnetwork = "0.20"
|
|
local-ip-address = "0.5.1"
|
|
dns-lookup = "1.0.8"
|
|
ping = "0.4.0"
|
|
flate2 = "1.0"
|
|
|
|
[target.'cfg(any(target_os = "macos", target_os = "windows"))'.dependencies]
|
|
# https://github.com/rustdesk/rustdesk-server-pro/issues/189, using native-tls for better tls support
|
|
reqwest = { git = "https://github.com/rustdesk-org/reqwest", features = ["blocking", "socks", "json", "native-tls", "gzip"], default-features=false }
|
|
|
|
[target.'cfg(not(any(target_os = "macos", target_os = "windows")))'.dependencies]
|
|
reqwest = { git = "https://github.com/rustdesk-org/reqwest", features = ["blocking", "socks", "json", "rustls-tls", "rustls-tls-native-roots", "gzip"], default-features=false }
|
|
|
|
[build-dependencies]
|
|
hbb_common = { path = "libs/hbb_common" }
|
|
|
|
[workspace]
|
|
members = ["libs/hbb_common"]
|
|
exclude = ["ui"]
|
|
|
|
#https://github.com/johnthagen/min-sized-rust
|
|
#https://doc.rust-lang.org/cargo/reference/profiles.html#default-profiles
|
|
[profile.release]
|
|
lto = true
|
|
codegen-units = 1
|
|
panic = 'abort'
|
|
strip = true
|
|
#opt-level = 'z' # only have smaller size after strip # Default is 3, better performance
|
|
#rpath = true # Not needed
|