David as a Service

Notes on tech and many other topics

Create a public WiFi connection automation for your mobile

Plenty of public WiFi networks are using a visitor captive portal that requires you to sign in before you get free internet access. Unfortunately I find that the pages often don’t automatically present themselves, therefore in order to easily get those pages I created an automaton. 

On iOS I used Shortcuts to create a very simple Home Screen icon that opens a web page. The page it opens is the page that Apple try and use in the background for this very purpose: http://captive.apple.com/.

The Shortcut is super simple:

Screenshot showing the settings of the Shortcut's automation. The automation opens a browser tab to http://captive.apple.com.

Add this to the Home Screen and this will see you flying through captive portals (when they don’t show themselves). 

Why does this happen

Why not just browse to Google or another known site?

Most websites make use of secure connections over HTTPS, and to ensure this security will always direct your browsing to the secure protocol. The captive portal will try to intercept the request to a secured website, however it will fail because it’s performing behaviour that HTTPS is designed to prevent (MITM attacks). The captive.apple.com address above is served over insecure HTTP with no automatic redirect to HTTPS, thus meaning the captive portal can step in and offer up the login page.