mirror of
https://github.com/amnezia-vpn/amneziawg-go.git
synced 2026-10-02 21:36:06 +03:00
outline: pass header protection key directly to UAPI
This commit is contained in:
1 file changed
+1
-8
+1
-8
@@ -146,15 +146,8 @@ func genIpcString(cfg *DeviceConfig) (string, error) {
|
||||
b.WriteString(cfg.I5)
|
||||
}
|
||||
if cfg.HeaderProtectionKey != "" {
|
||||
key, err := base64.StdEncoding.DecodeString(cfg.HeaderProtectionKey)
|
||||
if err != nil {
|
||||
return "", fmt.Errorf("failed to decode header protection key: %w", err)
|
||||
}
|
||||
if len(key) != 32 {
|
||||
return "", fmt.Errorf("header protection key must contain 32 bytes")
|
||||
}
|
||||
b.WriteString("\nheader_protection_key=")
|
||||
b.WriteString(hex.EncodeToString(key))
|
||||
b.WriteString(cfg.HeaderProtectionKey)
|
||||
}
|
||||
if cfg.ContentPaddingAddition != "" {
|
||||
b.WriteString("\ncontent_padding_addition=")
|
||||
|
||||
Reference in new issue
Block a user