Compare commits
4 commits
Author | SHA1 | Date | |
---|---|---|---|
|
dd1ce2cb88 | ||
|
748f49c3b6 | ||
|
4640c64412 | ||
|
5b17b397c5 |
2
.github/workflows/docker-publish.yml
vendored
2
.github/workflows/docker-publish.yml
vendored
|
@ -7,7 +7,7 @@ name: Docker
|
||||||
|
|
||||||
on:
|
on:
|
||||||
schedule:
|
schedule:
|
||||||
- cron: '00 11 * * Mon'
|
- cron: '30 20 * * Sun'
|
||||||
push:
|
push:
|
||||||
branches: ["*"]
|
branches: ["*"]
|
||||||
# Publish semver tags as releases.
|
# Publish semver tags as releases.
|
||||||
|
|
|
@ -30,11 +30,6 @@ function getLocalOrPrivateIpInfo($ip)
|
||||||
return 'link-local IPv6 access';
|
return 'link-local IPv6 access';
|
||||||
}
|
}
|
||||||
|
|
||||||
// fc00::/7 Unique Local IPv6 Unicast Addresses
|
|
||||||
if (preg_match('/^(fc|fd)([0-9a-f]{0,4}:){1,7}[0-9a-f]{1,4}$/i', $ip) === 1) {
|
|
||||||
return 'ULA IPv6 access';
|
|
||||||
}
|
|
||||||
|
|
||||||
// anything within the 127/8 range is localhost ipv4, the ip must start with 127.0
|
// anything within the 127/8 range is localhost ipv4, the ip must start with 127.0
|
||||||
if (strpos($ip, '127.') === 0) {
|
if (strpos($ip, '127.') === 0) {
|
||||||
return 'localhost IPv4 access';
|
return 'localhost IPv4 access';
|
||||||
|
|
|
@ -1,5 +1,8 @@
|
||||||
<?php
|
<?php
|
||||||
|
|
||||||
|
error_reporting(0);
|
||||||
|
header('Content-Type: application/json; charset=utf-8');
|
||||||
|
|
||||||
require_once 'telemetry_db.php';
|
require_once 'telemetry_db.php';
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
@ -53,7 +56,7 @@ function formatSpeedtestData($speedtest)
|
||||||
$speedtest = getSpeedtestUserById($_GET['id']);
|
$speedtest = getSpeedtestUserById($_GET['id']);
|
||||||
if (!is_array($speedtest)) {
|
if (!is_array($speedtest)) {
|
||||||
echo '{}';
|
echo '{}';
|
||||||
}
|
} else {
|
||||||
$speedtest = formatSpeedtestData($speedtest);
|
$speedtest = formatSpeedtestData($speedtest);
|
||||||
|
|
||||||
echo json_encode(array('timestamp'=>$speedtest['timestamp'],'download'=>$speedtest['dl'],'upload'=>$speedtest['ul'],'ping'=>$speedtest['ping'],'jitter'=>$speedtest['jitter'],'ispinfo'=>$speedtest['ispinfo']));
|
echo json_encode(array('timestamp'=>$speedtest['timestamp'],'download'=>$speedtest['dl'],'upload'=>$speedtest['ul'],'ping'=>$speedtest['ping'],'jitter'=>$speedtest['jitter'],'ispinfo'=>$speedtest['ispinfo']));
|
||||||
|
}
|
||||||
|
|
|
@ -49,7 +49,7 @@ function Speedtest() {
|
||||||
this._settings = {}; //settings for the speed test worker
|
this._settings = {}; //settings for the speed test worker
|
||||||
this._state = 0; //0=adding settings, 1=adding servers, 2=server selection done, 3=test running, 4=done
|
this._state = 0; //0=adding settings, 1=adding servers, 2=server selection done, 3=test running, 4=done
|
||||||
console.log(
|
console.log(
|
||||||
"LibreSpeed by Federico Dossena v5.3.0 - https://github.com/librespeed/speedtest"
|
"LibreSpeed by Federico Dossena v5.3.1 - https://github.com/librespeed/speedtest"
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue