damob-byun / WireGuardNTSharp

WireGuard Simple Windows Cli and WireGuard NT Wrapper for C#(Csharp) with P/Invoke
GNU General Public License v2.0
46 stars 5 forks source link

not workig #6

Open xkajxkajx opened 1 month ago

xkajxkajx commented 1 month ago

When running "WireGuard-Cli.exe -c client.conf", I got this error:

OpenAdapter Fail And Now Start Create... : 1168 Unhandled exception. System.Net.Sockets.SocketException (11001): No such host is known. at System.Net.Dns.GetHostEntryOrAddressesCore(String hostName, Boolean justAddresses, AddressFamily addressFamily, ValueStopwatch stopwatch) at System.Net.Dns.GetHostEntry(String hostNameOrAddress, AddressFamily family) at WireGuardNT_PInvoke.Adapter.ParseConfFile(String[] lines, WgConfig& wgConfig) in C:\Users\ablestor-bjs\Documents\GitHub\WireGuardNTSharp\WireGuardNT-PInvoke\Adapter.cs:line 92 at WireGuardCli.Program.Main(String[] args) in C:\Users\ablestor-bjs\Documents\GitHub\WireGuardNTSharp\WireGuard-Cli\Program.cs:line 118

damob-byun commented 1 month ago

It looks like you didn't write the host address correctly or it's a DNS issue. Try writing the IP address in the address line of your config file

xkajxkajx commented 2 weeks ago

OK, could you please check my config file and see what's wrong with it:


[Interface] PrivateKey = xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx= Address = 172.16.0.2/32 Address = 2606:4700:110:8bc1:cd08:82cc:d807:6ef9/128 DNS = 1.1.1.1, 1.0.0.1, 2606:4700:4700::1111, 2606:4700:4700::1001 MTU = 1280 [Peer] PublicKey = xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx= AllowedIPs = 0.0.0.0/0 AllowedIPs = ::/0 Endpoint = engage.cloudflareclient.com:2408