views:

3065

answers:

2

I'm in a Microsoft IE environment, but I want to use cygwin for a number of quick scripting tasks.

How would I configure it to use my windows proxy information? Ruby gems, ping, etc are all trying to make direct connections. How can I get them to respect the proxy information that IE and firefox use?

+3  A: 

I doubt that your corporate firewall allows PING, but the others all appear to be one form of http or another. 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).

Steve Moyer
+9  A: 

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
Bruno De Fraine