diff --git a/.github/workflows/always.yml b/.github/workflows/always.yml index 23067ba..6b0b41b 100644 --- a/.github/workflows/always.yml +++ b/.github/workflows/always.yml @@ -8,7 +8,12 @@ jobs: build: runs-on: ubuntu-latest steps: - - uses: actions/checkout@v2 + - name: Checkout + uses: actions/checkout@v4 + + - name: Format + run: rustup component add rustfmt clippy + - name: Run CI run: make ci diff --git a/.github/workflows/deploy.yml b/.github/workflows/deploy.yml index f021c0f..d1da497 100644 --- a/.github/workflows/deploy.yml +++ b/.github/workflows/deploy.yml @@ -12,6 +12,9 @@ jobs: - name: Checkout uses: actions/checkout@v4 + - name: Format + run: rustup component add rustfmt clippy + - name: Run tests run: make ci diff --git a/README.md b/README.md index 5e872cc..0569c03 100644 --- a/README.md +++ b/README.md @@ -46,7 +46,6 @@ Example: ./blockfast --generic-logpath=/tmp/generictest --generic-positive='Failed password' --generic-ip='from ([0-9a-fA-F:.]+) port' Usage: blockfast [OPTIONS] -Usage: blockfast [OPTIONS] Options: --jailtime @@ -60,7 +59,7 @@ Options: -c, --clf-logpath path of Common-Log-Format logfile (Apache, etc..) -j, --json-logpath - path of JSON HTTP logfile (Caddy) + path of JSON logfile (works with Caddy) --generic-logpath generic parser log file path --generic-ip @@ -69,8 +68,8 @@ Options: generic parser positive - if a logline contains this, it is considered bad, the rest is good --generic-negative generic parser negative - if a logline contains this, it is considered good, the rest is bad - --valid-http-statuses - valid http statuses (for CLF and JSON logs) [default: 200 101] + --invalid-http-statuses + invalid http statuses (for CLF and JSON logs). Coma separated list, accepts ranges with XX [default: 400,401,402,403] -h, --help Print help -V, --version diff --git a/rust-toolchain.toml b/rust-toolchain.toml index 3cf2110..03b322a 100644 --- a/rust-toolchain.toml +++ b/rust-toolchain.toml @@ -1,2 +1,2 @@ [toolchain] -channel = "1.81.0" \ No newline at end of file +channel = "1.95.0" \ No newline at end of file diff --git a/src/main.rs b/src/main.rs index 9901932..329f0c7 100644 --- a/src/main.rs +++ b/src/main.rs @@ -116,7 +116,5 @@ async fn run() -> Result<()> { #[tokio::main] async fn main() -> Result<()> { - run().await?; - eprintln!("\n"); - Ok(()) + run().await } diff --git a/src/utils.rs b/src/utils.rs index 8fec206..c480d1d 100644 --- a/src/utils.rs +++ b/src/utils.rs @@ -97,7 +97,6 @@ Example: verbatim_doc_comment, group(ArgGroup::new("generic_match").args(["generic_positive", "generic_negative"])), )] - pub struct Args { /// jail time (seconds) #[clap(long, default_value = "21600")]