Living inside of the Great Fire Wall is a so onerous ordeal that survival guides can be compiled into an anthology.
Here is how to configure various popular open source project to use their CDN in Ch******na.
Plenty of nodejs project provide environment variable to configure mirror/CDN to download source code or binary.
nvm / nodejs
1 | NVM_NODEJS_ORG_MIRROR=https://npm.taobao.org/mirrors/node nvm install 4 |
npm
1 | npm --registry=https://registry.npm.taobao.org install koa |
Kudos to fengmk2
PhantomJS
1 | PHANTOMJS_CDNURL=https://npm.taobao.org/dist/phantomjs npm install phantomjs --registry=https://registry.npm.taobao.org --no-proxy |
Kudos to fengmk2, again!
node-sass
1 | SASS_BINARY_SITE=https://registry.npmjs.org/node-sass npm install node-sass |
Kudos, again and again, to fengmk2
Docker
Install Docker
1 | curl -sSL http://acs-public-mirror.oss-cn-hangzhou.aliyuncs.com/docker-engine/internet | sh - |
Config accelerator
You need to register an account in daocloud.io.
1 | echo "DOCKER_OPTS=\"--registry-mirror=http://xxxxxx.m.daocloud.io\"" | sudo tee -a /etc/default/docker |
Kudos to daocloud.
Pypi
1 | cat <~/.pip/pip.conf <<EOF |
Kudos to aliyun
sbt
1 | cat > ~/.sbt/repositories <<EOF |
Kudos to freewind
And these links is useful:
加速 SBT 下载依赖库的速度
how to make sbt jump over GFW
Gopm
It is quite clear in the doc and help command.
1 |
|
Conclusion
Hail Aliyun! Hail fengmk2!
For the unfortunate who live in a crappy ignorant country.