From 2075dca954a2c16afa2614ac3a92e427dbe99301 Mon Sep 17 00:00:00 2001 From: Gilles Soulier Date: Wed, 1 Jan 2025 12:31:52 +0100 Subject: [PATCH] ajout de librespeed --- librespeed/README.md | 19 + librespeed/config/.migrations | 2 + librespeed/config/keys/cert.crt | 22 + librespeed/config/keys/cert.key | 28 + librespeed/config/nginx/dhparams.pem | 13 + librespeed/config/nginx/nginx.conf | 81 +++ librespeed/config/nginx/nginx.conf.sample | 84 +++ librespeed/config/nginx/resolver.conf | 3 + .../config/nginx/site-confs/default.conf | 40 ++ .../nginx/site-confs/default.conf.sample | 44 ++ librespeed/config/nginx/ssl.conf | 39 ++ librespeed/config/nginx/ssl.conf.sample | 39 ++ librespeed/config/nginx/worker_processes.conf | 3 + librespeed/config/php/php-local.ini | 2 + librespeed/config/php/www2.conf | 5 + librespeed/config/speedtest_telemetry.sql | Bin 0 -> 28672 bytes .../www/example-multipleServers-full.html | 490 ++++++++++++++++++ .../www/example-multipleServers-pretty.html | 245 +++++++++ .../www/example-singleServer-basic.html | 38 ++ .../www/example-singleServer-chart.html | 256 +++++++++ .../example-singleServer-customSettings.html | 174 +++++++ .../config/www/example-singleServer-full.html | 365 +++++++++++++ .../www/example-singleServer-gauges.html | 262 ++++++++++ .../www/example-singleServer-pretty.html | 192 +++++++ .../www/example-singleServer-progressBar.html | 212 ++++++++ librespeed/config/www/index.html | 352 +++++++++++++ librespeed/docker-compose.yaml | 24 + 27 files changed, 3034 insertions(+) create mode 100644 librespeed/README.md create mode 100755 librespeed/config/.migrations create mode 100755 librespeed/config/keys/cert.crt create mode 100755 librespeed/config/keys/cert.key create mode 100755 librespeed/config/nginx/dhparams.pem create mode 100755 librespeed/config/nginx/nginx.conf create mode 100755 librespeed/config/nginx/nginx.conf.sample create mode 100755 librespeed/config/nginx/resolver.conf create mode 100755 librespeed/config/nginx/site-confs/default.conf create mode 100755 librespeed/config/nginx/site-confs/default.conf.sample create mode 100755 librespeed/config/nginx/ssl.conf create mode 100755 librespeed/config/nginx/ssl.conf.sample create mode 100755 librespeed/config/nginx/worker_processes.conf create mode 100755 librespeed/config/php/php-local.ini create mode 100755 librespeed/config/php/www2.conf create mode 100755 librespeed/config/speedtest_telemetry.sql create mode 100755 librespeed/config/www/example-multipleServers-full.html create mode 100755 librespeed/config/www/example-multipleServers-pretty.html create mode 100755 librespeed/config/www/example-singleServer-basic.html create mode 100755 librespeed/config/www/example-singleServer-chart.html create mode 100755 librespeed/config/www/example-singleServer-customSettings.html create mode 100755 librespeed/config/www/example-singleServer-full.html create mode 100755 librespeed/config/www/example-singleServer-gauges.html create mode 100755 librespeed/config/www/example-singleServer-pretty.html create mode 100755 librespeed/config/www/example-singleServer-progressBar.html create mode 100755 librespeed/config/www/index.html create mode 100755 librespeed/docker-compose.yaml diff --git a/librespeed/README.md b/librespeed/README.md new file mode 100644 index 0000000..57fb128 --- /dev/null +++ b/librespeed/README.md @@ -0,0 +1,19 @@ +# LibreSpeed + +## Description + +LibreSpeed est une application auto-hébergée permettant de tester les performances de votre connexion Internet (débit descendant, montant et latence) sans nécessiter de services tiers. + +## Prérequis + +- Docker et Docker Compose installés sur votre machine. +- Port **8080** disponible sur votre serveur. + +## Déploiement + +1. Assurez-vous que Docker est installé et fonctionnel. +2. Configurez le fichier `.env` pour ajouter un mot de passe (optionnel). +3. Lancez la commande suivante pour déployer LibreSpeed : + ```bash + docker-compose up -d + ``` \ No newline at end of file diff --git a/librespeed/config/.migrations b/librespeed/config/.migrations new file mode 100755 index 0000000..588a613 --- /dev/null +++ b/librespeed/config/.migrations @@ -0,0 +1,2 @@ +01-nginx-site-confs-default +02-default-location diff --git a/librespeed/config/keys/cert.crt b/librespeed/config/keys/cert.crt new file mode 100755 index 0000000..e2bed7d --- /dev/null +++ b/librespeed/config/keys/cert.crt @@ -0,0 +1,22 @@ +-----BEGIN CERTIFICATE----- +MIIDsTCCApmgAwIBAgIUKz9whLnhfGOpy9LYa0IgPY5Xb4wwDQYJKoZIhvcNAQEL +BQAw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Q2VSLgArkwPIkSEDR9fjfI+69l/+IQf/lrWQV +3SRfXy6wAYnr1lFiNYrfo/uDUUbW5DPcGNqKgF0i7lLES9EuXQZ9uAzPrGZFYV25 +ztvN+LoQ4dr4Un0+Ci8sVwQdG+xXtQ/krjfQOw0HnRGoIjFjXQ== +-----END CERTIFICATE----- diff --git a/librespeed/config/keys/cert.key b/librespeed/config/keys/cert.key new file mode 100755 index 0000000..f240bd8 --- /dev/null +++ b/librespeed/config/keys/cert.key @@ -0,0 +1,28 @@ +-----BEGIN PRIVATE KEY----- +MIIEvwIBADANBgkqhkiG9w0BAQEFAASCBKkwggSlAgEAAoIBAQCLmVQGl6CHY9D5 +QnFgCa7nESqpi+eSqdkZnHpLjvZuN+/2CPnuIc7cOIHtQc1swGB9FHJNQbRA3xlz +krUcT37nqksvm1ILItEEvxhVScW8h77IrxJ0HsIMhphSjSPGej8oVytdOu5UoGO8 +74+zQKGGiyacVg1zedcd4aUxum3OEKs2/WttWBdJjDhR+neqxDDBByFwfGjkgN91 +T6ZPNkz2xa3hWi7Tws1KQiroRgq72u96oWyoFjxQ0GgeWYwSCuqQ2U5f+wE5POit +JARdJPPCNoIsnH4cwoFLcmad9whY0W8nJLhICbzxgU786DTUCgubCjLm0t0OU6UP ++xQvMc8nAgMBAAECggEADi/4iqz5Sxk5YUO/6v9A78neWJnX4J9zaXduNGSkpeH4 +eLxDzlBQSjBSAA9adc19YOjljvV5AMjLuOO1lVl878VuW7nA1lHlBUL4kZ5sQrNX +D+U/Dl8b4JMDQwyGEMNWzN5DEXgORbqBOG/uXkzYvahBtczHFC/TTX2jwNCOHU2M +8yUQGtLpnc7YIr4N5/guSmtMMAUYy2IBPfwkqdfJZDzYapROvnION28LsfEebgou +aL8/zjv1Y78QS41d+XEObF8qrgUlZqqGmUVhBtXmGaKeXGTEdUOcONhZwV42FJN/ +50yPniA0j23q/B/fA5GhAvQkDwP76vwizBm4eP+fjQKBgQC/xJBkoSF3GpR8xxB7 ++i+YKwTBuAW2i3s78NSb8NE3HMMqkrTdC87MMBqqdf0WYorGe/anjKDxw10btRDY +dSfKsO2SRce9s47e9+ptYegAX21tdyE0cykB7FTXQukk4hO3x3HUXaqSXAjlLJKZ +wI+/Xd1Fp6JBTHo6XyzZCJwA7QKBgQC6W3XMqxTOAmc3kiHwiuQb9HEpCKYEmcFV +fmSbjz+VHFwUwA98OTEmJ4n85raioPjROt7KWraC99KUIKdeCx6DO71q/wOHox/Q +8kfbbUd8CsxPQ9eJ7O+h1Kr15LF44+UdEBS2RCAk4+Yhg9CTMvhdA04Oxp2r/1gW +6Ukz6ppR4wKBgQCCT5onJ29MNh2s5MCI3qu05Zan5NrM/t9RDggLp4sjvkHJDkQk +6T8vdYjJSMAgk/nlgptLo75CSxVcHKBD1uihTbVCbnSargdp8GG2zo8OocoEVq2T +rKWzDttgI7G2RIJNohPx0Wx1ZGEPCkjcfgOwcKJKEO2rHcL5I2+gU79eyQKBgQCq +0TrhJ9AiJUHHRkOl4SnGFgHDwxGqFeWJIBnIHT4Cx8P/oSyQiTvr5UIudqvh1fs8 +jeG5Sf0Rf2eeL3A6W6bUU+YENUxe/78iH3KOR1TG9n7gCSeAXZYpmG48hivGy94v +DZZum3N7XQqMne6Jfqb5WxYppRTRm3R7S8q1s81QUQKBgQCmJRS83Tpj7JYaYilQ +iDLQ1TMmbH7QIVuKjMPKlUpTVCJRRkkfpu7Yy/wJEZlOpbuv9IbYSAxtyTwz+Z7p +d1YI1BQ9EA5ws9CIu6e6knqx8OY20GhbC9nUNhlKsCAp3i1ysspApikrT8A7QBTE +iYE88pyEzI8hEudv6VrtKMsMSQ== +-----END PRIVATE KEY----- diff --git a/librespeed/config/nginx/dhparams.pem b/librespeed/config/nginx/dhparams.pem new file mode 100755 index 0000000..eed4c41 --- /dev/null +++ b/librespeed/config/nginx/dhparams.pem @@ -0,0 +1,13 @@ +-----BEGIN DH PARAMETERS----- +MIICCAKCAgEA//////////+t+FRYortKmq/cViAnPTzx2LnFg84tNpWp4TZBFGQz ++8yTnc4kmz75fS/jY2MMddj2gbICrsRhetPfHtXV/WVhJDP1H18GbtCFY2VVPe0a +87VXE15/V8k1mE8McODmi3fipona8+/och3xWKE2rec1MKzKT0g6eXq8CrGCsyT7 +YdEIqUuyyOP7uWrat2DX9GgdT0Kj3jlN9K5W7edjcrsZCwenyO4KbXCeAvzhzffi +7MA0BM0oNC9hkXL+nOmFg/+OTxIy7vKBg8P+OxtMb61zO7X8vC7CIAXFjvGDfRaD +ssbzSibBsu/6iGtCOGEfz9zeNVs7ZRkDW7w09N75nAI4YbRvydbmyQd62R0mkff3 +7lmMsPrBhtkcrv4TCYUTknC0EwyTvEN5RPT9RFLi103TZPLiHnH1S/9croKrnJ32 +nuhtK8UiNjoNq8Uhl5sN6todv5pC1cRITgq80Gv6U93vPBsg7j/VnXwl5B0rZp4e +8W5vUsMWTfT7eTDp5OWIV7asfV9C1p9tGHdjzx1VA0AEh/VbpX4xzHpxNciG77Qx +iu1qHgEtnmgyqQdgCpGBMMRtx3j5ca0AOAkpmaMzy4t6Gh25PXFAADwqTs6p+Y0K +zAqCkc3OyX3Pjsm1Wn+IpGtNtahR9EGC4caKAH5eZV9q//////////8CAQI= +-----END DH PARAMETERS----- \ No newline at end of file diff --git a/librespeed/config/nginx/nginx.conf b/librespeed/config/nginx/nginx.conf new file mode 100755 index 0000000..40bdfd3 --- /dev/null +++ b/librespeed/config/nginx/nginx.conf @@ -0,0 +1,81 @@ +## Version 2023/04/13 - Changelog: https://github.com/linuxserver/docker-baseimage-alpine-nginx/commits/master/root/defaults/nginx/nginx.conf.sample + +### Based on alpine defaults +# https://git.alpinelinux.org/aports/tree/main/nginx/nginx.conf?h=3.15-stable + +user abc; + +# Set number of worker processes automatically based on number of CPU cores. +include /config/nginx/worker_processes.conf; + +# Enables the use of JIT for regular expressions to speed-up their processing. +pcre_jit on; + +# Configures default error logger. +error_log /config/log/nginx/error.log; + +# Includes files with directives to load dynamic modules. +include /etc/nginx/modules/*.conf; + +# Include files with config snippets into the root context. +include /etc/nginx/conf.d/*.conf; + +events { + # The maximum number of simultaneous connections that can be opened by + # a worker process. + worker_connections 1024; +} + +http { + # Includes mapping of file name extensions to MIME types of responses + # and defines the default type. + include /etc/nginx/mime.types; + default_type application/octet-stream; + + # Name servers used to resolve names of upstream servers into addresses. + # It's also needed when using tcpsocket and udpsocket in Lua modules. + #resolver 1.1.1.1 1.0.0.1 2606:4700:4700::1111 2606:4700:4700::1001; + include /config/nginx/resolver.conf; + + # Don't tell nginx version to the clients. Default is 'on'. + server_tokens off; + + # Specifies the maximum accepted body size of a client request, as + # indicated by the request header Content-Length. If the stated content + # length is greater than this size, then the client receives the HTTP + # error code 413. Set to 0 to disable. Default is '1m'. + client_max_body_size 0; + + # Sendfile copies data between one FD and other from within the kernel, + # which is more efficient than read() + write(). Default is off. + sendfile on; + + # Causes nginx to attempt to send its HTTP response head in one packet, + # instead of using partial frames. Default is 'off'. + tcp_nopush on; + + # all ssl related config moved to ssl.conf + # included in server blocks where listen 443 is defined + + # Enable gzipping of responses. + #gzip on; + + # Set the Vary HTTP header as defined in the RFC 2616. Default is 'off'. + gzip_vary on; + + # Helper variable for proxying websockets. + map $http_upgrade $connection_upgrade { + default upgrade; + '' close; + } + + # Sets the path, format, and configuration for a buffered log write. + access_log /config/log/nginx/access.log; + + # Includes virtual hosts configs. + include /etc/nginx/http.d/*.conf; + include /config/nginx/site-confs/*.conf; +} + +daemon off; +pid /run/nginx.pid; diff --git a/librespeed/config/nginx/nginx.conf.sample b/librespeed/config/nginx/nginx.conf.sample new file mode 100755 index 0000000..e57699a --- /dev/null +++ b/librespeed/config/nginx/nginx.conf.sample @@ -0,0 +1,84 @@ +## Version 2024/05/27 - Changelog: https://github.com/linuxserver/docker-baseimage-alpine-nginx/commits/master/root/defaults/nginx/nginx.conf.sample + +### Based on alpine defaults +# https://git.alpinelinux.org/aports/tree/main/nginx/nginx.conf?h=3.20-stable + +user abc; + +# Set number of worker processes automatically based on number of CPU cores. +include /config/nginx/worker_processes.conf; + +# Enables the use of JIT for regular expressions to speed-up their processing. +pcre_jit on; + +# Configures default error logger. +error_log /config/log/nginx/error.log; + +# Includes files with directives to load dynamic modules. +include /etc/nginx/modules/*.conf; + +# Include files with config snippets into the root context. +include /etc/nginx/conf.d/*.conf; + +events { + # The maximum number of simultaneous connections that can be opened by + # a worker process. + worker_connections 1024; +} + +http { + # Includes mapping of file name extensions to MIME types of responses + # and defines the default type. + include /etc/nginx/mime.types; + default_type application/octet-stream; + + # Name servers used to resolve names of upstream servers into addresses. + # It's also needed when using tcpsocket and udpsocket in Lua modules. + #resolver 1.1.1.1 1.0.0.1 2606:4700:4700::1111 2606:4700:4700::1001; + include /config/nginx/resolver.conf; + + # Don't tell nginx version to the clients. Default is 'on'. + server_tokens off; + + # Specifies the maximum accepted body size of a client request, as + # indicated by the request header Content-Length. If the stated content + # length is greater than this size, then the client receives the HTTP + # error code 413. Set to 0 to disable. Default is '1m'. + client_max_body_size 0; + + # Sendfile copies data between one FD and other from within the kernel, + # which is more efficient than read() + write(). Default is off. + sendfile on; + + # Causes nginx to attempt to send its HTTP response head in one packet, + # instead of using partial frames. Default is 'off'. + tcp_nopush on; + + # all ssl related config moved to ssl.conf + # included in server blocks where listen 443 is defined + + # Enable gzipping of responses. + #gzip on; + + # Set the Vary HTTP header as defined in the RFC 2616. Default is 'off'. + gzip_vary on; + + # Helper variable for proxying websockets. + map $http_upgrade $connection_upgrade { + default upgrade; + '' close; + } + + # Enable http2 by default for all servers + http2 on; + + # Sets the path, format, and configuration for a buffered log write. + access_log /config/log/nginx/access.log; + + # Includes virtual hosts configs. + include /etc/nginx/http.d/*.conf; + include /config/nginx/site-confs/*.conf; +} + +daemon off; +pid /run/nginx.pid; diff --git a/librespeed/config/nginx/resolver.conf b/librespeed/config/nginx/resolver.conf new file mode 100755 index 0000000..1ae22e7 --- /dev/null +++ b/librespeed/config/nginx/resolver.conf @@ -0,0 +1,3 @@ +# This file is auto-generated only on first start, based on the container's /etc/resolv.conf file. Feel free to modify it as you wish. + +resolver 127.0.0.11 valid=30s; diff --git a/librespeed/config/nginx/site-confs/default.conf b/librespeed/config/nginx/site-confs/default.conf new file mode 100755 index 0000000..5dd79c0 --- /dev/null +++ b/librespeed/config/nginx/site-confs/default.conf @@ -0,0 +1,40 @@ +## Version 2023/04/13 - Changelog: https://github.com/linuxserver/docker-baseimage-alpine-nginx/commits/master/root/defaults/nginx/site-confs/default.conf.sample + +server { + listen 80 default_server; + listen [::]:80 default_server; + + listen 443 ssl http2 default_server; + listen [::]:443 ssl http2 default_server; + + server_name _; + + include /config/nginx/ssl.conf; + + set $root /app/www/public; + if (!-d /app/www/public) { + set $root /config/www; + } + root $root; + index index.html index.htm index.php; + + location / { + # enable for basic auth + #auth_basic "Restricted"; + #auth_basic_user_file /config/nginx/.htpasswd; + + try_files $uri $uri/ /index.html /index.php$is_args$args =404; + } + + location ~ ^(.+\.php)(.*)$ { + fastcgi_split_path_info ^(.+\.php)(.*)$; + fastcgi_pass 127.0.0.1:9000; + fastcgi_index index.php; + include /etc/nginx/fastcgi_params; + } + + # deny access to .htaccess/.htpasswd files + location ~ /\.ht { + deny all; + } +} diff --git a/librespeed/config/nginx/site-confs/default.conf.sample b/librespeed/config/nginx/site-confs/default.conf.sample new file mode 100755 index 0000000..626004d --- /dev/null +++ b/librespeed/config/nginx/site-confs/default.conf.sample @@ -0,0 +1,44 @@ +## Version 2024/07/16 - Changelog: https://github.com/linuxserver/docker-baseimage-alpine-nginx/commits/master/root/defaults/nginx/site-confs/default.conf.sample + +server { + listen 80 default_server; + listen [::]:80 default_server; + listen 443 ssl default_server; + listen [::]:443 ssl default_server; + + server_name _; + + include /config/nginx/ssl.conf; + + set $root /app/www/public; + if (!-d /app/www/public) { + set $root /config/www; + } + root $root; + index index.html index.htm index.php; + + location / { + # enable for basic auth + #auth_basic "Restricted"; + #auth_basic_user_file /config/nginx/.htpasswd; + + try_files $uri $uri/ /index.html /index.htm /index.php$is_args$args; + } + + location ~ ^(.+\.php)(.*)$ { + # enable the next two lines for http auth + #auth_basic "Restricted"; + #auth_basic_user_file /config/nginx/.htpasswd; + + fastcgi_split_path_info ^(.+\.php)(.*)$; + if (!-f $document_root$fastcgi_script_name) { return 404; } + fastcgi_pass 127.0.0.1:9000; + fastcgi_index index.php; + include /etc/nginx/fastcgi_params; + } + + # deny access to .htaccess/.htpasswd files + location ~ /\.ht { + deny all; + } +} diff --git a/librespeed/config/nginx/ssl.conf b/librespeed/config/nginx/ssl.conf new file mode 100755 index 0000000..2cc2368 --- /dev/null +++ b/librespeed/config/nginx/ssl.conf @@ -0,0 +1,39 @@ +## Version 2022/08/20 - Changelog: https://github.com/linuxserver/docker-baseimage-alpine-nginx/commits/master/root/defaults/nginx/ssl.conf.sample + +### Mozilla Recommendations +# generated 2022-08-05, Mozilla Guideline v5.6, nginx 1.17.7, OpenSSL 1.1.1k, intermediate configuration +# https://ssl-config.mozilla.org/#server=nginx&version=1.17.7&config=intermediate&openssl=1.1.1k&guideline=5.6 + +ssl_certificate /config/keys/cert.crt; +ssl_certificate_key /config/keys/cert.key; +ssl_session_timeout 1d; +ssl_session_cache shared:MozSSL:10m; # about 40000 sessions +ssl_session_tickets off; + +# curl https://ssl-config.mozilla.org/ffdhe2048.txt > /path/to/dhparam +ssl_dhparam /config/nginx/dhparams.pem; + +# intermediate configuration +ssl_protocols TLSv1.2 TLSv1.3; +ssl_ciphers ECDHE-ECDSA-AES128-GCM-SHA256:ECDHE-RSA-AES128-GCM-SHA256:ECDHE-ECDSA-AES256-GCM-SHA384:ECDHE-RSA-AES256-GCM-SHA384:ECDHE-ECDSA-CHACHA20-POLY1305:ECDHE-RSA-CHACHA20-POLY1305:DHE-RSA-AES128-GCM-SHA256:DHE-RSA-AES256-GCM-SHA384; +ssl_prefer_server_ciphers off; + +# HSTS (ngx_http_headers_module is required) (63072000 seconds) +#add_header Strict-Transport-Security "max-age=63072000" always; + +# OCSP stapling +#ssl_stapling on; +#ssl_stapling_verify on; + +# verify chain of trust of OCSP response using Root CA and Intermediate certs +#ssl_trusted_certificate /config/keys/cert.crt; + +# Optional additional headers +#add_header Cache-Control "no-transform" always; +#add_header Content-Security-Policy "upgrade-insecure-requests; frame-ancestors 'self'"; +#add_header Permissions-Policy "interest-cohort=()"; +#add_header Referrer-Policy "same-origin" always; +#add_header X-Content-Type-Options "nosniff" always; +#add_header X-Frame-Options "SAMEORIGIN" always; +#add_header X-UA-Compatible "IE=Edge" always; +#add_header X-XSS-Protection "1; mode=block" always; diff --git a/librespeed/config/nginx/ssl.conf.sample b/librespeed/config/nginx/ssl.conf.sample new file mode 100755 index 0000000..f1483ad --- /dev/null +++ b/librespeed/config/nginx/ssl.conf.sample @@ -0,0 +1,39 @@ +## Version 2023/08/13 - Changelog: https://github.com/linuxserver/docker-baseimage-alpine-nginx/commits/master/root/defaults/nginx/ssl.conf.sample + +### Mozilla Recommendations +# generated 2023-06-25, Mozilla Guideline v5.7, nginx 1.24.0, OpenSSL 3.1.1, intermediate configuration +# https://ssl-config.mozilla.org/#server=nginx&version=1.24.0&config=intermediate&openssl=3.1.1&guideline=5.7 + +ssl_certificate /config/keys/cert.crt; +ssl_certificate_key /config/keys/cert.key; +ssl_session_timeout 1d; +ssl_session_cache shared:MozSSL:10m; # about 40000 sessions +ssl_session_tickets off; + +# curl https://ssl-config.mozilla.org/ffdhe2048.txt > /path/to/dhparam +ssl_dhparam /config/nginx/dhparams.pem; + +# intermediate configuration +ssl_protocols TLSv1.2 TLSv1.3; +ssl_ciphers ECDHE-ECDSA-AES128-GCM-SHA256:ECDHE-RSA-AES128-GCM-SHA256:ECDHE-ECDSA-AES256-GCM-SHA384:ECDHE-RSA-AES256-GCM-SHA384:ECDHE-ECDSA-CHACHA20-POLY1305:ECDHE-RSA-CHACHA20-POLY1305:DHE-RSA-AES128-GCM-SHA256:DHE-RSA-AES256-GCM-SHA384:DHE-RSA-CHACHA20-POLY1305; +ssl_prefer_server_ciphers off; + +# HSTS (ngx_http_headers_module is required) (63072000 seconds) +#add_header Strict-Transport-Security "max-age=63072000" always; + +# OCSP stapling +#ssl_stapling on; +#ssl_stapling_verify on; + +# verify chain of trust of OCSP response using Root CA and Intermediate certs +#ssl_trusted_certificate /config/keys/cert.crt; + +# Optional additional headers +#add_header Cache-Control "no-transform" always; +#add_header Content-Security-Policy "upgrade-insecure-requests; frame-ancestors 'self'" always; +#add_header Permissions-Policy "interest-cohort=()" always; +#add_header Referrer-Policy "same-origin" always; +#add_header X-Content-Type-Options "nosniff" always; +#add_header X-Frame-Options "SAMEORIGIN" always; +#add_header X-UA-Compatible "IE=Edge" always; +#add_header X-XSS-Protection "1; mode=block" always; diff --git a/librespeed/config/nginx/worker_processes.conf b/librespeed/config/nginx/worker_processes.conf new file mode 100755 index 0000000..f7dc030 --- /dev/null +++ b/librespeed/config/nginx/worker_processes.conf @@ -0,0 +1,3 @@ +# This file is auto-generated only on first start, based on the cpu cores detected. Feel free to change it to any other number or to auto to let nginx handle it automatically. + +worker_processes 1; diff --git a/librespeed/config/php/php-local.ini b/librespeed/config/php/php-local.ini new file mode 100755 index 0000000..cce6f9c --- /dev/null +++ b/librespeed/config/php/php-local.ini @@ -0,0 +1,2 @@ +; Edit this file to override php.ini directives + diff --git a/librespeed/config/php/www2.conf b/librespeed/config/php/www2.conf new file mode 100755 index 0000000..13fc59d --- /dev/null +++ b/librespeed/config/php/www2.conf @@ -0,0 +1,5 @@ +; Edit this file to override www.conf and php-fpm.conf directives and restart the container + +; Pool name +[www] + diff --git a/librespeed/config/speedtest_telemetry.sql b/librespeed/config/speedtest_telemetry.sql new file mode 100755 index 0000000000000000000000000000000000000000..22ba147a3f1a308b05555381fe8837bc4a6dcaff GIT binary patch literal 28672 zcmeHOOK%(36{aLxvK|!E#)_=ONp6%jv1)O2A9L?Kq#9LRB^4~$svdO$1eIxvj#<;B zOi{LypeQ))B0$&q5m~j1psQ{Q6h+#g1-eN$1qu{dwdkT9 zvS>brS3KXGd(L;hb7t+kOSy8E+$@&vWXeP&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;zD4q&;r>0PG}~A9-+O;#!gqz?yAMMVOiert1#D} z8G9cbeXPE|Q;p|LM41_by&}zQE!PX`%Fx-dNKIPkNKXzUR}d$wUCU4!tQGf=zR{CI z^^M^doD9J<8iTLYpwXaWL0_<4G$8rvO{Vozy+~J}0T3K+p$yYPIFwMEdxKv;z+!By zL!QAgP#BbN-Gc?he@HW?Fa0uI!&C3n*AB42P)CRS0@ZBT3g{NUKsQ8czJM;imN66p z#>)p#G^Y2DvqjJ)3Rz^gK%wPX^aCK>QLqKSr%k=l$q?C!f@Gg)68}dG)#~u+y`WVDKGib0U*r=2%~jKkWW~ea$Wri>B^R8 zkfQ_Q!_fvHm@s9g0}iFzMtTg_VU=wX;sH7_(L}wEC;%{?*2*q)PUgyeExSdX^C$?E zZWVD`YFeS)lj>+8D}@&io7^Z^M%@$G5Qj{zj@P!ZCytOqLD1rs4Ypun%1eht=IHu= zu>WU?(SIdBANg$fw?lsz{MD(C2Y!Q>;#-VBj6jS)j6jS)w;;r33f%mnsc6C{ zro8lo57aG8VTL7ctqOcKSJ*1v-yxUR(W^0VxfEW|*NN>ZGcr*V?GiN`GyBZ4AQPci z<6rtBSmm}1VL5V{%T5cXJMa{fn)P9M)QrVZurzHgrg|WASosneLC#Ltq?r6C`LBa%_t5%G%mA@lZUB9wFKW1KR + + + + + + + + +LibreSpeed Example + + +

