From 0e56e197ab83eda7764840ad803d2fa75aa4147e Mon Sep 17 00:00:00 2001 From: CN-JS-HuiBai Date: Wed, 15 Apr 2026 01:46:12 +0800 Subject: [PATCH] =?UTF-8?q?=E8=AF=B7=E5=86=8D=E6=AC=A1=E7=BC=96=E8=AF=91?= =?UTF-8?q?=E9=83=A8=E7=BD=B2=EF=BC=81=E5=86=B2=E6=9C=80=E5=90=8E=E7=9A=84?= =?UTF-8?q?=E4=B8=80=E6=B3=A2=EF=BC=81?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- service/xboard/service.go | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/service/xboard/service.go b/service/xboard/service.go index 42961dca..81d430aa 100644 --- a/service/xboard/service.go +++ b/service/xboard/service.go @@ -626,10 +626,11 @@ func (s *Service) setupNode() error { } if strings.Contains(method, "2022") { - // SS2022: server_key is used DIRECTLY as PSK (like V2bX core/sing/node.go:251) - ssOptions.Password = serverKey + // SS2022: server_key must be Base64-encoded to match client URI + keyLen := ss2022KeyLength(method) + ssOptions.Password = ss2022Key(serverKey, keyLen) - s.logger.Info("Xboard SS2022 setup. Method: ", method, " ServerKey(PSK): ", serverKey) + s.logger.Info("Xboard SS2022 setup. Method: ", method, " Master_PSK: ", ssOptions.Password) } else { // Legacy SS: password-based ssOptions.Password = serverKey