#!/bin/sh
set -eu

exec ssh \
  -i /root/.ssh/id_rsa \
  -o IdentitiesOnly=yes \
  -o BatchMode=yes \
  -o StrictHostKeyChecking=accept-new \
  -o UserKnownHostsFile=/root/.ssh/known_hosts \
  -o ConnectTimeout=15 \
  -o ServerAliveInterval=5 \
  -o ServerAliveCountMax=1 \
  -o "ProxyCommand=node /etc/unidesk-cicd-branch-follower/github-proxy-connect.mjs ${UNIDESK_CONTROLLER_GITHUB_PROXY_HOST} ${UNIDESK_CONTROLLER_GITHUB_PROXY_PORT} %h %p" \
  "$@"