LibreSpeed Example

+
+

Selecting a server...

+
+ + + + diff --git a/librespeed/config/www/example-multipleServers-pretty.html b/librespeed/config/www/example-multipleServers-pretty.html new file mode 100755 index 0000000..43b3052 --- /dev/null +++ b/librespeed/config/www/example-multipleServers-pretty.html @@ -0,0 +1,245 @@ + + + + + + +LibreSpeed Example + + + + + + +

LibreSpeed Example

+
+
Selecting server...
+
+
+
+
Download
+
+
Mbit/s
+
+
+
Upload
+
+
Mbit/s
+
+
+
+
+
Ping
+
+
ms
+
+
+
Jitter
+
+
ms
+
+
+
+ IP Address: +
+
+Source code + + + diff --git a/librespeed/config/www/example-singleServer-basic.html b/librespeed/config/www/example-singleServer-basic.html new file mode 100755 index 0000000..18c85ea --- /dev/null +++ b/librespeed/config/www/example-singleServer-basic.html @@ -0,0 +1,38 @@ + + + + + LibreSpeed Example + + + + +

LibreSpeed Example

+ +

IP Address

+

+ +

Download

+

+ +

Upload

+

+ +

Latency

+

+ + + + Source code + + + diff --git a/librespeed/config/www/example-singleServer-chart.html b/librespeed/config/www/example-singleServer-chart.html new file mode 100755 index 0000000..7783cd5 --- /dev/null +++ b/librespeed/config/www/example-singleServer-chart.html @@ -0,0 +1,256 @@ + + + + + LibreSpeed Example + + + + + + + + +

