C
C#•6mo ago
forkt

implementing wireguard into c# wpf app

hi, was wondering how i can go about doing this?
18 Replies
forkt
forkt•6mo ago
or any other vpn protocols??
lycian
lycian•6mo ago
You probably want to look at https://www.wireguard.com/embedding/
forkt
forkt•6mo ago
too complex for my brain plus not really any examples
lycian
lycian•6mo ago
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
forkt
forkt•6mo ago
No description
forkt
forkt•6mo ago
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
lycian
lycian•6mo ago
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
forkt
forkt•6mo ago
is there a way without having it already installed
lycian
lycian•6mo ago
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
forkt
forkt•6mo ago
okay will try it thanks 😄
lycian
lycian•6mo ago
good luck!
Mayor McCheese
Mayor McCheese•6mo ago
For what it's worth the embedded option @Andrew (ryzngard | they/them) mentioned has an example.
forkt
forkt•6mo ago
yeah i was having problems with the example
forkt
forkt•6mo ago
No description
forkt
forkt•6mo ago
i got the tunnel.dll and wireguard.dll but it doesnt seem to work
Mayor McCheese
Mayor McCheese•6mo ago
You probably need wireguard installed?
forkt
forkt•6mo ago
already had it installed
lycian
lycian•6mo ago
You can look for load failures. Is this NetFX or Net5+?