Internet Reachability Verifier
Application.internetReachability is not enough! Verify actual internet connectivity and detect captive portals reliably.
Why do you need this?
Unity's built-in Application.internetReachability only checks if a network interface is active, not if the device actually has access to the internet. Captive portals (e.g. airport/hotel wifi login screens) will trick Unity into thinking it is online, leading to broken networking calls.
16 Captive Portal Methods
Supports Google204, Google204HTTPS, MicrosoftNCSI, Apple, Apple2, AppleHTTPS, Ubuntu, Custom, and more. Automatically selects the native method for the target platform.
Status Verification
Differentiate between being offline, pending verification, experiencing an error, portal mismatch, or being fully verified on the network (NetVerified).
Cross-Platform
Works with Desktop, Mobile, and WebGL platforms. 100% C# source code included. Maintained for Unity versions from recent ones down to Unity 2017.
Inspector & Usage Screenshots
Easy setup using a component in your hierarchy with custom callbacks and event listener delegates.
Get Support
How to get help
- Community Support: Post to the Unity Discussions Thread for generic issues and community discussion
- Bug Reports: Send email for bugs or test cases. Contact by email:
contact@strobotnik.com
Support is provided through bug reports and feature requests, which may be addressed in future releases.
Version History
NOTE: We strive to release updates only when they matter, not for sake of updating. // 2024-11-24, version 1.4.3 - New methods: ConnectivityCheckGStatic and ConnectivityCheckGStaticHTTPS. Used as default on some platforms where Google204 was the default earlier. // 2024-08-12, version 1.4.2 - Minor documentation update. Verified support for Unity 6. // 2024-03-17, version 1.4.1 - Added new detection method: GoogleBlankHTTPS - Optimized away some legacy code on newer Unity versions. - Verified support for Unity 6. // 2023-12-22, version 1.4.0 - HTTPS methods are now default on most platforms. - Added documentation about how to use HTTP methods. // 2023-12-19, version 1.3.2 - Fix editor testing // 2023-12-17, version 1.3.1 - Fix building for Android // 2023-10-27, version 1.3.0 - Fixes for Unity 2023.1+ compatibility. - Cleanup - removed legacy code for Unity 3.x-5.x and Webplayer, Flash, NaCl platforms. // 2020-09-23, version 1.2.3 - Fixes for Unity 2020.2+ compatibility. - This is the last version to support legacy Unity versions from 3.5.7 to 5.6.6. (Likely support for Unity 5.6.7 will continue.) // 2019-11-16, version 1.2.2 Fixes for Unity 2019.3+ compatibility: - Verified support for Enter Play Mode without Domain/Scene Reload - Removed GUILayer components // 2019-02-18, version 1.2.1 - Lowered Android minimum sdk version requirement. // 2019-02-08, version 1.2.0 - WebGL and Facebook platform support. - Support for Android 9 security config, where cleartext http traffic is disabled by default (similar to iOS ATS). - Compatibility verified up to Unity 2018.3. - New detection methods: Google204HTTPS, UbuntuHTTPS, MicrosoftConnectTest, MicrosoftNCSI_IPV6, MicrosoftConnectTest_IPV6 (the IPV6 ones can verify if the network is IPV6-capable!). - UnityWebRequest is now used with Unity 2018.3+ // 2018-03-06, version 1.1.3 - Fixed deprecation warning with latest Unity versions. Made responseHeaders related code bit more robust. // 2017-04-12, version 1.1.2 - Hotfix for Apple methods. // 2017-04-06, version 1.1.1 - Added tooltips and custom editor which can give some in-editor warnings of unsuitable configuration. // 2016-08-27, version 1.1.0 - Changed internal coroutine to wait using realtime instead of pauseable normal time. Also the getTimeWithoutInternetConnection is now realtime-based. Added forceReverification method which sets status to pending verification, which is also now internally noticed immediately. Exposed the time value settings to inspector. Added AppleHTTPS method (due to ATS) and waitForNetVerifiedStatus convenience helper coroutine. Fixed regression bug of running verification twice. // 2015-05-21, version 1.0.4 - Fixed Unity 5 Asset Store warning. // 2015-03-26, version 1.0.3 - Support for Unity 5. Made DontDestroyOnLoad optional. Also start/stop netActivity in OnEnable/OnDisable. // 2014-09-15, version 1.0.2 - Refined customMethodExpectedData check to support expected empty result. Added option to append use a "cache buster" query string when using custom method. Added getTimeWithoutInternetConnection(). // 2014-07-22, version 1.0.1 - Added Apple2 method (now default for Apple platforms). Added explanation to documentation why custom method is recommended. // 2014-06-18, version 1.0.0 - Initial version.
