BU Web Proxy
Commonly the proxy is set using service specific environmental variables. Here are examples for BU.
/etc/environment
Environment variables can be set system-wide, regardless of the shell used, via /etc/environment. The /etc/environment file is read by pam_env.so during login, so only works with PAM logins. It doesn’t use export or support expanding existing variables, so setting PATH=$PATH:/something will result in the literal string “$PATH” appearing in your PATH.
http_proxy="http://webproxy.bu.edu:8900" https_proxy="http://webproxy.bu.edu:8900" ftp_proxy="http://webproxy.bu.edu:8900" rsync_proxy="http://webproxy.bu.edu:8900" no_proxy="localhost,127.0.0.1,.bu.edu,.ad.bu.edu,128.197.,10."
Bash Environment
export http_proxy="http://webproxy.bu.edu:8900" export https_proxy="http://webproxy.bu.edu:8900" export ftp_proxy="http://webproxy.bu.edu:8900" export rsync_proxy=$http_proxy export no_proxy="localhost,127.0.0.1,.bu.edu,.ad.bu.edu,128.197.,10."
Or all in one line:
export {http,https,ftp,rsync}_proxy="http://webproxy.bu.edu:8900" export no_proxy="localhost,127.0.0.1,.bu.edu,.ad.bu.edu,128.197.,10."
There’s also:
export dns_proxy=$http_proxy
but don’t use it.
You can place these in .bashrc, .profile, /etc/profile, /etc/profile.d/proxy.sh, or whatever fits.
wget
Edit ~/.wgetrc file for personal settings or /etc/wgetrc for system wide settings:
use_proxy=yes http_proxy=webproxy.bu.edu:8900 https_proxy=webproxy.bu.edu:8900 ftp_proxy=webproxy.bu.edu:8900
or via -e options placed after the URL:
wget ... -e use_proxy=yes -e http_proxy=webproxy.bu.edu:8900 ...
cURL
From the command line:
curl -x http://webproxy.bu.edu:8900 -L http://url
yum
You may want to add this line to /etc/yum.conf:
proxy=http://webproxy.bu.edu:8900
apt
You may want to add this line to /etc/apt/apt.conf.d/proxy.conf:
Acquire { HTTP::proxy "http://webproxy.bu.edu:8900"; HTTPS::proxy "http://webproxy.bu.edu:8900"; }
Windows Server 2012/2016
There are 2 proxy setting for Windows. One for the browswer and one for the OS. You can set the proxy for the OS directly with
netsh winhttp set proxy webproxy.bu.edu:8900
or steal it from the browser’s Web Settings:
netsh winhttp import proxy source=ie
You can also bypass the proxy for local sites:
netsh winhttp set proxy proxy-server="webproxy.bu.edu:8900" bypass-list="*.ad.bu.edu;*.bu.edu;localhost"
Also useful:
netsh winhttp reset proxy netsh winhttp show proxy
More reading:
https://parsiya.net/blog/2017-10-08-thick-client-proxying—part-8—notes-on-proxying-windows-services/