1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
|
#!/bin/bash
# Opens google chrome for using a socks5 proxy
# Hoe to opem a SOCKS5 proxy:
# ssh -o ServerAliveInterval=30 -D 3123 user@server.com
CHROME_BIN="/Applications/Google Chrome.app/Contents/MacOS/Google Chrome"
PORT=3123
TMP_PROFILE_DIR="/tmp/proxyed-chrome-profile"
if [ ! -d "$TMP_PROFILE_DIR" ]; then
mkdir "$TMP_PROFILE_DIR"
fi
"$CHROME_BIN" \
--proxy-server="socks5://127.0.0.1:$PORT" \
--user-data-dir="$TMP_PROFILE_DIR" \
--host-resolver-rules="MAP * 0.0.0.0 , EXCLUDE 127.0.0.1"
|