Winget-AutoUpdate
Winget-AutoUpdate copied to clipboard
Network check from China
I see some issues with the network check from China. My feeling is that the ipv4 8.8.8.8 doesn´t work in China. $TestNetwork = Test-NetConnection google.com -Port 443 -InformationLevel Quiet
I will see if this will help.
In fact, sometimes behind a captive portal (on Gust WiFi for instance) google.com responds (but with the captive portal IP). There is probably a better way to check connectivity even behind a captive portal, but I don't have a better way to do it currently :/
This issue is stale because it has been open for 30 days with no activity.
Also some companies blocks known public DNS server IP's to ensure that all DNS requests goes through their own DNS server. In that case 8.8.8.8 is not usable to check internet connection.
I see. As a workaround, before installing WAU, you could change this settings in the script and block WAU Slef Update.
I don't really know how to optimize this part, because pinging ghitub.com for instance could success behind a captive portal. And you might not be connected in fact.
Just dummy idea, but what about if you add simple text file to this repo and connection test would try to read that file and if output is right connection is working.
brilliant ! Initially I wanted to use Github API, but do to limitations I wanted to have something else. But your idea is simple and efficient. Thanks 😅
https://github.com/Romanitho/Winget-AutoUpdate/pull/198