新增: MySQL/SSH 代理工具

- mysql-proxy: MySQL HTTP 代理,连接池复用
- ssh-proxy: SSH HTTP 代理,会话复用
- mysql-cli: 轻量级 MySQL CLI 工具

功能特性:
- 延迟初始化,启动快
- CLI 和 HTTP API 双模式
- 请求日志支持
- 错误友好提示
- JSON 极简输出格式
This commit is contained in:
2026-03-19 14:03:12 +08:00
commit 11203f036f
24 changed files with 3794 additions and 0 deletions

21
mysql-proxy/Cargo.toml Normal file
View File

@@ -0,0 +1,21 @@
[package]
name = "mysql-proxy"
version = "0.1.0"
edition = "2021"
description = "MySQL HTTP proxy with connection pooling"
[dependencies]
mysql = "25"
tokio = { version = "1", features = ["full"] }
axum = "0.7"
serde = { version = "1", features = ["derive"] }
serde_json = "1"
toml = "0.8"
anyhow = "1"
clap = { version = "4", features = ["derive"] }
ureq = "2" # CLI HTTP client (2.x has simpler API)
[profile.release]
opt-level = "z"
lto = true
strip = true