amnezia-vpn / amnezia-client

Amnezia VPN Client (Desktop+Mobile)
https://amnezia.org
GNU General Public License v3.0
5.26k stars 330 forks source link

Sometimes AmneziaWG didn't complete handshakes #1041

Closed kda2495 closed 1 month ago

kda2495 commented 1 month ago

Describe the bug I use AmneziaWG on iOS and Windows with Cloudflare WARP. Sometimes when I connect, I don't have connection. In log files I see message: Sending handshake initiation and then Handshake did not complete aftr 5 seconds, retrying. I changed Jc, Jmin, Jmax and other integers but it doesn't help. Sometimes it works, but sometimes not. Can you fix it?

To Reproduce Steps to reproduce the behavior:

  1. Go to 'Amnezia WG'
  2. Click on 'Connect'
  3. No completion of handshake sometimes

Expected behavior Handshake completion every time I connect.

Log files Attach log files to help explain your problem.

Screenshots photo_5384155351861029283_y

Desktop (please complete the following information):

Smartphone (please complete the following information):

kda2495 commented 1 month ago

I used many settings, many VPN providers and problem exists. I don't know why, but sometimes handshake doesn't complete.

amnzam commented 1 month ago

Hello. Thank you for your message. Could you please clarify some statements from your message?

  1. The issue appears more on Cellular data (internet) or Home (ISP) internet? Is it the same with all providers?
  2. What do you mean by this: > many VPN providers and problem exists
  3. Am I right that you are using WARP config with AmneziaWG app?
kda2495 commented 1 month ago

Hello. Thank you for your message. Could you please clarify some statements from your message?

  1. The issue appears more on Cellular data (internet) or Home (ISP) internet? Is it the same with all providers?
  2. What do you mean by this: > many VPN providers and problem exists
  3. Am I right that you are using WARP config with AmneziaWG app?
  1. Cellular and Home, the same.
  2. Many VPN-providers (Cloudflare WARP, ProtonVPN and others) with Wireguard-configs and AmneziaWG-improvements.
  3. Wireguard-config with AmneziaWG-improvements (Jc and others) in AmneziaWG for iOS and Windows. 90% of connections is successful, but I have problem with handshake in 10% of connections. To reproduce this you can make config and connect-disable connect-connect again and sometimes you will see, that internet is down and in journal you'll see, that handshake isn't successful. Hope, you will find this and fix. Thanks!
amnzam commented 1 month ago

@kda2495 Am I right that you are using self-hosted solution for AWG protocol? Did you try to install and connect to any VPS server with AWG protocol through AmneziaVPN app?

kda2495 commented 1 month ago

@kda2495 Am I right that you are using self-hosted solution for AWG protocol? Did you try to install and connect to any VPS server with AWG protocol through AmneziaVPN app?

I've updated my comment from above. No, I haven't tried using any VPS server, just some free VPN-providers. If it is a problem with Cloudflare WARP, so, why it exists with ProtonVPN Wireguard config also?

amnzam commented 1 month ago

@kda2495 Am I right that you are using self-hosted solution for AWG protocol? Did you try to install and connect to any VPS server with AWG protocol through AmneziaVPN app?

I've updated my comment from above. No, I haven't tried using any VPS server, just some free VPN-providers. If it is a problem with Cloudflare WARP, so, why it exists with ProtonVPN Wireguard config also?

Because of DPI in Russia. They are trying to block Wireguard protocol and all VPN providers. We suggest you to try AWG self-hosted solution.

kda2495 commented 1 month ago

@kda2495 Am I right that you are using self-hosted solution for AWG protocol? Did you try to install and connect to any VPS server with AWG protocol through AmneziaVPN app?

I've updated my comment from above. No, I haven't tried using any VPS server, just some free VPN-providers. If it is a problem with Cloudflare WARP, so, why it exists with ProtonVPN Wireguard config also?

Because of DPI in Russia. They are trying to block Wireguard protocol and all VPN providers. We suggest you to try AWG self-hosted solution.

