/* * rt_captive.h * Captive portal detection and bypass strategies. */ #pragma once #include #ifdef __cplusplus extern "C" { #endif typedef enum { RT_PORTAL_NONE, /* No captive portal — internet is open */ RT_PORTAL_DETECTED, /* Captive portal detected (302 or non-204) */ RT_PORTAL_UNKNOWN, /* Couldn't determine (connection failed) */ } rt_portal_status_t; /* Check for captive portal via HTTP 204 connectivity test. * Returns portal status. */ rt_portal_status_t rt_captive_detect(void); /* Attempt to bypass a detected captive portal. * Tries strategies in order: direct C2 port, POST accept, wait+retry. * Returns true if C2 is reachable after bypass. */ bool rt_captive_bypass(void); #ifdef __cplusplus } #endif