Skip to content

Instantly share code, notes, and snippets.

@h1romas4
Last active October 9, 2019 05:14
Show Gist options
  • Save h1romas4/266a50a33f9d86d4b942f21d8f47bf04 to your computer and use it in GitHub Desktop.
Save h1romas4/266a50a33f9d86d4b942f21d8f47bf04 to your computer and use it in GitHub Desktop.
WSL proxy settings
# for curl
echo 'proxy = "http://example.com:8080"' > ~/.curlrc
# for wget
echo 'http_proxy=http://example.com:8080' >> ~/.wgetrc
echo 'https_proxy=http://example.com:8080' >> ~/.wgetrc
# for other (include nodejs/pip)
echo 'export HTTP_PROXY="http://example.com:8080"' >> ~/.bashrc
echo 'export HTTPS_PROXY_="${HTTP_PROXY}"' >> ~/.bashrc
# for apt
sudo echo 'Acquire::http::proxy "http://example.com:8080";' >> /etc/apt/apt.conf
sudo echo 'Acquire::https::proxy "http://example.com:8080";' >> /etc/apt/apt.conf
# for jvm (optional)
export JAVA_OPTS=-DproxyHost=example.com -DproxyPort=8080
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment