(peer *PeerInfo)
| 41 | } |
| 42 | |
| 43 | func clonePeerInfo(peer *PeerInfo) *PeerInfo { |
| 44 | if peer == nil { |
| 45 | return nil |
| 46 | } |
| 47 | |
| 48 | return &PeerInfo{ |
| 49 | Email: peer.Email, |
| 50 | PublicKey: peer.PublicKey, |
| 51 | AllowedIPs: append([]net.IPNet(nil), peer.AllowedIPs...), |
| 52 | } |
| 53 | } |
| 54 | |
| 55 | // NewConfig creates a new WireGuard configuration from JSON |
| 56 | func NewConfig(config string) (*Config, error) { |
no outgoing calls
no test coverage detected