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