From cc872d3eba68f08ee365b8771d8504c28da9020d Mon Sep 17 00:00:00 2001 From: onefang Date: Tue, 5 Nov 2019 15:38:24 +1000 Subject: Rename project to apt-panopticon. It used to be mirror-checker-lua. --- README.md | 81 ++++++++++++++++++++++++++++++++------------------------------- 1 file changed, 41 insertions(+), 40 deletions(-) (limited to 'README.md') diff --git a/README.md b/README.md index 5ac7f9b..94b3c65 100644 --- a/README.md +++ b/README.md @@ -4,11 +4,11 @@ This is currently under development, not everything has been written yet. Some of this document mentions some of the things that are not written yet. -mirror-checker-lua is a Lua script used by the Devuan mirror admins -(maybe, if they like it) to check the health of Devuan Linux package -mirrors. Originally there was bash scripts for this job, then Evilham -wrote some Python scripts, now onefang has written it in Lua. We all -have different tastes in languages. lol +apt-panopticon is a Lua script used by the Devuan mirror admins (maybe, +if they like it) to check the health of Devuan Linux package mirrors. +Originally there was bash scripts for this job, then Evilham wrote some +Python scripts, now onefang has written it in Lua. We all have different +tastes in languages. lol The main difference is that this Lua version tries to do everything, and will be maintained. Currently the shell scripts and Python scripts are @@ -17,7 +17,7 @@ badgered him about his Python scripts. It should also be much easier to use, the previous scripts needed some work before you could run them, this one you just download and run. -The source code is at [https://sledjhamr.org/cgit/mirror-checker-lua/](https://sledjhamr.org/cgit/mirror-checker-lua/) +The source code is at [https://sledjhamr.org/cgit/apt-panopticon/](https://sledjhamr.org/cgit/apt-panopticon/) The issue tracker is at [https://sledjhamr.org/mantisbt/project_page.php?project_id=13](https://sledjhamr.org/mantisbt/project_page.php?project_id=13) @@ -25,7 +25,7 @@ The issue tracker is at [https://sledjhamr.org/mantisbt/project_page.php?project Installation. ------------- -Download the source. You may want to put the mirror-checker.lua script +Download the source. You may want to put the apt-panopticon.lua script in someplace like `/usr/local/bin` and make sure it is executable. It should run on any recent Linux, you'll need to have the following @@ -52,57 +52,58 @@ and `results/web` directories, with the notification emails and web pages Note that unlike typical commands, you can't run single character options together, so this is wrong - - $ ./mirror-checker.lua -vvv + $ ./apt-panopticon.lua -vvv Instead do this - - $ ./mirror-checker.lua -v -v -v + $ ./apt-panopticon.lua -v -v -v Just run the script to do all of the tests - - $ ./mirror-checker.lua + $ ./apt-panopticon.lua Which will print any errors. If you don't want to see errors - - $ ./mirror-checker.lua -q + $ ./apt-panopticon.lua -q If you want to see warnings as well (as usual, the more `-v` options, the more details) - - $ ./mirror-checker.lua -v + $ ./apt-panopticon.lua -v Or use the usual options for the help and version number (not written yet) - - $ ./mirror-checker.lua -h - $ ./mirror-checker.lua --help - $ ./mirror-checker.lua --version + $ ./apt-panopticon.lua -h + $ ./apt-panopticon.lua --help + $ ./apt-panopticon.lua --version To run the tests on a specific mirror, for example pkgmaster.devuan.org - - $ ./mirror-checker.lua pkgmaster.devuan.org + $ ./apt-panopticon.lua pkgmaster.devuan.org You can use the `--tests` option to tune which tests are run, for example to stop IPv6 tests, coz you don't have IPv6 - - $ ./mirror-checker.lua --tests=-IPv6 + $ ./apt-panopticon.lua --tests=-IPv6 To do the same, but not run the HTTPS tests either - - $ ./mirror-checker.lua --tests=-IPv6,-https + $ ./apt-panopticon.lua --tests=-IPv6,-https To only run the HTTP integrity tests, only on IPv6 - - $ ./mirror-checker.lua --tests=http,Integrity,IPv6 + $ ./apt-panopticon.lua --tests=http,Integrity,IPv6 The tests. ---------- The basic test is to find all the IPs for a mirror, including any CNAMES, -then send HTTP HEAD requests to those IPs, with HOST headers for that mirror, -and follow any redirections, doing the same for those redirections. -Unless a specific mirror is given on the command line, the mirror_list.txt -file from pkgmaster.devuan.org is used to select mirrors to test. +then send HTTP HEAD requests to those IPs, with HOST headers for that +mirror, and follow any redirections, doing the same for those +redirections. Unless a specific mirror is given on the command line, the +mirror_list.txt file from pkgmaster.devuan.org is used to select mirrors +to test. The --tests= option can be used to adjust the list of tests performed. @@ -147,7 +148,8 @@ negative argument deselects a test. Examples are given above. --referenceSite -The mirror to use as a reference for the tests, the default is pkgmaster.devuan.org. +The mirror to use as a reference for the tests, the default is +pkgmaster.devuan.org. --roundRobin @@ -187,7 +189,7 @@ Delete results/*.check. touch results/stamp -Open results/mirror-checker-lua.log for message logging. +Open results/apt-panopticon.log for message logging. Download mirror_list.txt from the reference site. Build a table of Active mirrors keyed by the FDQN, include the listed Protocols as a sub @@ -221,12 +223,12 @@ that host. For each IPv4 and IPv6 address, fork a copy of the script something like this (including any arguments originally provided to the script) - -ionice -c3 ./mirror-checker.lua example.com/path x.x.x.x & +ionice -c3 ./apt-panopticon.lua example.com/path x.x.x.x & -ionice -c3 ./mirror-checker.lua example.com/path [x:x:x:x:x:x] & +ionice -c3 ./apt-panopticon.lua example.com/path [x:x:x:x:x:x] & -For each CNAME, it checkHost() the host, but with the CNAME as a -second argument. +For each CNAME, it checkHost() the host, but with the CNAME as a second +argument. SRV reconds don't do anything yet, coz I have yet to see one from my test environment, so can't test it. @@ -234,8 +236,7 @@ environment, so can't test it. Each forked call of the script from above does this - -Open results/mirror-checker-lua_example.com_x.x.x.x.log for message -logging. +Open results/example.com_x.x.x.x.log for message logging. Loads the mirrors table from results/mirrors.lua. @@ -245,18 +246,18 @@ actually perform the Integrity and Updated tests now, those haven't been written yet. Note that currently this downloads 4GB per mirror. Calls checkHost() with the host as first and second arguments, and -includes the IP this time. The inclusion of the IP causes -checkHost() to call checkFiles(). +includes the IP this time. The inclusion of the IP causes checkHost() to +call checkFiles(). checkFiles() will call checkHEAD() for each of the reference files. -checkHEAD() uses LuaSocket (or LuaSec for HTTPS) to send a HEAD request to -the IP, with a Host header set to the original host name. Redirects will -not be followed by that request. If the request returns a redirect, then -checkHEAD() is called recursively. If the redirect is to some host we are -not already checking, we call checkHost() on it, with an IP of -"redir". This causes checkHost() to bypass the test that would -otherwise call checkFiles(), instead gathering the IPs and fork as usual. +checkHEAD() uses LuaSocket (or LuaSec for HTTPS) to send a HEAD request +to the IP, with a Host header set to the original host name. Redirects +will not be followed by that request. If the request returns a redirect, +then checkHEAD() is called recursively. If the redirect is to some host +we are not already checking, we call checkHost() on it, with an IP of +"redir". This causes checkHost() to bypass the test that would otherwise +call checkFiles(), instead gathering the IPs and fork as usual. -- cgit v1.1