Skip to content

Instantly share code, notes, and snippets.

@paulera
Last active November 16, 2020 11:28
Show Gist options
  • Save paulera/a4d006062757d91d381af4c5df639c81 to your computer and use it in GitHub Desktop.
Save paulera/a4d006062757d91d381af4c5df639c81 to your computer and use it in GitHub Desktop.
Opens google chrome in a blank session tunnelled using a socks5 proxy
#!/bin/bash
# Opens google chrome for using a socks5 proxy
# Hoe to opem a SOCKS5 proxy:
# ssh -o ServerAliveInterval=30 -D 3123 [email protected]
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"
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment