Winget-AutoUpdate icon indicating copy to clipboard operation
Winget-AutoUpdate copied to clipboard

Network check from China

Open mtengmo opened this issue 2 years ago • 2 comments

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.

mtengmo avatar Sep 05 '22 11:09 mtengmo

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 :/

Romanitho avatar Sep 06 '22 14:09 Romanitho

This issue is stale because it has been open for 30 days with no activity.

github-actions[bot] avatar Oct 07 '22 03:10 github-actions[bot]

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.

Knud3 avatar Oct 21 '22 05:10 Knud3

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.

Romanitho avatar Oct 21 '22 09:10 Romanitho

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.

Knud3 avatar Oct 21 '22 09:10 Knud3

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 😅

Romanitho avatar Oct 21 '22 09:10 Romanitho

https://github.com/Romanitho/Winget-AutoUpdate/pull/198

Romanitho avatar Oct 21 '22 11:10 Romanitho