Closing the Protocol Gap
This is the third article in our The Protocol Gap series. In the first two articles, we highlighted the difficulties that arise when guest devices communicate with captive portals, and the proposed solution to this problem through the definition of a new interface in the capport-architecture RFC. Strictly speaking, the IETF does not define a new protocol with this RFC, but rather a new interface built on top of well-known protocols such as DHCP, IPv6 RA, and HTTPS.
Differences from the Previously Shown Version
In the previous article of this series, we already described the process and the API, but since then (January 2019) some changes have occurred in a few areas:
- ICMP was replaced by the more general term “Captive Portal Signal“, though this is not further specified in this version. This more precise definition has been postponed, as further discussions will likely be needed. So far, no consensus has been reached on its usefulness. We think this is fine for now, since the provisioning and API parts are covered and easy to implement.
- DHCPv4 option 160 had to be replaced, as a test revealed its illegal use by a vendor. Apple provided its registered, but previously unused, option 114 for this purpose.
- In addition, the API has some renamed and new JSON fields (see below).
How it works
Here is a schematic representation of the current process when a device connects to the captive portal:

1. The end user’s device receives basic network settings such as IP, subnet mask, gateway, DNS server, etc. via DHCP. A variant using PvD (Provisioning Domains) is also under discussion. The device receives the URL of the CAPPORT API server via a new DHCP option (DHCP6 and RA for IPv6), as defined in RFC 8910.
2. The device queries the CAPPORT API server for the current restrictions and receives a URL for a human-readable web page. This page may consist of a login form, a payment prompt, or various other information.
3. The device opens a (captive) browser and displays the login page to the user.
4. Once the end user fulfills all the requirements of the captive portal, the device is brought online and can access the internet.
5. The device can now send data. If the device is not permitted to access the internet, the captive portal can optionally send a “signal“. The current document does not specify exactly what this signal is meant to represent. As a result, it is not currently implemented anywhere.
The Capport API
The Capport API, defined in RFC 8908, allows the client to interact with a captive portal via a generic HTTP API using JSON as the data format. It is required that HTTPS must be used (HTTP over TLS – at least version 1.2). While the client device has already detected that it is behind a captive portal, it now wants to retrieve the current status and some details about the captivity (restrictions). One important thing the API must provide is a URL to a web page that displays a login page or other information to the user.
An example request and response could look like this:
GET / capport_api HTTP/1.1
Host: hotspot.internet-for-guests.com
Accept: application/captive+json
The server then responds with the JSON content for this client:
HTTP/1.1 200 OK
Cache-Control: private
Date: Mon, 06 Jul 2020 10:07:35 GMT
Content-Type: application/captive+json
{
“captive”: false,
“user-portal-url”:”https://hotspot.internet-for-guests.com”,
“seconds-remaining”: 10000,
“bytes-remaining”: 100000000,
}
Of course, this only makes sense if Google and Apple register it and (hopefully) use it in the same way.
3, 2, 1, go!
After the long wait, we were nonetheless surprised that Apple and Google announced support for the new Capport architecture in their latest versions, even before the end of 2020.
- Apple has already added support for iOS and macOS 14
- Google provides support with Android 11/R, which was recently released (September 2020).
- After updating to the latest version, your IACBOX is also ready for the new API. With current Software Maintenance, you stay secure and up to date.
Outlook
So, is that all done now? Not quite – there are still a number of open tasks to solve, and that could very well take years. The old HTTP-based connectivity checks will remain in place, since not all captive portals support this API. We will certainly be running both approaches in parallel for years to come.
In addition, the first implementations of the API do not yet include certain information, such as the venue URL or the remaining seconds and bytes, which would be a real advantage. The Capport RFC is currently in its final stage, and publication should be complete once it receives an official number.
We will keep the IACBOX up to date and support newly added API fields as soon as they are published. Stay tuned, we’ll keep you posted!