#!/bin/sh # Nico Schottelius, 2026-05-26 if [ $# -ne 1 ] ; then echo $0 hostname.ra.placeX.ungleich.ch exit 1 fi target_host=$1; shift case $target_host in *.ra.place10.ungleich.ch) jump="vigir26.place10.ungleich.ch" #jump="vigir26.place10.ungleich.ch vigir23.place10.ungleich.ch" ;; *) echo "Unsupported RA access" >&2 exit 1 esac set -x if ! docker ps --format '{{.Names}}' | grep -q "^old-firefox$"; then echo "Starting old firefox in docker in background" docker run -ti --rm --net=host --name old-firefox -d \ -v ~/.old-firefox:/root/.mozilla ungleich/firefox-java-vnc else echo "Old firefox already running" fi echo "Trying to create socks proxy on localhost:3133 (might fail if running already)" for jhost in $jump; do if ping -c2 $jhost; then ssh -D 3133 -f -N -T root@$jhost if [ $? -eq 0 ]; then break; fi fi done docker exec -d old-firefox firefox $target_host vncviewer localhost:0 cat <