Last active
January 19, 2022 08:08
-
-
Save gingerscallion/8ba4523f04ec811fc55d9f9324933806 to your computer and use it in GitHub Desktop.
Proxy Settings for WSL2
This file contains 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
# 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