2011-10-21 16 views
6

如何設置apt-cyg,http和socks的代理? 我試過使用如何設置apt-cyg的代理?

export http_proxy= 

但它沒有工作。

+0

+1帶來的apt-CYG我注意 – sehe

+0

我不知道cygwin,但你嘗試了代理鏈或tsocks嗎?您是否嘗試在wgetrc中添加apt-cyg應該使用的代理設置?如果apt-cyg的本質只是bash,你可能會破解它。 – MeaCulpa

回答

0

我不知道有關Cygwin的,但這些都是從我的〜/ .bashrc

export http_proxy=http://[user]:[passwd]@[proxy.foo.com]:[portnumber] 
export https_proxy=http://[user]:[passwd]@[proxy.foo.com]:[portnumber] 
export HTTP_PROXY=http://[user]:[passwd]@[proxy.foo.com]:[portnumber] 
export HTTPS_PROXY=http://[user]:[passwd]@[proxy.foo.com]:[portnumber] 

如果cygwin的類似打壞,它應該工作的線。

8

這應該工作:

export ftp_proxy=http://[user]:[passwd]@[proxy.foo.com]:[portnumber] 
+0

從今天起,這是一個合適的答案。 'apt-cyg'使用ftp來下載軟件包。 – Kosiek

1

我把它通過設置兩個Windows環境變量的工作:http_proxy和HTTP_PROXY。我以前有HTTP_PROXY,但沒有拿起。

請注意,由於Cygwin是一個Windows進程,在設置了新的環境變量之後,您需要啓動一個新的Cygwin進程來獲取更改。

0

您還可以添加這一切在同一行(它運作良好的Cygwin /易於得到嵌入mobaxterm - 將它添加到.bashrc中):

export {ftp,http,https}_proxy=http://[user]:[passwd]@[proxy.foo.com]:[port] 
0

老問題,但沒有答案似乎對。

從我可以告訴想取消設置代理上的我的箱子一個運行它,我得到這個錯誤:wget的:無法解析主機地址「webproxystatic-mywork.com」

看起來容易-cyg使用wget。因此,這給你帶來了這個問題:setting proxy in wget

答案這是: 集(或在我的情況下,未設置)http_proxy/https_proxy/etc/wgetrc

# You can set the default proxies for Wget to use for http, https, and ftp. 
# They will override the value in the environment. 
#https_proxy = http://proxy.yoyodyne.com:18023/ 
#http_proxy = http://proxy.yoyodyne.com:18023/ 
#ftp_proxy = http://proxy.yoyodyne.com:18023/ 

# If you do not want to use proxy at all, set this to off. 
#use_proxy = on