LibreSpeed - Chart.js example

+ + Run speed test +

Charts by Chart.js

Source code + + diff --git a/librespeed/config/www/example-singleServer-customSettings.html b/librespeed/config/www/example-singleServer-customSettings.html new file mode 100755 index 0000000..1a06f89 --- /dev/null +++ b/librespeed/config/www/example-singleServer-customSettings.html @@ -0,0 +1,174 @@ + + + + + +LibreSpeed Example + + + + + + + +

LibreSpeed Example

+
+
+
+
+
Download
+
+
Mbit/s
+
+
+
Upload
+
+
Mbit/s
+
+
+
+Source code + + + diff --git a/librespeed/config/www/example-singleServer-full.html b/librespeed/config/www/example-singleServer-full.html new file mode 100755 index 0000000..823ef9f --- /dev/null +++ b/librespeed/config/www/example-singleServer-full.html @@ -0,0 +1,365 @@ + + + + + + + + + +LibreSpeed Example + + +

LibreSpeed Example

+
+

+ Privacy +
+
+
+
Ping
+
+
ms
+
+
+
Jitter
+
+
ms
+
+
+
+
+
Download
+ +
+
Mbps
+
+
+
Upload
+ +
+
Mbps
+
+
+
+ +
+ +
+ Source code +
+ + + + diff --git a/librespeed/config/www/example-singleServer-gauges.html b/librespeed/config/www/example-singleServer-gauges.html new file mode 100755 index 0000000..0b6c388 --- /dev/null +++ b/librespeed/config/www/example-singleServer-gauges.html @@ -0,0 +1,262 @@ + + + + + + + + + +LibreSpeed Example + + +

