git: bf6603e6137a - main - www/go-away: New port: Proxy implementing LLM countermeasures

Bruce M Simpson <[email protected]>
Newsgroups gmane.os.freebsd.devel.cvs.ports
Message-ID <[email protected]>
The branch main has been updated by bms:

URL: https://cgit.FreeBSD.org/ports/commit/?id=bf6603e6137a8824248a2438a086c754141810aa

commit bf6603e6137a8824248a2438a086c754141810aa
Author:     Bruce M Simpson <[email protected]>
AuthorDate: 2026-08-14 11:19:40 +0000
Commit:     Bruce M Simpson <[email protected]>
CommitDate: 2026-08-14 12:56:50 +0000

    www/go-away: New port: Proxy implementing LLM countermeasures
    
    Approved by:    fuz
    PR:             297524
---
 www/Makefile                 |  1 +
 www/go-away/Makefile         | 39 +++++++++++++++++++++++++++++
 www/go-away/distinfo         |  5 ++++
 www/go-away/files/go_away.in | 59 ++++++++++++++++++++++++++++++++++++++++++++
 www/go-away/pkg-descr        | 10 ++++++++
 www/go-away/pkg-message      | 18 ++++++++++++++
 6 files changed, 132 insertions(+)

diff --git a/www/Makefile b/www/Makefile
index ba573462e444..c804b26affb2 100644
--- a/www/Makefile
+++ b/www/Makefile
@@ -249,6 +249,7 @@
     SUBDIR += glpi
     SUBDIR += gnome-user-share
     SUBDIR += go-anubis
+    SUBDIR += go-away
     SUBDIR += go-www
     SUBDIR += gobuffalo
     SUBDIR += gohugo
