Android Captive Portal Server

By default, Android is using Google’s server for captive portal checking.

Afwall custom script

# captive portal
su
settings put global captive_portal_detection_enabled 1
settings put global captive_portal_mode 1
settings put global captive_portal_use_https 1
settings put global captive_portal_server captivecheck.theel0ja.info
settings put global captive_portal_http_url http://captivecheck.theel0ja.info
settings put global captive_portal_https_url https://captivecheck.theel0ja.info

Replace captivecheck.theel0ja.info with your own server, if you want.

The server should return 204 on the root.

Example with PHP:

<?php
http_response_code(204);