This commit is contained in:
Beat Jäckle 2021-07-19 22:09:55 +02:00
commit 51b19bc743
4 changed files with 22 additions and 0 deletions

1
public/canonical.html Normal file
View file

@ -0,0 +1 @@
<meta http-equiv="refresh" content="0;url=https://support.mozilla.org/kb/captive-portal"/>

18
public/index.php Normal file
View file

@ -0,0 +1,18 @@
<?php
if ($_SERVER['REDIRECT_URL']=='/ip'){
print($_SERVER['REMOTE_ADDR']);
die("\n");
}
$ua = $_SERVER['HTTP_USER_AGENT'];
if ($_SERVER['REDIRECT_URL']=='/ua'){
print($ua);
die("\n");
}
$slash = strrchr($ua,'/');
$ffversion = intval(substr($slash,1));
if ($ffversion >= 89){
die('<meta http-equiv="refresh" content="0;url=https://support.mozilla.org/kb/captive-portal"/>');
} else {
die('success');
}
// Source: https://www.encrypted.at/firefox-captive-portal-url/

2
public/ip.php Normal file
View file

@ -0,0 +1,2 @@
<?=$_SERVER['REMOTE_ADDR']?>

1
public/success.txt Normal file
View file

@ -0,0 +1 @@
success