diff --git a/www/go-away/Makefile b/www/go-away/Makefile
new file mode 100644
index 000000000000..c1c5e1a85a14
--- /dev/null
+++ b/www/go-away/Makefile
@@ -0,0 +1,39 @@
+PORTNAME=	go-away
+DISTVERSIONPREFIX=	v
+DISTVERSION=	0.7.0
+CATEGORIES=	www security
+MASTER_SITES=	https://git.gammaspectra.live/git/${PORTNAME}/archive/
+DISTFILES=	${DISTVERSIONFULL}${EXTRACT_SUFX}
+DIST_SUBDIR=	${PORTNAME}
+
+MAINTAINER=	[email protected]
+COMMENT=	Proxy implementing countermeasures for unwanted LLM training
+WWW=		https://git.gammaspectra.live/git/go-away
+
+LICENSE=	MIT
+LICENSE_FILE=	${WRKSRC}/LICENSE
+
+USES=		go:modules
+USE_RC_SUBR=	go_away
+
+PORTEXAMPLES=	*
+
+OPTIONS_DEFINE=	EXAMPLES
+
+SUB_LIST=	DEFAULT_USER="www"
+
+GO_MODULE=	git.gammaspectra.live/git/go-away
+GO_MOD_DIST=	https://git.gammaspectra.live/git/${PORTNAME}/raw/tag/${DISTVERSIONFULL}/
+GO_TARGET=	./cmd/go-away
+
+WRKSRC=		${WRKDIR}/${PORTNAME}
+
+PLIST_FILES=	bin/go-away
+
+do-install-EXAMPLES-on:
+	@${MKDIR} ${STAGEDIR}${EXAMPLESDIR} ${STAGEDIR}${EXAMPLESDIR}/snippets
+	${INSTALL_DATA} ${WRKSRC}/examples/*.yml ${STAGEDIR}${EXAMPLESDIR}
+	${INSTALL_DATA} ${WRKSRC}/examples/snippets/* \
+		${STAGEDIR}${EXAMPLESDIR}/snippets
+
+.include <bsd.port.mk>
diff --git a/www/go-away/distinfo b/www/go-away/distinfo
new file mode 100644
index 000000000000..1d843b339ff7
--- /dev/null
+++ b/www/go-away/distinfo
@@ -0,0 +1,5 @@
+TIMESTAMP = 1786708259
+SHA256 (go/www_go-away/go-away-v0.7.0/v0.7.0.tar.gz) = 1c330c0fa07aaf59011710c8bbc64d93f5a4a828cc6899ea42edb02fa4fe323e
+SIZE (go/www_go-away/go-away-v0.7.0/v0.7.0.tar.gz) = 358863
+SHA256 (go/www_go-away/go-away-v0.7.0/go.mod) = f6595671bfe56462f4db4decf085bc5e55444ae478f5a2a3d350d2406c02b05f
+SIZE (go/www_go-away/go-away-v0.7.0/go.mod) = 1556
diff --git a/www/go-away/files/go_away.in b/www/go-away/files/go_away.in
new file mode 100644
index 000000000000..8a88876a207b
--- /dev/null
+++ b/www/go-away/files/go_away.in
@@ -0,0 +1,59 @@
+#!/bin/sh
+#
+# PROVIDE: go_away
+# REQUIRE: NETWORKING mountall quota
+#
+# Add the following lines to /etc/rc.conf.local or /etc/rc.conf
+# to enable this service:
+#
+# go_away_enable (bool):	Set to "NO" by default.
+#				Set it to "YES" to enable go-away.
+# go_away_user   (user):	Set user to run go_away.
+#				Default is "%%DEFAULT_USER%%".
+# go_away_flags  (str):		Mandatory site-specific arguments.
+#
+# Flags are documented at:
+# https://git.gammaspectra.live/git/go-away/wiki/Installation#command-line-usage
+#
+
+. /etc/rc.subr
+
+name="go_away"
+rcvar="go_away_enable"
+desc="Proxy implementing countermeasures for unwanted LLM training"
+
+load_rc_config $name
+
+: ${go_away_enable="NO"}
+: ${go_away_command:="%%PREFIX%%/bin/go-away"}
+: ${go_away_user="%%DEFAULT_USER%%"}
+: ${go_away_flags=""}
+
+pidfile="/var/run/${name}.pid"
+
+start_cmd="${name}_start"
+stop_cmd="${name}_stop"
+restart_cmd="${name}_restart"
+
+go_away_start() {
+    echo "Starting ${name}."
+    /usr/sbin/daemon -p ${pidfile} -c -u ${go_away_user} -S -T ${name} -f ${go_away_command} ${go_away_flags}
+}
+
+go_away_stop() {
+    echo "Stopping ${name}."
+    if [ -e "${pidfile}" ]; then
+        kill -s TERM `cat ${pidfile}`
+        rm -f ${pidfile}
+    else
+        echo "${name} is not running."
+    fi
+}
+
+go_away_restart() {
+    ${name}_stop
+    sleep 2
+    ${name}_start
+}
+
+run_rc_command "$1"
diff --git a/www/go-away/pkg-descr b/www/go-away/pkg-descr
new file mode 100644
index 000000000000..df6ff593a428
--- /dev/null
+++ b/www/go-away/pkg-descr
@@ -0,0 +1,10 @@
+Self-hosted abuse detection and rule enforcement against low-effort
+mass AI scraping and bots. Uses conventional non-nuclear options.
+go-away sits in between your site and the Internet / upstream proxy.
+
+Incoming requests can be selected by rules to be actioned or
+challenged to filter suspicious requests.
+
+The tool is designed [to be] highly flexible so the operator can minimize
+impact to [legitimate] users, while surgically targeting heavy endpoints
+or scrapers.
diff --git a/www/go-away/pkg-message b/www/go-away/pkg-message
new file mode 100644
index 000000000000..db424c4c3cd4
--- /dev/null
+++ b/www/go-away/pkg-message
@@ -0,0 +1,18 @@
+[
+{ type: install
+  message: <<EOM
+The go_away_flags rc.conf variable MUST be set appropriately for your site.
+A full list of flags for go-away is documented at:
+https://git.gammaspectra.live/git/go-away/wiki/Installation#command-line-usage
+
+An example for local testing:
+go_away_flags="--slog-level DEBUG --bind :8080 \
+--backend *=http://localhost:3030 \
+--client-ip-header X-Client-Ip \
+--policy ${LOCALBASE}/share/examples/generic.yml \
+--policy-snippets ${LOCALBASE}/share/examples/snippets \
+--challenge-template anubis"
+
+EOM
+}
+]
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.