Skip to content

Commit 944b94d

Browse files
authored
go-away: init at 0.6.0 (#403340)
2 parents 62c51c6 + 912d05f commit 944b94d

File tree

1 file changed

+71
-0
lines changed

1 file changed

+71
-0
lines changed
Lines changed: 71 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,71 @@
1+
{
2+
lib,
3+
buildGoModule,
4+
fetchFromGitea,
5+
6+
# asset compression
7+
brotli,
8+
zopfli,
9+
10+
# wasm compilation
11+
clang,
12+
tinygo,
13+
}:
14+
15+
buildGoModule (finalAttrs: {
16+
pname = "go-away";
17+
version = "0.6.0";
18+
19+
src = fetchFromGitea {
20+
domain = "git.gammaspectra.live";
21+
owner = "git";
22+
repo = "go-away";
23+
tag = "v${finalAttrs.version}";
24+
hash = "sha256-txHS7KljO7t/VoRonsELPo8cELxpaDmQmD24Ta+kPMw=";
25+
};
26+
27+
vendorHash = "sha256-bSIG7m7f/dexJeGbvCLSGCWZNEXXqrUdI1ArZuOBoeA=";
28+
29+
nativeBuildInputs = [
30+
# build-compress.sh
31+
brotli
32+
zopfli
33+
34+
# build-wasm.sh
35+
clang
36+
tinygo
37+
];
38+
39+
postPatch = ''
40+
patchShebangs *.sh
41+
'';
42+
43+
preBuild = ''
44+
./build-compress.sh
45+
46+
# build-wasm.sh
47+
export HOME=$(mktemp -d)
48+
go generate -v ./...
49+
'';
50+
51+
subPackages = [
52+
"cmd/go-away"
53+
];
54+
55+
meta = {
56+
changelog = "https://git.gammaspectra.live/git/go-away/releases/tag/${finalAttrs.src.tag}";
57+
description = "Self-hosted abuse detection and rule enforcement against low-effort mass AI scraping and bots";
58+
longDescription = ''
59+
go-away sits in between your site and the Internet / upstream proxy.
60+
61+
Incoming requests can be selected by rules to be actioned or challenged to filter suspicious requests.
62+
63+
The tool is designed highly flexible so the operator can minimize impact to legit users, while surgically targeting heavy endpoints or scrapers.
64+
65+
Challenges can be transparent (not shown to user, depends on backend or other logic), non-JavaScript (challenges common browser properties), or custom JavaScript (from Proof of Work to fingerprinting or Captcha is supported)
66+
'';
67+
homepage = "https://git.gammaspectra.live/git/go-away";
68+
license = lib.licenses.mit;
69+
maintainers = with lib.maintainers; [ hexa ];
70+
};
71+
})

0 commit comments

Comments
 (0)