d3dd930451 | ||
---|---|---|
locales | ||
migrations | ||
src | ||
templates | ||
.editorconfig | ||
.gitignore | ||
Cargo.lock | ||
Cargo.toml | ||
LICENSE.md | ||
README.md | ||
Rocket.toml | ||
config.kdl | ||
diesel.toml | ||
rustfmt.toml |
README.md
services
Contains 2 binaries:
services
to display and add new services using a Web interfaceupdater
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-proxiedtarget/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.