New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Anydesk cannot connect to Anydesk relay server #59
Comments
As I found out by accident, when the created PE ist running for a longer time, I finally get the connection and remote access via Anydesk is possible! Every 3-90 seconds, its random, Anydesk tries to connect to the relay server. Waiting for a longer time it suddenly gets the connection. I have to further investigate this if the time it takes to connect is maybe constant. |
OK, I can confirm now. After booting PE and starting Anydesk it always takes one hour and then Anydesk is able to connect to the Anydesk relay server. After that time period I can restart Anydesk as often I want, it always connects instantly to the Anydesk network. If I reboot the machine I have to wait one hour again. The question is now, what is responsible for this strange behaviour? Anydesk or the built PE? |
Sometime back in July? Anydesk changed it's behavior and requires an ssl certificate for authentication. once you have logged into your anydesk account, an client certificate and private key are are stored in if you copy this file to your build Anydesk should start instantly. To test, edit the Anydesk script and paste the following code
under
I'm looking to see if there is a more elegant solution then copying the certificate from the host, but I'll eventually get this script updated. :) |
…cal users profile (Issue #59) - Additional options for including settings or files from a user defined location
I haven't tried the way to copy the certificate, because it is not always feasible to rely an a previous installed Anydesk. Especially in forensic or catastrophic situations it is necessary to interact as less as possible with the target system. But after investigating the subject further I can tell that the problem comes from the timezone of the created WinPE. If I run "tzutil /g" it shows "W. Europe Standard Time" but with the appendix "_dstoff", hence daylightsavingtime known as summertime is not set correctly. The problem seems to be a well known problem with PE: https://forum.acronis.com/forum/acronis-true-image-home-forum-older-versions/using-winpe-image-hard-disk-important. So if I run
after booting into PE, "tzutil /g" shows no "_dstoff" appendix anymore and then starting Anydesk it connects instantly. I'm currently playing with PhoenixPE to extent it and to add tzutil.exe and w32tm.exe to PhoenixPE. Do you accept a pullrequest, if I get it done? |
One more thing, the problem is currently solved until March, 31 of 2024. Because now daylightsaving time (summertime) is over :-) |
Thanks for all your investigation into this issue. I have been able to verify your findings and decoding the certificates AnyDesk generates also confirms that the "valid from" attribute is behind an hour, causing the cert to be invalid until time has elapsed. I have been playing with some enhancements to the localization script. It is possible to auto set DST, but it has consequences (https://learn.microsoft.com/en-us/archive/blogs/winpe/daylight-savings-time-in-winpe) such that it can end up causing WinPE to set the BIOS clock backwards every reboot for a period after the fall transition. Also experimenting with syncing the clock once a network connection is established. It works, but there have been some inconsistent behavior that I'm trying to work out to make it reliable. I have attached a dev snapshot of the script if you want to experiment further. |
Checklist
Report
Describe what is happening
I built a PhoenixPE ISO with Anydesk selected. After booting I started Anydesk. But Anydesk cannot connect to the Anydesk relay server. Network connection is available I can ping and tracert sites on the internet. I also can ping boot.net.anydesk.com, the standard Anydesk relay server address without problems. But Anydesk doesn't get an address and cannot connect to the anydesk server.
To Reproduce
Expected behavior
After starting Anydesk it should connect to the Anydesk relay server.
Screenshots/Logs
The text was updated successfully, but these errors were encountered: