switch to ipset-sys

it's a perf boost, but we drastically reduce portability
as it will drag a libipset and a libc dependency along.
This commit is contained in:
Pierre Dubouilh
2022-08-03 01:25:01 +02:00
parent 89e6d2bff1
commit e3211d8c8e
5 changed files with 240 additions and 90 deletions
+15 -9
View File
@@ -1,23 +1,29 @@
build:
build::
cargo build
cargo clippy
cargo fmt
run:
cargo run -- -s=/tmp/sshdtest -c=/tmp/clftest
run:: build
sudo target/debug/blockfast -s=/tmp/sshdtest -c=/tmp/clftest
watch:
watch::
ls src/*.rs | entr -rc -- make run
test:
test::
cargo test
watch-test:
watch-test::
ls src/*.rs | entr -rc -- make test
release:
release::
cargo build --target x86_64-unknown-linux-musl --release
ci: test
ci:: test
cargo fmt --all -- --check
cargo clippy -- -D warnings
cargo clippy -- -D warnings
hit-sshd-bad::
echo "Sep 26 06:26:14 livecompute sshd[23292]: pam_unix(sshd:auth): authentication failure; logname= u =0 tty=ssh ruser= rhost=5.101.107.191" >> /tmp/sshdtest
hit-clftest-bad::
echo "8.8.8.8 - p [25/Sep/2021:13:49:56 +0200] \"POST /some/rpc HTTP/2.0\" 200 923" >> /tmp/clftest