LibreSpeed Example

+
+
+
+
+
+
Ping
+
+
ms
+
+
+
Jitter
+
+
ms
+
+
+
+
+
Download
+ +
+
Mbit/s
+
+
+
Upload
+ +
+
Mbit/s
+
+
+
+ +
+
+ Source code +
+ + + diff --git a/librespeed/config/www/example-singleServer-pretty.html b/librespeed/config/www/example-singleServer-pretty.html new file mode 100755 index 0000000..eca431b --- /dev/null +++ b/librespeed/config/www/example-singleServer-pretty.html @@ -0,0 +1,192 @@ + + + + + +LibreSpeed Example + + + + + + + +

LibreSpeed Example

+
+
+
+
+
Download
+
+
Mbit/s
+
+
+
Upload
+
+
Mbit/s
+
+
+
+
+
Ping
+
+
ms
+
+
+
Jitter
+
+
ms
+
+
+
+ IP Address: +
+
+Source code + + + diff --git a/librespeed/config/www/example-singleServer-progressBar.html b/librespeed/config/www/example-singleServer-progressBar.html new file mode 100755 index 0000000..ce037b6 --- /dev/null +++ b/librespeed/config/www/example-singleServer-progressBar.html @@ -0,0 +1,212 @@ + + + + + +LibreSpeed Example + + + + + + + +

