Service lister and monitorer
Go to file
Miraty d3dd930451 add installation instructions in readme 2024-04-25 19:27:01 +02:00
locales add about page, CNPL-NAv7+ license, source code link 2024-04-22 19:34:41 +02:00
migrations add IP and AS informations 2024-04-20 20:09:48 +02:00
src enable and resolve some advanced clippy lints 2024-04-23 15:08:22 +02:00
templates add about page, CNPL-NAv7+ license, source code link 2024-04-22 19:34:41 +02:00
.editorconfig fix fluent indentation in .editorconfig 2024-04-20 20:10:38 +02:00
.gitignore extend .gitignore 2024-04-23 01:35:44 +02:00
Cargo.lock load configuration and database only once 2024-04-23 01:33:39 +02:00
Cargo.toml enable and resolve some advanced clippy lints 2024-04-23 15:08:22 +02:00
LICENSE.md add about page, CNPL-NAv7+ license, source code link 2024-04-22 19:34:41 +02:00
README.md add installation instructions in readme 2024-04-25 19:27:01 +02:00
Rocket.toml Init with Rocket, Diesel and Tera templates 2024-02-23 19:50:55 +01:00
config.kdl add about page, CNPL-NAv7+ license, source code link 2024-04-22 19:34:41 +02:00
diesel.toml Init with Rocket, Diesel and Tera templates 2024-02-23 19:50:55 +01:00
rustfmt.toml Init with Rocket, Diesel and Tera templates 2024-02-23 19:50:55 +01:00

README.md

services

Contains 2 binaries:

  • services to display and add new services using a Web interface
  • updater to update existing services uptime and metadata

Dependencies

Rocket
Web framework
Tera
HTML template
Fluent
translations
Diesel
ORM for SQLite
texting_robots
robots.txt parser
reqwest
HTTP requests
asn-db2
parse IPtoASN tsv format
kdl-rs
parse KDL configuration

Installation

Tooling

Install Rust and Cargo. If your distribution doesn't ship with recent enough versions, you can get them with Rustup.

Install Diesel CLI. If your distribution doesn't ship it, you can install it using:

cargo install diesel_cli --no-default-features --features sqlite

Data setup

Create SQLite database:

diesel database setup --database-url services.db

Download and decompress the combined IPtoASN TSV file:

curl https://iptoasn.com/data/ip2asn-combined.tsv.gz | zcat > ip2asn-combined.tsv

For development

cargo run --bin services
cargo run --bin updater

For real use

Download dependencies:

cargo fetch --locked

Build (delete `` for a development build):

cargo build --frozen --release
  • target/release/services should be HTTP reverse-proxied
  • target/release/updater should be run periodically using a cron

License

You can use, redistribute or modify under the terms of the CNPL-NAv7+ as found in LICENSE.md or at https://git.pixie.town/thufie/npl-builder.