cruiser (0.1.1)
Installation
[registry]
default = "gitea"
[registries.gitea]
index = "sparse+ " # Sparse index
# index = " " # Git
[net]
git-fetch-with-cli = true
cargo add cruiser@0.1.1
About this package
A Rust HTTP toolbox for self-hosted users (built upon Rocket)
cruiser
A Rust HTTP toolbox for self-hosted users (built upon Rocket)
Features
- Connectivity check for Android captive portal detection (for
captive_portal_http[s]_url
orcaptive_portal_[other_]fallback_url[s]
system options) - "What is my IP ?" service (plain text or JSON serialized outputs)
Build
cargo build
Usage
cruiser --help
Examples
cruiser --trusted-proxies 10.0.0.80 192.168.0.80
# Check connectivity
curl -w '%{http_code}' http://127.0.0.1:8000/
## => 204
# What is my IP ?
curl http://127.0.0.1:8000/ip
## => 127.0.0.1
curl http://127.0.0.1:8000/ip/json
## => {"ip":"127.0.0.1"}
curl -H "X-FORWARDED-FOR: 8.8.8.8, 10.0.0.80" http://127.0.0.1:8000/ip
## => 8.8.8.8
curl -H "X-REAL-IP: 8.8.8.8" http://127.0.0.1:8000/ip
## => 8.8.8.8
Contributing
Code format
rustup component add rustfmt
cargo fmt
Code analysis
rustup component add clippy
cargo clippy
Dependencies
ID | Version |
---|---|
clap | ^3.2.25 |
rocket | ^0.5.1 |
Details
2024-07-27 15:49:58 +02:00
Assets (1)
Versions (2)
View all
Cargo
24
Samuel FORESTIER <samuel+dev@forestier.app>
MIT
14 KiB
cruiser-0.1.1.crate
14 KiB