I am trying to build a custom client using Golang for wireguard. I am able to load the wireguard.dll and also create the adaptor, but while setting the configuration, I am getting the error "The parameter is incorrect." Can someone please guide me on how to resolve this issue?
Here is my go struct for the configuration:-
// Struct for all above struct
type Config struct {
Interface Interface
DemoServer Peer
AllV4 AllowedIP
}
// This is how i am trying the set the config:
Config := Config{
Interface: Interface{
Flags: InterfaceHasPrivateKey,
PeerCount: 1,
},
DemoServer: Peer{
Flags: PeerHasPublicKey | PeerHasEndpoint,
AllowedIPsCount: 1,
},
AllV4: AllowedIP{
AddressFamily:2,
},
}
I have tried multiple permutations and combinations to resolve the issue, but I am not able to set the configuration of the adaptor in wireguard.
When I try to set the adaptor configuration in Wireguard Custom Client (Golang), I get the error "The parameter is incorrect." How do I resolve this?