From 500b5f40454374a5abe524012736dda894577c1a Mon Sep 17 00:00:00 2001 From: alexz Date: Mon, 29 Dec 2025 15:08:45 +0000 Subject: [PATCH] auto-generated commit message --- apps/rego-tunnel/build/Dockerfile | 2 +- apps/rego-tunnel/build/setup-network.sh | 20 ++++++++++++++++++++ 2 files changed, 21 insertions(+), 1 deletion(-) diff --git a/apps/rego-tunnel/build/Dockerfile b/apps/rego-tunnel/build/Dockerfile index 6953022..654ea6c 100755 --- a/apps/rego-tunnel/build/Dockerfile +++ b/apps/rego-tunnel/build/Dockerfile @@ -2,7 +2,7 @@ FROM ubuntu:24.04 ENV DEBIAN_FRONTEND=noninteractive -RUN apt-get update && apt-get install -y qemu-system-x86 qemu-utils novnc websockify openssh-server supervisor iproute2 bridge-utils iptables nano net-tools p7zip-full dnsmasq && rm -rf /var/lib/apt/lists/* +RUN apt-get update && apt-get install -y qemu-system-x86 qemu-utils novnc websockify x11vnc xvfb fluxbox xterm nano oathtool openssh-server supervisor iproute2 bridge-utils iptables nano net-tools p7zip-full dnsmasq && rm -rf /var/lib/apt/lists/* # Setup SSH RUN mkdir /var/run/sshd && echo 'root:vmpassword' | chpasswd && sed -i 's/#PermitRootLogin prohibit-password/PermitRootLogin yes/' /etc/ssh/sshd_config diff --git a/apps/rego-tunnel/build/setup-network.sh b/apps/rego-tunnel/build/setup-network.sh index 8a35fc9..9ef5899 100755 --- a/apps/rego-tunnel/build/setup-network.sh +++ b/apps/rego-tunnel/build/setup-network.sh @@ -23,6 +23,23 @@ TAP2_NAME="${TAP2_NAME:-}" BRIDGE2_CIDR="${BRIDGE2_CIDR:-}" BRIDGE2_UPLINK_IF="${BRIDGE2_UPLINK_IF:-}" + +start_gui() { + mkdir -p /root/.vnc + x11vnc -storepasswd "$VNC_PASSWORD" /root/.vnc/pass >/dev/null 2>&1 || true + rm -f /tmp/.X1-lock /tmp/.X11-unix/X1 2>/dev/null || true + Xvfb "$DISPLAY_ADDR" -screen 0 ${XVFB_WxHxD:-1280x800x24} +extension RANDR & + pids+=($!) + sleep 0.5 + export DISPLAY="$DISPLAY_ADDR" + fluxbox >/tmp/fluxbox.log 2>&1 & + pids+=($!) + x11vnc -display "$DISPLAY_ADDR" -rfbauth /root/.vnc/pass -forever -shared -rfbport 5900 -quiet & + pids+=($!) + websockify --web=/usr/share/novnc/ 0.0.0.0:"$NOVNC_PORT" localhost:5900 >/tmp/websockify.log 2>&1 & + pids+=($!) +} + if [[ "$BRIDGE_CIDR" != */* ]]; then BRIDGE_CIDR="$BRIDGE_CIDR/24" fi @@ -147,3 +164,6 @@ if [ -n "$BRIDGE2_NAME" ] && [ -n "$TAP2_NAME" ]; then echo "Bridge2: $BRIDGE2_NAME${BRIDGE2_CIDR:+ = $BRIDGE2_CIDR}" echo "TAP2: $TAP2_NAME attached to $BRIDGE2_NAME" fi + + +start_gui \ No newline at end of file