feat: 新增mysql ssh代理连接方式

This commit is contained in:
大圣之家
2022-07-20 01:37:25 +00:00
committed by Gitee
parent 5271bd21e8
commit 8c9253da80
8 changed files with 150 additions and 2 deletions

View File

@@ -55,6 +55,15 @@ func (d *Db) Save(rc *ctx.ReqCtx) {
// 密码脱敏记录日志
form.Password = "****"
if form.Type == "mysql" && form.EnableSSH == 1 {
originSSHPwd, err := utils.DefaultRsaDecrypt(form.SSHPass, true)
biz.ErrIsNilAppendErr(err, "解密密码错误: %s")
db.SSHPass = originSSHPwd
// 密码脱敏记录日志
form.SSHPass = "****"
}
rc.ReqParam = form
db.SetBaseInfo(rc.LoginAccount)