Commit 2abb63d1 authored by Willi Rath's avatar Willi Rath

Merge branch '14-add-tunneling-from-windows' into 'master'

Resolve "Generalize tunneling script"

Closes #14

See merge request !31
parents 9e32b490 e50dccb1
......@@ -135,6 +135,13 @@ And run it to connect to ``:
Note that these steps will only work, if `` (or whatever the real address of the remote computer) is a known host in `.ssh/known_hosts`. (To test this, simply create an SSH connection to ``, if it is not yet a known host, you will be asked whether to continue and if you do, `` will be added to `.ssh/known_hosts`.)
### Wrapped in a script on Windows
First, make sure to have `Git bash` installed. You can obtain it by installing <>. (Note that you don't really need Git for all the following, but we'll use it to get a fully functional Bash on Windows.)
Then, follow the steps above but replace `` by ``.
## Appendix: Trouble Shooting
- If you get `ImportError: [...]: version GLIBC_[...] not found` errors on relatively old machines, make sure to priorize the `defaults` channel over `conda-forge`. This is done by specifying `-c defaults` **before** `-c conda-forge` in `conda install` or `conda create` commands.
......@@ -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}" \
# 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 ""
# read tunnel host and print info to screen
echo will route traffic through ${tunnel_host}
# read URL
# find free port
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
[ -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):
echo {'*.',}{google.,googleapis.}{com,fr,de} '*' '*' \
| 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}" \
Markdown is supported
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment