#!/bin/bash #PROF="qprof -i 1000" STUNNEL="/usr/local/sbin/stunnel" $PROF $STUNNEL -fd 10 10<cli.log & foreground=yes debug=7 pid= [s1] ciphers=DES-CBC3-SHA client=yes accept=50000 connect=50001 EOT CLIPID=$! $PROF $STUNNEL -fd 10 10<srv.log & foreground=yes debug=7 pid= [s2] session=1 accept=50001 connect=discard EOT SRVPID=$! sleep 1 dd if=/dev/zero bs=1000k count=1k | nc -q 0 localhost 50000 disown -a kill $CLIPID $SRVPID wait