Compare commits

..

6 commits

Author SHA1 Message Date
69917a9247
docs: use mermaidjs for visual graphs
Signed-off-by: NotAShelf <raf@notashelf.dev>
Change-Id: Ib7ae49f209214fc428f6e9bfc5c7d9176a6a6964
2026-03-01 00:36:47 +03:00
dd7e41eb64
nix: clean up devshell
Signed-off-by: NotAShelf <raf@notashelf.dev>
Change-Id: Ia844e89f1450cce1625c57c9d81279706a6a6964
2026-03-01 00:36:46 +03:00
8aa39cfb1a
eris: add more default scan paths to honeypot
Signed-off-by: NotAShelf <raf@notashelf.dev>
Change-Id: I10c0129340d517587905a97a034f01406a6a6964
2026-03-01 00:36:45 +03:00
57b739ddbe
nix: switch to crane for incramental builds
Signed-off-by: NotAShelf <raf@notashelf.dev>
Change-Id: Ia5ab2f512ffac20722966b605d7eaf156a6a6964
2026-03-01 00:36:44 +03:00
150f632fb8
chore: bump dependencies
Signed-off-by: NotAShelf <raf@notashelf.dev>
Change-Id: Ia2537b41147373d94e08325e8540bf906a6a6964
2026-03-01 00:36:43 +03:00
10c523ab89
nix: bump inputs
Signed-off-by: NotAShelf <raf@notashelf.dev>
Change-Id: I704ac50f34324d22d6ea86329f709e9d6a6a6964
2026-03-01 00:36:42 +03:00
7 changed files with 92 additions and 59 deletions

View file

@ -1,21 +1,23 @@
[package] [package]
name = "eris" name = "eris"
version = "0.1.0" description = "Sophisticated HTTP tarpit and honeypot stream"
authors = ["NotAShelf <raf@notashelf.dev"]
version = "0.1.1"
edition = "2024" edition = "2024"
[dependencies] [dependencies]
actix-web = "4.3.1" actix-web = "4.11.0"
clap = { version = "4.3", features = ["derive"] } clap = { version = "4.5.51", features = ["derive"] }
chrono = "0.4.24" chrono = "0.4.42"
futures = "0.3.28" futures = "0.3.31"
ipnetwork = "0.21.1" ipnetwork = "0.21.1"
lazy_static = "1.4.0" lazy_static = "1.5.0"
prometheus = "0.14.0" prometheus = "0.14.0"
prometheus_exporter = "0.8.5" prometheus_exporter = "0.8.5"
rand = "0.9.1" rand = "0.9.2"
rlua = "0.20.1" rlua = "0.20.1"
serde = { version = "1.0.162", features = ["derive"] } serde = { version = "1.0.228", features = ["derive"] }
serde_json = "1.0.96" serde_json = "1.0.145"
tokio = { version = "1.28.0", features = ["full"] } tokio = { version = "1.28.0", features = ["full"] }
log = "0.4.27" log = "0.4.28"
env_logger = "0.11.8" env_logger = "0.11.8"

View file

@ -81,8 +81,10 @@ Pre-built binaries are not yet available.
For static sites served by Nginx, the proper setup is to place Eris in front of For static sites served by Nginx, the proper setup is to place Eris in front of
Nginx. Here is a graph of how it's meant to be configured: Nginx. Here is a graph of how it's meant to be configured:
``` ```mermaid
Internet → [Eris (port 80)] → [Nginx (local port)] graph LR
A[Internet] --> B[Eris (port 80)]
B --> C[Nginx (local port)]
``` ```
You will want to configure Eris to listen on port 80 (or 443 for SSL) and You will want to configure Eris to listen on port 80 (or 443 for SSL) and
@ -132,8 +134,11 @@ eris --listen-addr 0.0.0.0:443 --backend-addr 127.0.0.1:8080 --ssl-cert /path/to
### Option 2: Use a separate SSL terminator ### Option 2: Use a separate SSL terminator
``` ```mermaid
Internet → [SSL Terminator (port 443)] → [Eris (local port)] → [Nginx (local port)] graph LR
A[Internet] --> B[SSL Terminator (port 443)]
B --> C[Eris (local port)]
C --> D[Nginx (local port)]
``` ```
You can use Nginx, HAProxy, or Caddy as the SSL terminator, forwarding decrypted You can use Nginx, HAProxy, or Caddy as the SSL terminator, forwarding decrypted

22
flake.lock generated
View file

