* Stop forcing the IE11 upload workaround on Safari via user agent sniffing
The upload test reported low and unstable numbers on Safari (macOS and
iOS) while the download test was correct.
Cause: the "start" handler in speedtest_worker.js matched every Safari
user agent and set settings.forceIE11Workaround = true. In ulTest() that
flag selects a fundamentally different, less accurate measurement path:
instead of sending one xhr_ul_blob_megabytes blob (20 MB by default) and
accumulating event.loaded from upload.onprogress, it sends a stream of
256 KB requests and adds a fixed 256 KB to totLoaded on each onload.
Progress is therefore quantised to whole requests and each request pays
a full round trip before the next one starts, so on fast or high-latency
links the measured speed is both too low and noisy.
The workaround is not needed. Its comment claims it is only required for
MPOT, but the block never checked settings.mpot. The same block also
excludes crios and fxios, which on iOS run the very same WebKit
networking stack as Safari, so the user agent test cannot have been
guarding an engine-level bug in the first place. Current WebKit
implements xhr.upload.onprogress, and the existing feature detection in
ulTest() (the try/catch that probes xhr.upload.onprogress) already
selects the workaround for browsers that genuinely lack it, without
sniffing.
Changes:
- Remove the Safari user agent block. Safari now takes the regular
upload path, the same one Chrome and Firefox on iOS already took.
- Guard the Edge and PlayStation 4 blocks with
typeof s.forceIE11Workaround === "undefined", matching how the other
quirks avoid clobbering explicitly passed settings. Previously an
explicit forceIE11Workaround: false in the start command was silently
overwritten, so the workaround was not switchable from outside the
worker. Default behaviour for those browsers is unchanged.
- Add tests/e2e/worker-browser-quirks.spec.js, which loads the worker
under spoofed user agents and asserts the resolved settings.
- Update doc.md so Safari is no longer listed as affected.
The Edge and PlayStation 4 blocks are deliberately left outside the
enable_quirks condition: those browsers have no working
upload.onprogress, so running them with enable_quirks: false would
report 0 or Fail rather than a less precise number.
Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01S1bUKsok59shM69PwLMMRM
* docs: describe both detection paths for the IE11 upload workaround
The previous wording claimed affected browsers are detected by checking
whether xhr.upload is usable "not by sniffing the user agent", but Edge
and the PlayStation 4 browser are still matched by user agent regex.
Both mechanisms exist and for different reasons: feature detection only
sees a missing xhr.upload object, while those two expose the object and
simply never fire its events.
Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01S1bUKsok59shM69PwLMMRM
---------
Co-authored-by: Claude <noreply@anthropic.com>
index-modern.html refers to styling/, javascript/ and images/ as if they sat
next to it, but they live under frontend/. Only docker/entrypoint.sh reconciles
that, by flattening those directories into the web root, so serving the
repository as it stands renders the page without stylesheet, script or logo.
Point the HTML at frontend/, have the entrypoint copy that directory as-is, and
move settings.json and server-list.json to the root that the page fetches them
from, so the repository layout and the deployed layout are the same. Update the
install instructions, which described the flattening.
- speedtest_worker.js: moved HTTP status check from xhr.upload.onload
(body sent, response may not be available) to xhr.onload
(full HTTP transaction complete, xhr.status is reliable).
- doc.md: added full IIS web.config example with maxAllowedContentLength.
- speedtest_worker.js: xhr.upload.onload now checks xhr.status
before restarting the upload stream. Non-2xx responses (e.g.
HTTP 413 from undersized client_max_body_size) are treated as
failures instead of inflating upload speed measurements.
- doc.md: added explicit nginx/Apache/IIS configuration examples
for client_max_body_size / LimitRequestBody to prevent HTTP 413
errors on the 20MB upload test blobs.
* Initial implementation of ipinfo.io offline database
* Removed unnecessary code
* add: download ipinfo db during docker build
* fixed workflow
* rename warning in workflow
* commit to trigger workflow
* Refactor getIP
* Improved UI
* Updated docker version with 5.4 changes
* Updated README.md
* Added fallback in getIP in case the offline db is missing
* Fixed typos
* just md linting
* Removed vscode stuff
* Implemented fallback in getIP for PHP<8 (returns only the IP)
* Updated doc.md
* Fixed comments in telemetry_settings.php
* New quick start video
* Corrected image name in doc_docker.md
* Replaced speedtest with just test in stats.php
* docker documentation update
* typo
---------
Co-authored-by: Federico Dossena <info@fdossena.com>
Co-authored-by: Stefan Stidl <stefan.stidl@ffg.at>
* put code to insert and query data from database into separate file
* simplify obfuscation salt file handling
* use new DB interaction functions in telemetry.php
* use new DB interaction functions in stats.php
and fix indentation levels
* format telemetry settings file
* use new function for interacting with DB in index.php
* move drawing of the image into function and try to comment each section with what it does
* reorder lines for parts of the image to align with the order they appear on the image
* bugfix: display obfuscated and deobfuscated id in stats if id obfuscation is enabled
* improve error handling
* add missing PHPDocs to functions
* imageftbbox returns an array on success and false on failure so to check if the font is usable, check if we got an array
* fix dsn for postgres
* fix limit sql statement for postgresql
* remove obsolete require statement
* use require instead of require_once since the settings file might need to be loaded multiple times
because it just contains plain variables which will just get loaded into the current scope
* move require statements to the top of the file
* make sure files are readable before requiring them
* add constant to refer to the telemetry settings file and check if it is readable before loading it
* return null if no speedtest result was found for the given id and show according message to the user instead of just exiting
* use existing constant instead of string for telemetry settings file name
* uniformly use single quotes instead of double quotes as most code places already used single quotes
* somehow some tabs sneaked in, replace them to uniformly use spaces
* mysql now uses pdo, too, reflect that in the requirements documentation
* pass username and password as constructor parameters instead of via DSN