How to use cygwin behind a corporate firewall

I am in Microsoft IE, but I want to use cygwin to perform several quick script tasks.

How do I configure it to use my Windows proxy information? Ruby gems, ping, etc. Everyone is trying to make direct connections. How can I make them respect the proxy information used by IE and firefox?

+48
proxy networking cygwin
Oct 13 '08 at 15:06
source share
5 answers

For entries only, if you need to authenticate to use a proxy:

export http_proxy=http://username:password@host:port/ 

Taken from: http://samueldotj.blogspot.com/2008/06/configuring-cygwin-to-use-proxy-server.html

+51
Apr 27 '11 at 16:03
source share

Most applications check one of the following environment variables ( gem even checks both ), so try putting this code in your .bashrc

 proxy=http://host.com:port/ export http_proxy=$proxy export HTTP_PROXY=$proxy 
+26
Oct 13 '08 at 15:15
source share

I doubt your corporate firewall allows PING, but the rest all look like one form of http or the other. On a Linux system, you can set your HTTP proxy as an environment variable, so in bash, type:

 export http_proxy=http://www.myproxy.com:3128 

There is a similar environment variable for FTP (ftp_proxy).

+6
Oct 13 '08 at 15:13
source share

You can also set it for Windows environment variables, and Cygwin will load it at startup (a small bonus: it will also be installed for any command line on Windows).

+4
Jul 04 '13 at 20:23
source share

If I just use what Vlax and Mohsen Nosratinia suggested ( export http_proxy=http://yourusername:yourpassword@host:port/ ), it will work only half of the programs (some of them will work, but not all) for my company .

Adding one more line, it will work for everyone (possibly the majority), at least in my situation.

 export http_proxy=http://yourusername:yourpassword@host:port/ export https_proxy=$http_proxy 
+4
Feb 25 '16 at 17:50
source share



All Articles