核心改动: 1. db.rs - 默认密码从环境变量读取或自动生成 - 优先级: MOMENTRY_DEFAULT_PASSWORD > 自动生成 - 格式: demo_<timestamp> 或自定义 - 首次创建时打印密码到控制台 2. main.rs - SMB 服务密码动态化 - 从 SMB_PASSWORD 或 MOMENTRY_DEFAULT_PASSWORD 读取 - 支持自定义 SMB 用户名 3. user_tool.rs - 新增用户管理工具 - list: 列出所有用户 - create: 创建新用户 - set-password: 修改密码 - delete: 删除用户 - init-demo: 初始化 demo 用户 4. install.sh - 安装时自动生成密码 - 生成随机密码: demo_$(openssl rand -hex 4) - 保存到 .env 文件 - 初始化数据库 5. .env.template - 新增密码配置 - MOMENTRY_DEFAULT_PASSWORD - SMB_USER / SMB_PASSWORD 安全改进: - 消除硬编码密码 'demo123' - 每次安装密码唯一 - 密码哈希存储 (Argon2id) - 支持自定义强密码 文档: - docs/DEFAULT_PASSWORD_SYSTEM.md 完整说明
56 lines
1.5 KiB
TOML
56 lines
1.5 KiB
TOML
[package]
|
|
name = "momentry-studio"
|
|
version = "0.1.0"
|
|
description = "Momentry Studio - Video Analysis Platform"
|
|
authors = ["Momentry"]
|
|
license = "MIT"
|
|
repository = ""
|
|
edition = "2021"
|
|
rust-version = "1.77.2"
|
|
default-run = "momentry-studio"
|
|
|
|
[[bin]]
|
|
name = "momentry-studio"
|
|
path = "src/main.rs"
|
|
|
|
[[bin]]
|
|
name = "momentry-proxy"
|
|
path = "src/bin/proxy.rs"
|
|
|
|
[[bin]]
|
|
name = "user_tool"
|
|
path = "src/bin/user_tool.rs"
|
|
|
|
[dependencies]
|
|
dirs = "5"
|
|
tauri = { version = "2", features = ["protocol-asset"] }
|
|
tauri-plugin-shell = "2"
|
|
serde = { version = "1", features = ["derive"] }
|
|
serde_json = "1"
|
|
sqlx = { version = "0.8", default-features = false, features = ["runtime-tokio", "postgres", "json"] }
|
|
reqwest = { version = "0.11", features = ["json", "stream", "multipart"] }
|
|
tokio = { version = "1", features = ["full"] }
|
|
base64 = "0.22"
|
|
lru = "0.12"
|
|
futures = "0.3"
|
|
image = { version = "0.24", default-features = false, features = ["jpeg"] }
|
|
kamadak-exif = "0.6"
|
|
axum = "0.7"
|
|
tower-http = { version = "0.5", features = ["cors", "fs"] }
|
|
rusqlite = { version = "0.32", features = ["bundled"] }
|
|
chrono = { version = "0.4", features = ["serde"] }
|
|
uuid = { version = "1", features = ["v4"] }
|
|
argon2 = "0.5"
|
|
rand = "0.8"
|
|
# MarkBase Core for Admin/Client GUI
|
|
markbase-core = { path = "../../markbase/markbase-core" }
|
|
|
|
[target.'cfg(target_arch = "aarch64")'.dependencies]
|
|
macmon = { version = "0.8", default-features = false }
|
|
|
|
[build-dependencies]
|
|
tauri-build = { version = "2", features = [] }
|
|
|
|
[features]
|
|
custom-protocol = ["tauri/custom-protocol"]
|