Skip to content

Instantly share code, notes, and snippets.

@WanghongLin
Last active August 29, 2015 14:13
Show Gist options
  • Save WanghongLin/ccc97f80bc745624709f to your computer and use it in GitHub Desktop.
Save WanghongLin/ccc97f80bc745624709f to your computer and use it in GitHub Desktop.
Proxy configuration collections

A collection usage of proxy with different commandline tools in Linux

  • gradle

The command gradlew is wrapper of jar file, the proxy setting is the same with the standard Java proxy setting.

./gradlew -DsocksProxyHost=127.0.0.1 -DsocksProxyPort=5000 tasks
  • hg
hg --config http_proxy.host=[proxy_ip]:[proxy_port] --config http_proxy.user=[username] --config http_proxy.passwd=[password]
  • git
git clone http://remote_repository --config="http.proxy=192.168.1.102:8081"
# if you want to change the proxy of existing project, do as follow
git config --local --add http.proxy 192.168.1.102:8081
  • svn
svn checkout http://remote_repository --config-option servers:global:http-proxy-host=192.168.1.102 --config-option servers:global:http-proxy-port=8081
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment