feat(proxy): 增加数据库和 AI 代理支持

This commit is contained in:
t8y2
2026-05-11 15:05:25 +08:00
parent 1d5a2b2220
commit 79277c660f
20 changed files with 712 additions and 19 deletions
+4
View File
@@ -137,6 +137,9 @@ pub async fn test_connection(state: State<'_, Arc<AppState>>, config: Connection
if config.ssh_enabled && !config.ssh_host.is_empty() {
state.tunnels.stop_tunnel(&tunnel_id).await;
}
if config.proxy_enabled && !config.proxy_host.is_empty() {
state.proxy_tunnels.stop_tunnel(&tunnel_id).await;
}
result
}
@@ -268,5 +271,6 @@ pub async fn disconnect_db(state: State<'_, Arc<AppState>>, connection_id: Strin
drop(conns);
state.configs.write().await.remove(&connection_id);
state.tunnels.stop_tunnel(&connection_id).await;
state.proxy_tunnels.stop_tunnel(&connection_id).await;
Ok(())
}