Mat*_*ttK 48 proxy networking cygwin
我在Microsoft IE环境中,但我想使用cygwin进行一些快速编写脚本的任务.
如何配置它以使用我的Windows代理信息?Ruby gems,ping等都试图建立直接连接.如何让他们尊重IE和Firefox使用的代理信息?
Vla*_*lax 53
如果您需要对代理使用进行身份验证,则仅用于记录:
export http_proxy=http://username:password@host:port/
Run Code Online (Sandbox Code Playgroud)
摘自:http://samueldotj.blogspot.com/2008/06/configuring-cygwin-to-use-proxy-server.html
Bru*_*ine 26
大多数应用程序检查以下环境变量之一(gem 甚至检查两者),因此请尝试将此代码放入.bashrc:
proxy=http://host.com:port/
export http_proxy=$proxy
export HTTP_PROXY=$proxy
Run Code Online (Sandbox Code Playgroud)
我怀疑你的公司防火墙允许PING,但其他人似乎都是http或其他形式的一种形式.在Linux系统上,您可以将HTTP代理设置为环境变量,因此在bash中键入:
export http_proxy=http://www.myproxy.com:3128
Run Code Online (Sandbox Code Playgroud)
FTP(ftp_proxy)有一个类似的环境变量.
如果我只使用 Vlax 和 Mohsen Nosratinia 建议的 ( export http_proxy=http://yourusername:yourpassword@host:port/),它只能为我的公司运行一半的程序(一些安装可以运行,但不是全部)。
通过添加另一行,至少在我的情况下,它将适用于所有人(也许是大多数人)。
export http_proxy=http://yourusername:yourpassword@host:port/
export https_proxy=$http_proxy
Run Code Online (Sandbox Code Playgroud)
| 归档时间: |
|
| 查看次数: |
71607 次 |
| 最近记录: |