Working on more hp

This commit is contained in:
Owen
2025-12-03 20:49:46 -05:00
parent 284f1ce627
commit 8c4d6e2e0a
10 changed files with 157 additions and 142 deletions

View File

@@ -139,6 +139,18 @@ func FixKey(key string) string {
return hex.EncodeToString(decoded)
}
// this is the opposite of FixKey
func UnfixKey(hexKey string) string {
// Decode from hex
decoded, err := hex.DecodeString(hexKey)
if err != nil {
logger.Fatal("Error decoding hex: %v", err)
}
// Convert to base64
return base64.StdEncoding.EncodeToString(decoded)
}
func MapToWireGuardLogLevel(level logger.LogLevel) int {
switch level {
case logger.DEBUG: