aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJochen Neumeister <joneum@FreeBSD.org>2026-03-29 18:43:58 +0000
committerJochen Neumeister <joneum@FreeBSD.org>2026-03-29 18:45:33 +0000
commit7bfb425f9fcd797cec8db14d608c5bea4c5c0146 (patch)
tree7a7badfa9974f0b8509c792bfd973983e294d562
parent4c5902886dab47114a9c96b1f7d5e148ed02bb88 (diff)
www/zoraxy: Add new port
www/zoraxy: Add Zoraxy reverse proxy Zoraxy is a general-purpose HTTP reverse proxy and forwarding tool written in Go. It provides a web-based interface for managing reverse proxy rules, routing, and access control. Features: - Web-based management interface - Reverse proxy and forwarding capabilities - Plugin support - Lightweight and self-contained (no external web server required) WWW: https://github.com/tobychui/zoraxy Sponsored by: Netzkommune GmbH
-rw-r--r--GIDs2
-rw-r--r--UIDs2
-rw-r--r--www/Makefile1
-rw-r--r--www/zoraxy/Makefile36
-rw-r--r--www/zoraxy/distinfo5
-rw-r--r--www/zoraxy/files/pkg-message.in26
-rw-r--r--www/zoraxy/files/zoraxy.in74
-rw-r--r--www/zoraxy/pkg-descr11
-rw-r--r--www/zoraxy/pkg-plist5
9 files changed, 160 insertions, 2 deletions
diff --git a/GIDs b/GIDs
index 4c53aba98efa..17de833c18ed 100644
--- a/GIDs
+++ b/GIDs
@@ -326,7 +326,7 @@ _tlsrpt:*:382:
cascade:*:383:
omada:*:384:
mtail:*:385:
-# free: 386
+zoraxy:*:386:
# free: 387
autopulse:*:388:
ldap:*:389:
diff --git a/UIDs b/UIDs
index 88b01b3c0327..b09dd1f16156 100644
--- a/UIDs
+++ b/UIDs
@@ -332,7 +332,7 @@ _tlsrpt:*:382:382::0:0:TLSRPT Daemon:/nonexistent:/usr/sbin/nologin
cascade:*:383:383::0:0:Cascade Daemon:/var/db/cascade:/usr/sbin/nologin
omada:*:384:384::0:0:Omada Wireless Controller:/nonexistent:/usr/sbin/nologin
mtail:*:385:385::0:0:mtail:/nonexistent:/usr/sbin/nologin
-# free: 386
+zoraxy:*:386:386::0:0:Zoraxy Service:/nonexistent:/usr/sbin/nologin
# free: 387
autopulse:*:388:388::0:0:Autopulse Daemon:/nonexistent:/usr/sbin/nologin
ldap:*:389:389::0:0:OpenLDAP Server:/nonexistent:/usr/sbin/nologin
diff --git a/www/Makefile b/www/Makefile
index f8c1d45deb72..1dca900bfeff 100644
--- a/www/Makefile
+++ b/www/Makefile
@@ -2744,5 +2744,6 @@
SUBDIR += zine-ssg
SUBDIR += zgrab2
SUBDIR += zola
+ SUBDIR += zoraxy
.include <bsd.port.subdir.mk>
diff --git a/www/zoraxy/Makefile b/www/zoraxy/Makefile
new file mode 100644
index 000000000000..fe022c351320
--- /dev/null
+++ b/www/zoraxy/Makefile
@@ -0,0 +1,36 @@
+PORTNAME= zoraxy
+DISTVERSIONPREFIX= v
+DISTVERSION= 3.3.2
+CATEGORIES= www
+
+MAINTAINER= joneum@bsd-mail.org
+COMMENT= General purpose HTTP reverse proxy and forwarding tool
+WWW= https://github.com/tobychui/zoraxy
+
+LICENSE= AGPLv3
+LICENSE_FILE= ${WRKSRC:H}/LICENSE
+
+USES= go:1.24+,modules
+USE_GITHUB= yes
+GH_ACCOUNT= tobychui
+GH_PROJECT= zoraxy
+
+WRKSRC_SUBDIR= src
+
+GO_MODULE= imuslab.com/zoraxy
+GO_MOD_DIST= github
+GO_TARGET= .
+
+USERS= zoraxy
+GROUPS= zoraxy
+
+USE_RC_SUBR= zoraxy
+SUB_FILES= pkg-message
+
+post-install:
+ @${MKDIR} ${STAGEDIR}${PREFIX}/etc/zoraxy
+ @${MKDIR} ${STAGEDIR}/var/db/zoraxy
+ @${MKDIR} ${STAGEDIR}${PREFIX}/share/zoraxy/plugins
+ @${MKDIR} ${STAGEDIR}${PREFIX}/share/zoraxy/www
+
+.include <bsd.port.mk>
diff --git a/www/zoraxy/distinfo b/www/zoraxy/distinfo
new file mode 100644
index 000000000000..b96b25b03c3d
--- /dev/null
+++ b/www/zoraxy/distinfo
@@ -0,0 +1,5 @@
+TIMESTAMP = 1774736137
+SHA256 (go/www_zoraxy/tobychui-zoraxy-v3.3.2_GH0/go.mod) = 7c737157a18695e00430d98876c35c01c4cad5e5a55c846b1f035608653d04a2
+SIZE (go/www_zoraxy/tobychui-zoraxy-v3.3.2_GH0/go.mod) = 11935
+SHA256 (go/www_zoraxy/tobychui-zoraxy-v3.3.2_GH0/tobychui-zoraxy-v3.3.2_GH0.tar.gz) = 1208f2c3b1a7c4a5fa093d58a84653d4ab6e102909576240889330d8d0ea54d0
+SIZE (go/www_zoraxy/tobychui-zoraxy-v3.3.2_GH0/tobychui-zoraxy-v3.3.2_GH0.tar.gz) = 49204674
diff --git a/www/zoraxy/files/pkg-message.in b/www/zoraxy/files/pkg-message.in
new file mode 100644
index 000000000000..1c99641f93ab
--- /dev/null
+++ b/www/zoraxy/files/pkg-message.in
@@ -0,0 +1,26 @@
+Zoraxy has been installed.
+
+To enable Zoraxy at boot, add the following to /etc/rc.conf:
+
+ zoraxy_enable="YES"
+
+Start the service with:
+
+ service zoraxy start
+
+By default, Zoraxy listens on:
+
+ http://localhost:8000/
+
+From another machine on the network, use:
+
+ http://<your-ip>:8000/
+
+On first startup, open the web interface and complete the initial
+administrator account setup.
+
+Optional rc.conf settings:
+
+ zoraxy_user="zoraxy"
+ zoraxy_group="zoraxy"
+ zoraxy_port=":8000"
diff --git a/www/zoraxy/files/zoraxy.in b/www/zoraxy/files/zoraxy.in
new file mode 100644
index 000000000000..6dea1a506080
--- /dev/null
+++ b/www/zoraxy/files/zoraxy.in
@@ -0,0 +1,74 @@
+#!/bin/sh
+
+# PROVIDE: zoraxy
+# REQUIRE: LOGIN NETWORKING
+# KEYWORD: shutdown
+
+. /etc/rc.subr
+
+name="zoraxy"
+rcvar="zoraxy_enable"
+
+load_rc_config $name
+
+: ${zoraxy_enable:="NO"}
+: ${zoraxy_user:="zoraxy"}
+: ${zoraxy_group:="zoraxy"}
+: ${zoraxy_port:=":8000"}
+: ${zoraxy_conf:="%%PREFIX%%/etc/zoraxy"}
+: ${zoraxy_dbdir:="/var/db/zoraxy"}
+: ${zoraxy_plugindir:="%%PREFIX%%/share/zoraxy/plugins"}
+: ${zoraxy_webroot:="%%PREFIX%%/share/zoraxy/www"}
+: ${zoraxy_flags:=""}
+
+pidfile="/var/run/${name}.pid"
+command="/usr/sbin/daemon"
+procname="%%PREFIX%%/bin/zoraxy"
+
+required_files="${procname}"
+
+start_precmd="${name}_prestart"
+stop_postcmd="${name}_poststop"
+status_cmd="${name}_status"
+
+zoraxy_prestart()
+{
+ install -d -o "${zoraxy_user}" -g "${zoraxy_group}" "${zoraxy_conf}"
+ install -d -o "${zoraxy_user}" -g "${zoraxy_group}" "${zoraxy_dbdir}"
+ install -d -o "${zoraxy_user}" -g "${zoraxy_group}" "${zoraxy_plugindir}"
+ install -d -o "${zoraxy_user}" -g "${zoraxy_group}" "${zoraxy_webroot}"
+
+ if [ ! -f "${zoraxy_dbdir}/sys.uuid" ]; then
+ /usr/bin/uuidgen > "${zoraxy_dbdir}/sys.uuid"
+ chown "${zoraxy_user}:${zoraxy_group}" "${zoraxy_dbdir}/sys.uuid"
+ chmod 0644 "${zoraxy_dbdir}/sys.uuid"
+ fi
+}
+
+zoraxy_start()
+{
+ echo "Starting ${name}."
+ ${command} -f -p "${pidfile}" -u "${zoraxy_user}" \
+ /usr/bin/env HOME="${zoraxy_dbdir}" \
+ /bin/sh -c "cd '${zoraxy_dbdir}' && exec '${procname}' -port='${zoraxy_port}' ${zoraxy_flags}"
+}
+
+zoraxy_poststop()
+{
+ rm -f "${pidfile}"
+}
+
+zoraxy_status()
+{
+ if [ -f "${pidfile}" ] && /bin/kill -0 "$(cat "${pidfile}")" 2>/dev/null; then
+ echo "${name} is running as pid $(cat "${pidfile}")."
+ return 0
+ fi
+
+ echo "${name} is not running."
+ return 1
+}
+
+start_cmd="${name}_start"
+
+run_rc_command "$1"
diff --git a/www/zoraxy/pkg-descr b/www/zoraxy/pkg-descr
new file mode 100644
index 000000000000..34cb0da8305d
--- /dev/null
+++ b/www/zoraxy/pkg-descr
@@ -0,0 +1,11 @@
+Zoraxy is a general purpose HTTP reverse proxy and forwarding tool written in Go.
+
+Features include:
+- reverse proxy with HTTP/2
+- redirection rules
+- TLS/SSL and ACME support
+- stream proxy for TCP and UDP
+- access control features
+- integrated uptime monitoring
+
+This package installs Zoraxy as a native FreeBSD service.
diff --git a/www/zoraxy/pkg-plist b/www/zoraxy/pkg-plist
new file mode 100644
index 000000000000..3f22278566ca
--- /dev/null
+++ b/www/zoraxy/pkg-plist
@@ -0,0 +1,5 @@
+bin/zoraxy
+@dir etc/zoraxy
+@dir /var/db/zoraxy
+@dir share/zoraxy/plugins
+@dir share/zoraxy/www