Files
sshuttle-connect/sshuttle.sh

23 lines
480 B
Bash
Raw Normal View History

2014-11-28 15:40:03 +01:00
#!/bin/bash
cd "$(dirname "$(readlink -f "$0")")"
# Test if config.cfg exists and set needed variables
if [ ! -e config.cfg ]; then echo "Missing config.cfg file. Edit and rename config.cfg.sample"; exit 1; fi
source config.cfg
for ((i = 0; i < ${#SERVER[*]}; i++)); do
echo "$i. ${SERVER[$i]}"
done
read -p "Which SSH-Server to use? " number
if [ $number = 0 ]; then
read -p "Type in server to use: " HOST
else
HOST=${SERVER[$number]}
fi
sshuttle -r $HOST 0.0.0.0/0