summaryrefslogtreecommitdiff
path: root/share/cgi/hybbx-telnet.cgi.example
diff options
context:
space:
mode:
authorinfo@mode42.com <info@mode42.com>2026-08-08 03:54:55 +0000
committerinfo@mode42.com <info@mode42.com>2026-08-08 03:54:55 +0000
commit20cb29c2f8c5c87bc590896854a20b1473ceb358 (patch)
tree2857f41513a56ad41af97b57362639298aa7f033 /share/cgi/hybbx-telnet.cgi.example
#2
Diffstat (limited to 'share/cgi/hybbx-telnet.cgi.example')
-rw-r--r--share/cgi/hybbx-telnet.cgi.example18
1 files changed, 18 insertions, 0 deletions
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
git clone -b <branch> https://cgit.mode42.com/<repo>.git
git clone -b <branch> git://cgit.mode42.com/<repo>.git

info@mode42.com