@ -1,12 +1,27 @@
{ {
"nodes": { "nodes": {
"crane": {
"locked": {
"lastModified": 1760924934,
"narHash": "sha256-tuuqY5aU7cUkR71sO2TraVKK2boYrdW3gCSXUkF4i44=",
"owner": "ipetkov",
"repo": "crane",
"rev": "c6b4d5308293d0d04fcfeee92705017537cad02f",
"type": "github"
},
"original": {
"owner": "ipetkov",
"repo": "crane",
"type": "github"
}
},
"nixpkgs": { "nixpkgs": {
"locked": { "locked": {
"lastModified": 1745930157, "lastModified": 1761672384,
"narHash": "sha256-y3h3NLnzRSiUkYpnfvnS669zWZLoqqI6NprtLQ+5dck=", "narHash": "sha256-o9KF3DJL7g7iYMZq9SWgfS1BFlNbsm6xplRjVlOCkXI=",
"owner": "NixOS", "owner": "NixOS",
"repo": "nixpkgs", "repo": "nixpkgs",
"rev": "46e634be05ce9dc6d4db8e664515ba10b78151ae", "rev": "08dacfca559e1d7da38f3cf05f1f45ee9bfd213c",
"type": "github" "type": "github"
}, },
"original": { "original": {
@ -18,6 +33,7 @@
}, },
"root": { "root": {
"inputs": { "inputs": {
"crane": "crane",
"nixpkgs": "nixpkgs" "nixpkgs": "nixpkgs"
} }
} }

View file

@ -1,11 +1,15 @@
{ {
inputs.nixpkgs.url = "github:NixOS/nixpkgs?ref=nixos-unstable"; inputs = {
nixpkgs.url = "github:NixOS/nixpkgs?ref=nixos-unstable";
crane.url = "github:ipetkov/crane";
};
outputs = { outputs = {
self, self,
nixpkgs, nixpkgs,
crane,
}: let }: let
systems = ["x86_64-linux"]; systems = ["x86_64-linux" "aarch64-linux"];
forEachSystem = nixpkgs.lib.genAttrs systems; forEachSystem = nixpkgs.lib.genAttrs systems;
pkgsForEach = nixpkgs.legacyPackages; pkgsForEach = nixpkgs.legacyPackages;
in { in {
@ -14,8 +18,10 @@
default = self.nixosModules.eris; default = self.nixosModules.eris;
}; };
packages = forEachSystem (system: { packages = forEachSystem (system: let
eris = pkgsForEach.${system}.callPackage ./nix/package.nix {}; craneLib = crane.mkLib pkgsForEach.${system};
in {
eris = pkgsForEach.${system}.callPackage ./nix/package.nix {inherit craneLib;};
default = self.packages.${system}.eris; default = self.packages.${system}.eris;
}); });

View file

@ -1,39 +1,43 @@
{ {
lib, lib,
rustPlatform, craneLib,
}: let }: let
fs = lib.fileset;
lockfile = ../Cargo.lock;
cargoToml = ../Cargo.toml;
in
rustPlatform.buildRustPackage {
pname = "eris"; pname = "eris";
version = "0.0.1"; inherit ((lib.importTOML ../Cargo.toml).package) version;
src = let src = let
fs = lib.fileset;
s = ../.; s = ../.;
in in
fs.toSource { fs.toSource {
root = s; root = s;
fileset = fs.unions [ fileset = fs.unions [
(fs.fileFilter (file: builtins.any file.hasExt ["rs"]) (s + /src)) (fs.fileFilter (file: builtins.any file.hasExt ["rs"]) (s + /src))
(s + /contrib) (s + /Cargo.lock)
lockfile (s + /Cargo.toml)
cargoToml
]; ];
}; };
cargoArtifacts = craneLib.buildDepsOnly {
name = "${pname}-deps";
strictDeps = true;
inherit src;
};
in
craneLib.buildPackage {
inherit pname src version cargoArtifacts;
strictDeps = true;
postInstall = '' postInstall = ''
mkdir -p $out/share/contrib mkdir -p $out/share/contrib
cp -rv $src/contrib/corpus $out/share/contrib cp -rv $src/contrib/corpus $out/share/contrib
cp -rv $src/contrib/lua $out/share/contrib cp -rv $src/contrib/lua $out/share/contrib
''; '';
cargoLock.lockFile = lockfile;
meta = { meta = {
description = "Sophisticated HTTP tarpit and honeypot stream"; description = "Sophisticated HTTP tarpit and honeypot stream";
homepage = "https://git.frzn.dev/NotAShelf/eris";
maintainers = [lib.maintainers.NotAShelf];
mainProgram = "eris"; mainProgram = "eris";
}; };
} }

View file

@ -1,28 +1,26 @@
{ {
mkShell, mkShell,
rust-analyzer, rustc,
cargo,
rustfmt, rustfmt,
clippy, clippy,
cargo, taplo,
gcc, rust-analyzer-unwrapped,
openssl, rustPlatform,
pkg-config,
rustc,
}: }:
mkShell { mkShell {
name = "eris"; name = "rust";
packages = [ packages = [
rust-analyzer rustc
rustfmt cargo
(rustfmt.override {asNightly = true;})
clippy clippy
cargo cargo
gcc taplo
clippy rust-analyzer-unwrapped
rustfmt
rustc
# For TLS and friends
openssl
pkg-config
]; ];
RUST_SRC_PATH = "${rustPlatform.rustLibSrc}";
} }

View file

@ -149,6 +149,8 @@ impl Default for Config {
"/config".to_string(), "/config".to_string(),
"/api/".to_string(), "/api/".to_string(),
"/actuator/".to_string(), "/actuator/".to_string(),
"/search/feedback".to_string(),
"/wp-json/v1/u".to_string(),
], ],
whitelist_networks: vec![ whitelist_networks: vec![
"192.168.0.0/16".to_string(), "192.168.0.0/16".to_string(),