From dc86fb75c68d8d2988809eb5070da55a8fdd7a7b Mon Sep 17 00:00:00 2001 From: Lykin <137850705+tiny-craft@users.noreply.github.com> Date: Fri, 18 Jul 2025 15:28:23 +0800 Subject: [PATCH 01/17] fix: error compare --- backend/services/connection_service.go | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/backend/services/connection_service.go b/backend/services/connection_service.go index 4bff594f..41f15d16 100644 --- a/backend/services/connection_service.go +++ b/backend/services/connection_service.go @@ -334,7 +334,7 @@ func (c *connectionService) TestConnection(config types.ConnectionConfig) (resp } defer client.Close() - if _, err = client.Ping(c.ctx).Result(); err != nil && err != redis.Nil { + if _, err = client.Ping(c.ctx).Result(); err != nil && !errors.Is(err, redis.Nil) { resp.Msg = err.Error() } else { resp.Success = true From 0f66a00c66b24dd5cedec56e9118fcb163a6dc78 Mon Sep 17 00:00:00 2001 From: Lykin <137850705+tiny-craft@users.noreply.github.com> Date: Sat, 19 Jul 2025 14:37:11 +0800 Subject: [PATCH 02/17] fix: ssl/tls config lost when connection via ssh (#305) --- backend/services/connection_service.go | 21 ++++++++++++++++++++- 1 file changed, 20 insertions(+), 1 deletion(-) diff --git a/backend/services/connection_service.go b/backend/services/connection_service.go index 41f15d16..a5b292a7 100644 --- a/backend/services/connection_service.go +++ b/backend/services/connection_service.go @@ -196,9 +196,28 @@ func (c *connectionService) buildOption(config types.ConnectionConfig) (*redis.O } } if dialer != nil { - option.Dialer = func(ctx context.Context, network, addr string) (net.Conn, error) { + dial := func(ctx context.Context, network, addr string) (net.Conn, error) { return dialer.Dial(network, addr) } + + if tlsConfig != nil { + // use dialer with tls config + option.Dialer = func(ctx context.Context, network, addr string) (net.Conn, error) { + rawConn, err := dial(ctx, network, addr) + if err != nil { + rawConn.Close() + return nil, err + } + tlsConn := tls.Client(rawConn, tlsConfig) + if err = tlsConn.Handshake(); err != nil { + rawConn.Close() + return nil, err + } + return tlsConn, nil + } + } else { + option.Dialer = dial + } option.ReadTimeout = -2 option.WriteTimeout = -2 } From 10fcc87bc084917d97a686a66e142809d72a5459 Mon Sep 17 00:00:00 2001 From: Lykin <137850705+tiny-craft@users.noreply.github.com> Date: Sat, 19 Jul 2025 14:49:59 +0800 Subject: [PATCH 03/17] pref: remove macro import --- frontend/package.json.md5 | 2 +- frontend/src/components/content_value/ContentCli.vue | 2 +- .../components/content_value/ContentEntryEditor.vue | 2 +- frontend/src/components/new_value/AddZSetValue.vue | 2 +- frontend/src/components/new_value/NewStreamValue.vue | 2 +- go.sum | 11 +---------- 6 files changed, 6 insertions(+), 15 deletions(-) diff --git a/frontend/package.json.md5 b/frontend/package.json.md5 index 9b26aadd..4fad0ca2 100755 --- a/frontend/package.json.md5 +++ b/frontend/package.json.md5 @@ -1 +1 @@ -c80744790b5564af62bbc5cd454fc375 \ No newline at end of file +7922a0b043b87e91e94ca6ec02338803 \ No newline at end of file diff --git a/frontend/src/components/content_value/ContentCli.vue b/frontend/src/components/content_value/ContentCli.vue index df4a415d..5c43f6b1 100644 --- a/frontend/src/components/content_value/ContentCli.vue +++ b/frontend/src/components/content_value/ContentCli.vue @@ -1,7 +1,7 @@