adding the chromium-tunnel script

This commit is contained in:
Rodolphe Breard 2016-06-19 17:24:06 +02:00
parent 5e8c8b2db6
commit 7bbb97487f

10
bin/chromium-tunnel Executable file
View file

@ -0,0 +1,10 @@
#!/bin/sh
set -euo pipefail
IFS=$'\n\t'
SOCKS_PORT="1080"
SOCKS_HOST="saturn"
pgrep -f "$SOCKS_PORT $SOCKS_HOST" >/dev/null || ssh -f -N -D "$SOCKS_PORT" "$SOCKS_HOST" >/dev/null 2>&1 &
chromium --proxy-server="socks://localhost:$SOCKS_PORT" >/dev/null 2>&1 &