From c7661d7765fb62acbc6571e76f2922083b0b2b04 Mon Sep 17 00:00:00 2001 From: lucidhz <38235555+lucidhz@users.noreply.github.com> Date: Tue, 7 Jan 2025 13:25:54 +0800 Subject: [PATCH] fix: initialize error message with cipher (#1760) --- adapter/outbound/shadowsocks.go | 2 +- adapter/outbound/shadowsocksr.go | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/adapter/outbound/shadowsocks.go b/adapter/outbound/shadowsocks.go index f73d5302..94a7763d 100644 --- a/adapter/outbound/shadowsocks.go +++ b/adapter/outbound/shadowsocks.go @@ -236,7 +236,7 @@ func NewShadowSocks(option ShadowSocksOption) (*ShadowSocks, error) { Password: option.Password, }) if err != nil { - return nil, fmt.Errorf("ss %s initialize error: %w", addr, err) + return nil, fmt.Errorf("ss %s cipher: %s initialize error: %w", addr, option.Cipher, err) } var v2rayOption *v2rayObfs.Option diff --git a/adapter/outbound/shadowsocksr.go b/adapter/outbound/shadowsocksr.go index d0752e79..7012b30b 100644 --- a/adapter/outbound/shadowsocksr.go +++ b/adapter/outbound/shadowsocksr.go @@ -141,7 +141,7 @@ func NewShadowSocksR(option ShadowSocksROption) (*ShadowSocksR, error) { password := option.Password coreCiph, err := core.PickCipher(cipher, nil, password) if err != nil { - return nil, fmt.Errorf("ssr %s initialize error: %w", addr, err) + return nil, fmt.Errorf("ssr %s cipher: %s initialize error: %w", addr, cipher, err) } var ( ivSize int