Skip to content

Instantly share code, notes, and snippets.

@rosuH
Forked from gingerscallion/.zshrc
Created February 23, 2021 09:48
Show Gist options
  • Save rosuH/5820995ab0838ad5fba41ce466c044b2 to your computer and use it in GitHub Desktop.
Save rosuH/5820995ab0838ad5fba41ce466c044b2 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