Working Behind a Network Proxy
来源:互联网 发布:冠新软件洪继群 编辑:程序博客网 时间:2024/05/18 17:58
Working Behind a Network Proxy
This page lists some configuration tips for working behind a proxy.
Contents
[hide]- 1 HTTP/HTTPS/FTP Setup
- 2 Git Setup (with socat)
- 3 Git Setup (with nc)
- 4 Subversion Setup
- 5 CVS Setup (this seems useless since we don't have any recipe requiring cvs now)
HTTP/HTTPS/FTP Setup
Set the following environment variables in your ~/.bashrc file. This example uses the same proxy server and port number for all three protocols.
export http_proxy='http://myproxy.example.com:1080/'export https_proxy='https://myproxy.example.com:1080/'export ftp_proxy='http://myproxy.example.com:1080/'export no_proxy = '.example.com'
Git Setup (with socat)
First make sure you have the socat utility installed on your host (in Ubuntu, this should be a simple command "sudo apt-get install socat")
Create a script named git-proxy and put it in /usr/local/bin:
#!/bin/bash# $1 = hostname, $2 = portPROXY=myproxy.example.comexec socat STDIO SOCKS4:$proxy:$1:$2
Then run the following command:
git config --global core.gitProxy git-proxy
Git Setup (with nc)
First make sure you have the netcat utility (nc) installed on your host.
Create a script named git-proxy and put it in /usr/local/bin:
#!/bin/bashPROXY=myproxy.example.comPORT=1080case $1 in # list internal git servers here that you do not want to use # the proxy with, separated by a pipe character '|' as below:internalgit1.example.com|internalgit2.example.com) METHOD="-X connect" ;;*) METHOD="-X 5 -x ${PROXY}:${PORT}" ;;esac/usr/bin/nc $METHOD $*
Note that on some Linux distros, the nc binary is in /bin. You can also change the '5' in the second METHOD line to '4' if your proxy server only supports SOCKS v4.
Then set the environment variable GIT_PROXY_COMMAND in your ~/.bashrc file and point it to this script:
export GIT_PROXY_COMMAND=/usr/local/bin/git-proxyexport GIT_PROXY_IGNORE="example.com"
Subversion Setup
You'll need to have the following in your ~/.subversion/servers file:
[global]http-proxy-exceptions = *.exception.com, www.internal-site.orghttp-proxy-host = myproxy.example.comhttp-proxy-port = 1080
You can also set http-proxy-username and http-proxy-password if your proxy requires authentication.
CVS Setup (this seems useless since we don't have any recipe requiring cvs now)
For CVS checkouts to work correctly, you need to add some options in your Poky local.conf file.
CVS_PROXY_HOST = "myproxy.example.com"CVS_PROXY_PORT = "1080"
https://wiki.yoctoproject.org/wiki/Working_Behind_a_Network_Proxy
- Working Behind a Network Proxy
- Working Behind a Network Proxy
- using pip behind a proxy
- apt-get behind a proxy server
- Using applications behind a corporate proxy
- how to run docker build behind a proxy (docker build host machine behind a proxy)
- Check if you are behind a transparent proxy
- [Atom] Cannot install package behind a proxy on Win7
- nodejs npm 安装报错 无法安装 behind a proxy
- maven https behind proxy
- HOP: A proxy server to enable arbitrary protocols behind an HTTP proxy http://acehack.org/hop
- Support - Unable to register keys or sign a file while behind a proxy server
- Use Watir-WebDriver behind proxy
- Home页提示“If you are behind a proxy, set the proxy_url parameter correctly”
- Salesforce API access from behind proxy
- Using MacPorts behind a firewall
- chromium network proxy setup
- How to use apt-get behind proxy server (Ubuntu/Debian)
- Matcher类
- 垃圾回收器如何工作
- 十条Tips教会你做时间管理
- rational 逆向工程
- 菜单之CCMenu
- Working Behind a Network Proxy
- linux_fdisk命令详解
- java.util.regex
- 25与一个三位数相乘个位是0,与这个三位数相加有且只有1次进位,像这样的三位数总共有多少个?C#实现
- 注册ActiveX控件的几种方法
- CSDN蒋涛钦点的在线作图工具ProcessOn
- Mybatis 代码流程及实现原理解析(三)
- 如何正确利用肢体语言表达自己
- php 服务器实现js合并压缩