aboutsummaryrefslogtreecommitdiff
path: root/dbx-proxy
blob: 2eae026fb82c78f5f2a586df583d2da182d96b75 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
#!/usr/bin/env bash
# SPDX-License-Identifier: GPL-3.0-only

set -euo pipefail

if [[ $# -ne 1 ]]; then
	echo "ERROR: missing port to proxy" >&2
	exit 1
fi

R="$(dirname "$(realpath "${BASH_SOURCE[0]}")")"
C="dbx"

port="$1"
container start "$C" >/dev/null
exec ssh -F "$R/ssh/config" -L "localhost:$port:localhost:$port" -N $C