How to deal with proxy issues

code
howto
Some hacks working in a corporate envrionment
Author

Zhenglei Gao

Published

August 8, 2024

Note

To be written

In Git

# Set HTTP proxy with authentication
git config --global http.proxy http://username:password@proxy.example.com:8080

# Set HTTPS proxy with authentication
git config --global https.proxy https://username:password@proxy.example.com:8080

Verify Proxy Settings

git config --global --get http.proxy
git config --global --get https.proxy

Unset proxy

git config --global --unset http.proxy
git config --global --unset https.proxy

Setting with usernames and pssds

# Set HTTP proxy with authentication
git config --global http.proxy http://username:password@proxy.example.com:8080

# Set HTTPS proxy with authentication
git config --global https.proxy https://username:password@proxy.example.com:8080

R

Inside R, I modified the .Renviron file within my home directory to adjust the proxy settings.

General

  • show system-wide proxy settings
netsh winhttp show proxy
  • Get user-specific proxy settings
Get-ItemProperty -Path "Registry::HKCU\Software\Microsoft\Windows\CurrentVersion\Internet Settings"

or

reg query "HKEY_CURRENT_USER\Software\Microsoft\Windows\CurrentVersion\Internet Settings"

Useful Resources