Add VNC password support via QEMU monitor
Sets VNC password via monitor port 7100 when VNC_PASSWORD env var is set. 🤖 Generated with [Claude Code](https://claude.com/claude-code) Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
This commit is contained in:
@@ -97,6 +97,21 @@ get_container_ip() {
|
||||
|
||||
echo "[rego-tunnel] iptables DNAT rules configured"
|
||||
echo "[rego-tunnel] Port forwarding ready via $CONTAINER_IP"
|
||||
|
||||
# Set VNC password if VNC_PASSWORD env var is set
|
||||
if [[ -n "${VNC_PASSWORD:-}" ]]; then
|
||||
echo "[rego-tunnel] Setting VNC password..."
|
||||
for i in {1..30}; do
|
||||
if nc -z localhost 7100 2>/dev/null; then
|
||||
sleep 2
|
||||
echo "set_password vnc ${VNC_PASSWORD}" | nc -q1 localhost 7100 >/dev/null 2>&1 && \
|
||||
echo "[rego-tunnel] VNC password set successfully" || \
|
||||
echo "[rego-tunnel] Failed to set VNC password"
|
||||
break
|
||||
fi
|
||||
sleep 2
|
||||
done
|
||||
fi
|
||||
) &
|
||||
|
||||
return 0
|
||||
|
||||
Reference in New Issue
Block a user