LibreSpeed Example

+
+
+
+
+
+
Download
+
+
Mbit/s
+
+
+
Upload
+
+
Mbit/s
+
+
+
+
+
Ping
+
+
ms
+
+
+
Jitter
+
+
ms
+
+
+
+ IP Address: +
+
+Source code + + + diff --git a/librespeed/config/www/index.html b/librespeed/config/www/index.html new file mode 100755 index 0000000..ba71b13 --- /dev/null +++ b/librespeed/config/www/index.html @@ -0,0 +1,352 @@ + + + + + + + + + +LibreSpeed Speedtest + + +

LibreSpeed Speedtest

+
+

+ Privacy +
+
+
+
Ping
+
+
ms
+
+
+
Jitter
+
+
ms
+
+
+
+
+
Download
+ +
+
Mbps
+
+
+
Upload
+ +
+
Mbps
+
+
+
+ +
+ +
+ Source code +
+ + + + diff --git a/librespeed/docker-compose.yaml b/librespeed/docker-compose.yaml new file mode 100755 index 0000000..d09d793 --- /dev/null +++ b/librespeed/docker-compose.yaml @@ -0,0 +1,24 @@ +--- +#version: "2.1" +services: + librespeed: + image: lscr.io/linuxserver/librespeed:latest + container_name: librespeed + environment: + - PUID=1000 + - PGID=1000 + - TZ=Europe/Paris + - PASSWORD=PASSWORD + #- CUSTOM_RESULTS=false #optional + #- DB_TYPE=sqlite #optional + #- DB_NAME=DB_NAME #optional + #- DB_HOSTNAME=DB_HOSTNAME #optional + #- DB_USERNAME=DB_USERNAME #optional + #- DB_PASSWORD=DB_PASSWORD #optional + #- DB_PORT=DB_PORT #optional + #- IPINFO_APIKEY=ACCESS_TOKEN #optional + volumes: + - ./config:/config + ports: + - 5680:80 + restart: unless-stopped