From e55ba289f3efd0243f281fab3a4494eaff3a65bc Mon Sep 17 00:00:00 2001 From: okxlin Date: Thu, 13 Apr 2023 23:31:10 +0800 Subject: [PATCH] =?UTF-8?q?=E6=B7=BB=E5=8A=A0looking-glass-server?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- ALS/metadata/app.json | 15 ++++++++ ALS/versions/latest/README.md | 52 ++++++++++++++++++++++++++ ALS/versions/latest/docker-compose.yml | 12 ++++++ 3 files changed, 79 insertions(+) create mode 100644 ALS/metadata/app.json create mode 100644 ALS/versions/latest/README.md create mode 100644 ALS/versions/latest/docker-compose.yml diff --git a/ALS/metadata/app.json b/ALS/metadata/app.json new file mode 100644 index 00000000..5e8e2b97 --- /dev/null +++ b/ALS/metadata/app.json @@ -0,0 +1,15 @@ + +{ + "key": "ALS", + "name": "ALS", + "tags": ["Tool"], + "versions": ["latest"], + "shortDescZh": "Another Looking-glass Server,测速服务端", + "shortDescEn": "Another Looking-glass Server,Speed measurement server", + "type": "tool", + "limit": 0, + "crossVersionUpdate": false, + "website": "https://github.com/wikihost-opensource/als", + "github": "https://github.com/wikihost-opensource/als", + "document": "https://github.com/wikihost-opensource/als" +} diff --git a/ALS/versions/latest/README.md b/ALS/versions/latest/README.md new file mode 100644 index 00000000..59960883 --- /dev/null +++ b/ALS/versions/latest/README.md @@ -0,0 +1,52 @@ +[![docker image build](https://github.com/wikihost-opensource/als/actions/workflows/docker-image.yml/badge.svg)](https://github.com/wikihost-opensource/als/actions/workflows/docker-image.yml) + +# ALS - Another Looking-glass Server + +## Quick start +``` +docker run -d --name looking-glass --restart always --network host wikihostinc/looking-glass-server +``` + +[DEMO](http://lg.hk1-bgp.hkg.50network.com/) + +## Host Requirements + - Can run docker (yes, only docker is required) + +## Image Environment Variables +| Key | Example | Default | Description | +| ------------------------- | ---------------------------------------------------------------------- | ---------------------------------------------------------- | --------------------------------------------------------------------------------------- | +| LISTEN_IP | 127.0.0.1 | (all ip) | which IP address will be listen use | +| HTTP_PORT | 80 | 80 | which HTTP port should use | +| SPEEDTEST_FILE_LIST | 100MB 1GB | 1MB 10MB 100MB 1GB | size of static test files, separate with space | +| LOCATION | "this is location" | (from maxmind database, ip via PUBLIC_IPV4 or PUBLIC_IPV6) | location string | +| MAXMIND_KEY | THE_KEY | (empty) | about more https://dev.maxmind.com/geoip/geolite2-free-geolocation-data | +| PUBLIC_IPV4 | 1.1.1.1 | (fetch from http://ifconfig.co) | The IPv4 address of the server | +| PUBLIC_IPV6 | fe80::1 | (fetch from http://ifconfig.co) | The IPv6 address of the server | +| DISPLAY_TRAFFIC | true | true | Toggle the streaming traffic graph | +| ENABLE_SPEEDTEST | true | true | Toggle the speedtest feature | +| UTILITIES_PING | true | true | Toggle the ping feature | +| UTILITIES_SPEEDTESTDOTNET | true | true | Toggle the speedtest.net feature | +| UTILITIES_FAKESHELL | true | true | Toggle the HTML Shell feature | +| UTILITIES_IPERF3 | true | true | Toggle the iperf3 feature | +| UTILITIES_IPERF3_PORT_MIN | 30000 | 30000 | iperf3 listen port range - from | +| UTILITIES_IPERF3_PORT_MAX | 31000 | 31000 | iperf3 listen port range - to | +| SPONSOR_MESSAGE | "Test message" or "/tmp/als_readme.md" or "http://some_host/114514.md" | '' | Show server sponsor message (support markdown file, required mapping file to container) | + + +## Features +- [x] HTML 5 Speed Test +- [x] Ping - IPv4 +- [x] iPerf3 server +- [x] Streaming traffic graph +- [x] Speedtest.net Client +- [x] Online shell box (limited commands) + +## Thanks to +https://github.com/librespeed/speedtest + +## License + +Code is licensed under MIT Public License. + +* If you wish to support my efforts, keep the "Powered by LookingGlass" link intact. + diff --git a/ALS/versions/latest/docker-compose.yml b/ALS/versions/latest/docker-compose.yml new file mode 100644 index 00000000..4cc897d1 --- /dev/null +++ b/ALS/versions/latest/docker-compose.yml @@ -0,0 +1,12 @@ +version: "3" +services: + als: + container_name: ${CONTAINER_NAME} + restart: unless-stopped + network_mode: "host" + environment: + - HTTP_PORT=20080 + image: wikihostinc/looking-glass-server + labels: + createdBy: "Apps" +