This commit is contained in:
CN-JS-HuiBai
2026-04-15 01:17:32 +08:00
parent 463338115f
commit c0ab503b57

View File

@@ -626,7 +626,7 @@ func (s *Service) setupNode() error {
ssOptions.Users = []option.ShadowsocksUser{{
Password: base64.StdEncoding.EncodeToString(dummyKey),
}}
s.logger.Info("Xboard SS2022 setup. Method: ", method, " ServerKey (PSK) used directly from panel")
s.logger.Info("Xboard SS2022 setup. Method: ", method, " ServerKey(PSK): ", serverKey)
} else {
// Legacy SS: password-based
ssOptions.Password = serverKey
@@ -892,7 +892,12 @@ func (s *Service) syncUsers() {
// V2bX approach for SS2022 user key:
// Take first keyLen bytes of UUID, then base64 encode
if isSS2022 {
originalKey := key
key = ss2022UserKey(key, ss2022KeyLen)
if len(newUsers) == 0 {
// Log first user's key derivation for debugging
s.logger.Info("SS2022 user key derivation: UUID[:", ss2022KeyLen, "]=", originalKey[:min(ss2022KeyLen, len(originalKey))], " → uPSK=", key)
}
}
newUsers[u.Email] = userData{