It's strange, that 90% of connections is successful. Isn't it the problem with the AmneziaWG app?

amnzam commented 1 month ago

@kda2495 Am I right that you are using self-hosted solution for AWG protocol? Did you try to install and connect to any VPS server with AWG protocol through AmneziaVPN app?

I've updated my comment from above. No, I haven't tried using any VPS server, just some free VPN-providers. If it is a problem with Cloudflare WARP, so, why it exists with ProtonVPN Wireguard config also?

Because of DPI in Russia. They are trying to block Wireguard protocol and all VPN providers. We suggest you to try AWG self-hosted solution.

It's strange, that 90% of connections is successful.

What do you mean by this?

kda2495 commented 1 month ago

@kda2495 Am I right that you are using self-hosted solution for AWG protocol? Did you try to install and connect to any VPS server with AWG protocol through AmneziaVPN app?

I've updated my comment from above. No, I haven't tried using any VPS server, just some free VPN-providers. If it is a problem with Cloudflare WARP, so, why it exists with ProtonVPN Wireguard config also?

Because of DPI in Russia. They are trying to block Wireguard protocol and all VPN providers. We suggest you to try AWG self-hosted solution.

It's strange, that 90% of connections is successful.

What do you mean by this?

When I use any config with AmneziaWG 90% of handshakes (connect-disable connect-reconnect) is successful. But handshake isn't successful with 10% of connections. So, is that mean, that problem can be with AmneziaWG?

amnzam commented 1 month ago

What

@kda2495 Am I right that you are using self-hosted solution for AWG protocol? Did you try to install and connect to any VPS server with AWG protocol through AmneziaVPN app?

I've updated my comment from above. No, I haven't tried using any VPS server, just some free VPN-providers. If it is a problem with Cloudflare WARP, so, why it exists with ProtonVPN Wireguard config also?

Because of DPI in Russia. They are trying to block Wireguard protocol and all VPN providers. We suggest you to try AWG self-hosted solution.

It's strange, that 90% of connections is successful.

What do you mean by this?

When I use any config with AmneziaWG 90% of handshakes (connect-disable connect-reconnect) is successful. But handshake isn't successful with 10% of connections. So, is that mean, that problem can be with AmneziaWG?

As I understood, you are using Wireguard protocol configs of different VPN providers. As I have told you before, Russian DPI software/hardware is trying to block Wireguard protocol and all VPN providers. We suggest you try AWG protocol. AWG has been created on top of Wireguard with some obfuscation features.

kda2495 commented 1 month ago

What

@kda2495 Am I right that you are using self-hosted solution for AWG protocol? Did you try to install and connect to any VPS server with AWG protocol through AmneziaVPN app?

I've updated my comment from above. No, I haven't tried using any VPS server, just some free VPN-providers. If it is a problem with Cloudflare WARP, so, why it exists with ProtonVPN Wireguard config also?

Because of DPI in Russia. They are trying to block Wireguard protocol and all VPN providers. We suggest you to try AWG self-hosted solution.

It's strange, that 90% of connections is successful.

What do you mean by this?

When I use any config with AmneziaWG 90% of handshakes (connect-disable connect-reconnect) is successful. But handshake isn't successful with 10% of connections. So, is that mean, that problem can be with AmneziaWG?

As I understood, you are using Wireguard protocol configs of different VPN providers. As I have told you before, Russian DPI software/hardware is trying to block Wireguard protocol and all VPN providers. We suggest you try AWG protocol. AWG has been created on top of Wireguard with some obfuscation features.

No, you've understood wrong) So, for example, I make a config of Cloudflare WARP, then I modify it with Jc = 3, Jmin = 40, Jmax = 70 and other recommendated integers. Then I import it in AmneziaWG app and everything works in 90 percents (handshake is successful). But sometimes, when I connect with AmneziaWG, handshake don't complete. I don't use Wireguard, only AmneziaWG apps for iOS and Windows.

