Skip to content

Instantly share code, notes, and snippets.

@ephemient
Created May 6, 2016 17:04
Show Gist options
  • Save ephemient/168f24101b8119ca4f50d55720f38956 to your computer and use it in GitHub Desktop.
Save ephemient/168f24101b8119ca4f50d55720f38956 to your computer and use it in GitHub Desktop.
#!/bin/bash -ex
PROFILE=$(mktemp -d)
trap 'rm -rf "${PROFILE}"' 0
coproc ssh -Snone -D1080 ${GW:?} 'echo -n 1; cat'
read -r -n 1 -u ${COPROC[0]}
google-chrome-stable --proxy-server=socks5://localhost:1080 --host-resolver-rules='MAP * 0.0.0.0 , exclude localhost' --user-data-dir="${PROFILE}" --no-first-run "$@"
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment