Speed up your internet connection in China
As a developer, you love fast internet connection, right? But here in China lots international services are slow, here is what you can do to make your life easier:
Why? It's faster than VPN. It's recommended to install Shadowsocks server on your VPS. Refer to wiki to learn about how to set up the servers and clients.
SoftEther for VPN
Sometimes Shadowsocks doesn't work, for example, I found Firebase iOS SDK doesn't work behind Shadowsocks proxy. Since I only use VPN once in a while, I don't want to pay a monthly fee for a VPN service. After tried various ways, SoftEther works for me.
Set Shadowsocks proxy for Git to speed up your Git.
Execute the commands in：
git config --global https.proxy socks5://127.0.0.1:1080 git config --global https.proxy socks5://127.0.0.1:1080
Or add this in
[http] proxy = socks5://127.0.0.1:1080 [https] proxy = socks5://127.0.0.1:1080
You can also set environment variables to disable the proxy for some urls:
Use ProxyChains-NG for command-line tools to use Shadowsocks proxy, such as curl, wget, git.
brew install proxychains-ng
Use mirrors servers for package managers
The default servers for various package managers are slow in China, you need to switch to domestic ones.
git config --global url."https://mirrors.tuna.tsinghua.edu.cn/git/CocoaPods/Specs".insteadOf "https://github.com/CocoaPods/Specs"
gem sources --add https://gems.ruby-china.org/ --remove https://rubygems.org/
[global] trusted-host = mirrors.aliyun.com index-url = http://mirrors.aliyun.com/pypi/simple
npm install -g cnpm --registry=https://registry.npm.taobao.org