kda2495 commented 1 month ago

Безымянный This is what I see on AmneziaWG on Windows. To reproduce this, you should connect-disconnect-connect for some time (10 maybe). And you will see, that AmneziaWG tries to make handshake with server and didn't complete it. If you want, I can make config of Cloudflare WARP to test and reproduce this bug. Also I see this bug on iOS with AmneziaWG app.

amnzam commented 1 month ago

Безымянный This is what I see on AmneziaWG on Windows. To reproduce this, you should connect-disconnect-connect for some time (10 maybe). And you will see, that AmneziaWG tries to make handshake with server and didn't complete it. If you want, I can make config of Cloudflare WARP to test and reproduce this bug. Also I see this bug on iOS with AmneziaWG app.

Did you try native AWG protocol?

kda2495 commented 1 month ago

So, I've fixed it. Maybe it will be help: When you connect to any server it generates ListenPort. With Cloudflare WARP ListenPort is random. When my ListenPort is 60060, 65008 and some others it doesn't make handshakes. But when I changed in my .conf file string ListenPort to 63399, it works and all handshakes complete. So, if you have problem like peer(bmXO…fgyo) - Retrying handshake because we stopped hearing back after 15 seconds, you should hardcode a port to listen (such as 63399)

crwnhdd commented 3 days ago

So, I've fixed it. Maybe it will be help: When you connect to any server it generates ListenPort. With Cloudflare WARP ListenPort is random. When my ListenPort is 60060, 65008 and some others it doesn't make handshakes. But when I changed in my .conf file string ListenPort to 63399, it works and all handshakes complete. So, if you have problem like peer(bmXO…fgyo) - Retrying handshake because we stopped hearing back after 15 seconds, you should hardcode a port to listen (such as 63399)

Hello. I'm having the same trouble as you, but sadly I'm not really into any of that. Could you please tell how to change the ListenPort? I didn't find it in the WARP.conf file and when editing the warp in AWG

kda2495 commented 3 days ago

So, I've fixed it. Maybe it will be help: When you connect to any server it generates ListenPort. With Cloudflare WARP ListenPort is random. When my ListenPort is 60060, 65008 and some others it doesn't make handshakes. But when I changed in my .conf file string ListenPort to 63399, it works and all handshakes complete. So, if you have problem like peer(bmXO…fgyo) - Retrying handshake because we stopped hearing back after 15 seconds, you should hardcode a port to listen (such as 63399)

Hello. I'm having the same trouble as you, but sadly I'm not really into any of that. Could you please tell how to change the ListenPort? I didn't find it in the WARP.conf file and when editing the warp in AWG

In your .conf-file in the [Interface] group just add string ListenPort = 51820 (or any other random value from 50000 to 65000)

Tasmanskiu commented 3 days ago

So, I've fixed it. Maybe it will be help: When you connect to any server it generates ListenPort. With Cloudflare WARP ListenPort is random. When my ListenPort is 60060, 65008 and some others it doesn't make handshakes. But when I changed in my .conf file string ListenPort to 63399, it works and all handshakes complete. So, if you have problem like peer(bmXO…fgyo) - Retrying handshake because we stopped hearing back after 15 seconds, you should hardcode a port to listen (such as 63399)

Hello. I'm having the same trouble as you, but sadly I'm not really into any of that. Could you please tell how to change the ListenPort? I didn't find it in the WARP.conf file and when editing the warp in AWG

In your .conf-file in the [Interface] group just add string ListenPort = 51820 (or any other random value from 50000 to 65000)

I followed your instructions to the letter. I've tried all the suggestions you made, but I'm still having trouble. I'd really appreciate your help with this. I've attached the screenshots below in case they're helpful.

I've tried different values, from 50000 to 65000, but when I turn it on, the internet doesn't work at all.

Once I installed the program and ran the config, everything worked great. However, after a few days, this error popped up, and it's been an ongoing issue ever since.

Amnezia 1 Amnezia 2