Open mauro-midolo opened 9 months ago
Привет. Работает хорошо. https://github.com/wawanUnic/ESP32-WireGuard
Но медленно: Success/Wrong pings: 141/5. Time begin ping: 00:13:43 Response from 192.168.42.1 in 39.38 ms Success/Wrong pings: 142/5. Time begin ping: 00:13:47 Response from 192.168.42.1 in 11.68 ms Success/Wrong pings: 143/5. Time begin ping: 00:13:51 Response from 192.168.42.1 in 9.10 ms Success/Wrong pings: 144/5. Time begin ping: 00:13:55 Response from 192.168.42.1 in 25.28 ms Success/Wrong pings: 145/5. Time begin ping: 00:13:59 Response from 192.168.42.1 in 529.07 ms Success/Wrong pings: 146/5. Time begin ping: 00:14:06 Response from 192.168.42.1 in 289.63 ms Success/Wrong pings: 147/5. Time begin ping: 00:14:13 Response from 192.168.42.1 in 615.04 ms Success/Wrong pings: 148/5. Time begin ping: 00:14:21 Response from 192.168.42.1 in 246.30 ms Success/Wrong pings: 149/5. Time begin ping: 00:14:27
При том, что в цикле loop ничего нет, кроме пинга:
`void loop() { bool pingResult = Ping.ping(targetIP);
if (pingResult) { Serial.print("Response from "); Serial.print(targetIP); Serial.print(" in "); Serial.print(Ping.averageTime()); Serial.println(" ms"); } else { Serial.println("Ping failed"); }`
Из 173 удачных обменов было потеряно 6.
Enable the ESP32 debug options. It's possibile you're trying to connect to a wg server that requires a preshared key. If this is your scenario you'll see a "handshake failed/error" and that's probably the root issue. Right now the preshared key isn't managed. Try to configure your server for not requiring preshared keys.
I am encountering difficulties in establishing a VPN connection using the WireGuard-ESP32 library on an ESP32 device. I have included my sample code below, but it seems not to be functioning as expected.
I have followed the WiFi connection process and WireGuard initialization as per the documentation, but it seems that the VPN connection fails to establish correctly. I have also included code for pinging a destination IP address.
Thank you for your assistance in resolving this issue.