Last active
November 16, 2020 11:28
-
-
Save paulera/a4d006062757d91d381af4c5df639c81 to your computer and use it in GitHub Desktop.
Opens google chrome in a blank session tunnelled using a socks5 proxy
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/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