Date: Sun, 29 Mar 2026 18:45:42 +0000 From: Jochen Neumeister <joneum@FreeBSD.org> To: ports-committers@FreeBSD.org, dev-commits-ports-all@FreeBSD.org, dev-commits-ports-main@FreeBSD.org Subject: git: 7bfb425f9fcd - main - www/zoraxy: Add new port Message-ID: <69c97356.19c17.6e1ca147@gitrepo.freebsd.org>
index | next in thread | raw e-mail
The branch main has been updated by joneum: URL: https://cgit.FreeBSD.org/ports/commit/?id=7bfb425f9fcd797cec8db14d608c5bea4c5c0146 commit 7bfb425f9fcd797cec8db14d608c5bea4c5c0146 Author: Jochen Neumeister <joneum@FreeBSD.org> AuthorDate: 2026-03-29 18:43:58 +0000 Commit: Jochen Neumeister <joneum@FreeBSD.org> CommitDate: 2026-03-29 18:45:33 +0000 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 --- GIDs | 2 +- UIDs | 2 +- www/Makefile | 1 + www/zoraxy/Makefile | 36 ++++++++++++++++++++ www/zoraxy/distinfo | 5 +++ www/zoraxy/files/pkg-message.in | 26 +++++++++++++++ www/zoraxy/files/zoraxy.in | 74 +++++++++++++++++++++++++++++++++++++++++ www/zoraxy/pkg-descr | 11 ++++++ www/zoraxy/pkg-plist | 5 +++ 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/wwwhome | help
Want to link to this message? Use this
URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?69c97356.19c17.6e1ca147>
