so-far updates

This commit is contained in:
Alireza Ahmadi
2025-07-30 16:09:15 +02:00
parent ee03836eeb
commit e954ccd957
26 changed files with 806 additions and 403 deletions

View File

@@ -564,3 +564,29 @@ func (s *ServerService) GetNewX25519Cert() (interface{}, error) {
return keyPair, nil
}
func (s *ServerService) GetNewmldsa65() (any, error) {
// Run the command
cmd := exec.Command(xray.GetBinaryPath(), "mldsa65")
var out bytes.Buffer
cmd.Stdout = &out
err := cmd.Run()
if err != nil {
return nil, err
}
lines := strings.Split(out.String(), "\n")
SeedLine := strings.Split(lines[0], ":")
VerifyLine := strings.Split(lines[1], ":")
seed := strings.TrimSpace(SeedLine[1])
verify := strings.TrimSpace(VerifyLine[1])
keyPair := map[string]any{
"seed": seed,
"verify": verify,
}
return keyPair, nil
}