Hi,
I'm trying to detect a captive session from NEFilterDataProvider to make sure the portal traffic is allowed accordingly.
Initial idea was to look at audit tokens to allow any traffic from Captive Portal Assistant.
But most of the traffic is managed from WebKit Networking (I assume CPA uses a WebView). Allowing any WebKit traffic is a major issue for my firewall use-case.
An alternative could be possible using NEHotspotHelper but this API is not supported on Mac.
Portal DHCP advertisement could also help but sandboxed NEFilterDataProvider doesn't have access to DCHP context. https://developer.apple.com/news/?id=q78sq5rv
I've seen many threads related to those topics for iOS but none for Macs.
Does anybody know a Mac API that could be of any help ?
Waiting for NEHotspotHelper on Mac, I've been able to implement a (somehow) working solution relying on NSRunningApplication.runningApplications.
When looking at CNMarkPortalOnline documentation:
Captive Network Support will notify the rest of the system that WiFi is now a viable interface.
How does this notification occurs ? Is there an event or notification such as 'Captive Portal is now Online' ?