mirror of
https://gitclone.com/github.com/MetaCubeX/Clash.Meta
synced 2025-02-23 03:23:17 +08:00
fix: wireguard multi peers public key parse
This commit is contained in:
parent
367a287153
commit
eae1f05e88
@ -188,7 +188,8 @@ func NewWireGuard(option WireGuardOption) (*WireGuard, error) {
|
||||
}
|
||||
|
||||
if len(option.Peers) > 0 {
|
||||
for i, peer := range option.Peers {
|
||||
for i := range option.Peers {
|
||||
peer := &option.Peers[i] // we need modify option here
|
||||
bytes, err := base64.StdEncoding.DecodeString(peer.PublicKey)
|
||||
if err != nil {
|
||||
return nil, E.Cause(err, "decode public key for peer ", i)
|
||||
|
Loading…
Reference in New Issue
Block a user