Commit e4fca5f5 authored by Willi Rath's avatar Willi Rath

Add windows tunneling script and sync Linux version

parent 9e32b490
......@@ -45,6 +45,6 @@ tmp_user_data_dir="/tmp/chromium_user_data_$(date +%s%N)"
"${browser}" \
--new-window --no-first-run \
--user-data-dir="${tmp_user_data_dir}" \
--proxy-bypass-list="<-loopback>;${add_proxy_bypass}" \
--proxy-bypass-list="<-loopback>;${add_proxy_bypass}" \
--proxy-server="socks5://localhost:${socks_5_port}" \
${URL}
#!/bin/bash
# check inputs and print USAGE message
if [ $# -lt 1 ]; then
echo "USAGE: " $0 "<tunnel-host> [URL]"
echo "where <tunnel-host> can be of the form user@host."
echo ""
exit
fi
# read tunnel host and print info to screen
tunnel_host=$1
echo will route traffic through ${tunnel_host}
# read URL
URL=$2
# find free port
socks_5_port=54321
echo using port $socks_5_port
# Open socks5 proxy which will close after 15 Seconds if the tunnel is not
# used. Extension of sleep time necessary?
ssh -f -D ${socks_5_port} ${tunnel_host} sleep 60
# cycle through possible browsers
browser=$(
[ -e /c/Program\ Files\ \(x86\)/Google/Chrome/Application/chrome.exe ] \
&& { echo '/c/Program Files (x86)/Google/Chrome/Application/chrome.exe'; return; }
)
# Proxy bypass list (this will make sure certain domains are _not_ contacted
# through the proxy):
add_proxy_bypass=$(
echo {'*.',}{google.,googleapis.}{com,fr,de} '*.gvt1.com' '*.gstatic.com' \
| tr '[:blank:]' '\n' | paste -s -d ';' -)
echo "Won't use proxy for any of:" ${add_proxy_bypass}
"${browser}" \
--new-window --no-first-run \
--proxy-bypass-list="<-loopback>;${add_proxy_bypass}" \
--proxy-server="socks5://localhost:${socks_5_port}" \
${URL}
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment