Setting Proxys In BASH

Posted By Weston Ganger

I had some issues when setting up proxies for my commands in linux.

So there are three variables you need to set are http_proxy, https_proxy, and ftp_proxy right?

Turns out some applications(I think curl was one of them) dont look for those variables, instead it looks for HTTP_PROXY, HTTPS_PROXY, and FTP_PROXY. Arggg!

So make sure you set all 6 variables in your .bash_profile or .bashrc then things might be easier for you, but I find proxies are a pain no matter what.

export http_proxy=""
export https_proxy=""
export ftp_proxy="htp://"
export HTTP_PROXY=$http_proxy
export HTTPS_PROXY=$https_proxy
export FTP_PROXY=$ftp_proxy

Article Topic:Software Development - Linux

Date:September 23, 2015