Skip to content

Instantly share code, notes, and snippets.

@gingerscallion
Last active January 19, 2022 08:08
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 2 You must be signed in to fork a gist
  • Save gingerscallion/8ba4523f04ec811fc55d9f9324933806 to your computer and use it in GitHub Desktop.
Save gingerscallion/8ba4523f04ec811fc55d9f9324933806 to your computer and use it in GitHub Desktop.
Proxy Settings for WSL2
# WSL2
export hostip=$(cat /etc/resolv.conf | grep nameserver | awk '{ print $2 }')
alias www="https_proxy=\"http://${hostip}:8080\" http_proxy=\"http://${hostip}:8080\""
# or set it global
export hostip=$(cat /etc/resolv.conf | grep nameserver | awk '{ print $2 }')
export https_proxy="http://${hostip}:8080"
export http_proxy="http://${hostip}:8080"
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment