From 20cb29c2f8c5c87bc590896854a20b1473ceb358 Mon Sep 17 00:00:00 2001 From: "info@mode42.com" Date: Sat, 8 Aug 2026 03:54:55 +0000 Subject: #2 --- share/cgi/hybbx-telnet.cgi.example | 18 ++++++++++++++++++ 1 file changed, 18 insertions(+) create mode 100644 share/cgi/hybbx-telnet.cgi.example (limited to 'share/cgi/hybbx-telnet.cgi.example') diff --git a/share/cgi/hybbx-telnet.cgi.example b/share/cgi/hybbx-telnet.cgi.example new file mode 100644 index 0000000..ba96ec4 --- /dev/null +++ b/share/cgi/hybbx-telnet.cgi.example @@ -0,0 +1,18 @@ +#!/bin/sh +# Example CGI bridge: hybbx-telnet to local HyBBX (telnet transport). +# Prefer WebSocket + reverse proxy when available — see docs/WEBSOCKET.md. +# +# Install: copy to cgi-bin, chmod +x, set HYBBX_TELNET and paths below. + +HYBBX_TELNET="${HYBBX_TELNET:-/usr/local/hybbx/hybbx-telnet}" +HOST="${HYBBX_HOST:-127.0.0.1}" +PORT="${HYBBX_PORT:-2323}" + +printf 'Content-Type: text/plain; charset=utf-8\r\n\r\n' + +if [ ! -x "$HYBBX_TELNET" ]; then + printf 'hybbx-telnet not found\n' + exit 1 +fi + +exec "$HYBBX_TELNET" -H "$HOST" -p "$PORT" --pace no -- cgit v1.3.1