From 7bbb97487feb1511a053d39d22ce48b8c5b44efd Mon Sep 17 00:00:00 2001 From: Rodolphe Breard Date: Sun, 19 Jun 2016 17:24:06 +0200 Subject: [PATCH] adding the chromium-tunnel script --- bin/chromium-tunnel | 10 ++++++++++ 1 file changed, 10 insertions(+) create mode 100755 bin/chromium-tunnel diff --git a/bin/chromium-tunnel b/bin/chromium-tunnel new file mode 100755 index 0000000..71a3aa3 --- /dev/null +++ b/bin/chromium-tunnel @@ -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 &