+## Examine the peer identifier and work out how to proceed.
+case "$#,$1" in
+ 0,*) echo >&2 "missing peer identifier"; exit 1 ;;
+ *:*) mode=proxy server=${1%:*} user=${1##*:} ;;
+ *) mode=local user=$1 ;;
+esac
+shift
+
+## Fetch the optional command from where SSH stashed it.
+case "$#" in 0) set -- $SSH_ORIGINAL_COMMAND ;; esac
+case "$#,$1" in
+ 0, | 1,hello) act=hello ;;
+ 1,goodbye) act=goodbye ;;
+ *) echo >&2 "$0: unknown action spec \`$*'"; exit 1 ;;
+esac