implementing wireguard into c# wpf app
hi, was wondering how i can go about doing this?
18 Replies
or any other vpn protocols??
You probably want to look at https://www.wireguard.com/embedding/
too complex for my brain
plus not really any examples
idk how to help you then, the question is vague and the domain is complex 🤷 . Need more information on what problem you're trying to solve
ive got a little ui
and i wanna make it so that when i press on a country
it will connect to a wireguard config associated with that country
whenever i press connect
but i dont know how i can implement wireguard into the app
If you require wg to already be installed, you can either:
1. Run the scripting commands using https://git.zx2c4.com/wireguard-tools/about/src/man/wg.8
2. If you're on windows register a service and do config loading manually: https://git.zx2c4.com/wireguard-windows/about/embeddable-dll-service/README.md
other OS will have different way of doing it. Central link provides links to documentation depending on what OS you're using
is there a way without having it already installed
The second option. You'll ship the binaries with your application as needed to use
They have an example UI in https://git.zx2c4.com/wireguard-windows/tree/embeddable-dll-service/csharp
It uses winforms, but doesn't require winforms to work
okay will try it
thanks 😄
good luck!
For what it's worth the embedded option @Andrew (ryzngard | they/them) mentioned has an example.
yeah i was having problems with the example
i got the tunnel.dll and wireguard.dll
but it doesnt seem to work
You probably need wireguard installed?
already had it installed
You can look for load failures. Is this NetFX or Net5+?