-# $OpenBSD: multiplex.sh,v 1.36 2023/03/01 09:29:32 dtucker Exp $
+# $OpenBSD: multiplex.sh,v 1.37 2024/07/19 04:33:36 djm Exp $
# Placed in the Public Domain.
CTL=$OBJ/ctl-sock
fail "environment not found"
fi
-
-verbose "test $tid: transfer"
-rm -f ${COPY}
-trace "ssh transfer over multiplexed connection and check result"
-${SSH} -F $OBJ/ssh_config -S$CTL otherhost cat ${DATA} > ${COPY}
-test -f ${COPY} || fail "ssh -Sctl: failed copy ${DATA}"
-cmp ${DATA} ${COPY} || fail "ssh -Sctl: corrupted copy of ${DATA}"
-
-rm -f ${COPY}
-trace "ssh transfer over multiplexed connection and check result"
-${SSH} -F $OBJ/ssh_config -S $CTL otherhost cat ${DATA} > ${COPY}
-test -f ${COPY} || fail "ssh -S ctl: failed copy ${DATA}"
-cmp ${DATA} ${COPY} || fail "ssh -S ctl: corrupted copy of ${DATA}"
+for mode in "" "-Oproxy"; do
+ verbose "test $tid: transfer $mode"
+ rm -f ${COPY}
+ trace "ssh transfer over $mode multiplexed connection and check result"
+ ${SSH} $mode -F $OBJ/ssh_config -S$CTL otherhost cat ${DATA} > ${COPY}
+ test -f ${COPY} || fail "ssh -Sctl: failed copy ${DATA}"
+ cmp ${DATA} ${COPY} || fail "ssh -Sctl: corrupted copy of ${DATA}"
+
+ rm -f ${COPY}
+ trace "ssh transfer over $mode multiplexed connection and check result"
+ ${SSH} $mode -F $OBJ/ssh_config -S $CTL otherhost cat ${DATA} > ${COPY}
+ test -f ${COPY} || fail "ssh -S ctl: failed copy ${DATA}"
+ cmp ${DATA} ${COPY} || fail "ssh -S ctl: corrupted copy of ${DATA}"
+done
rm -f ${COPY}
trace "sftp transfer over multiplexed connection and check result"