nkk (npm proxy manager)
Features
nkk
可以帮助你管理 proxy 地址列表,快速切换 npm 使用的 proxy。
nkk
can help you manage proxies list for npm, easy and fast switch between different proxies.
Install
$ npm install -g nkk
Usage
Usage: nkk [options] [command]
Commands:
ls List all the registries and proxies
lsr List all the registries
addr <registry> <url> Add one custom registry
delr <registry> Delete one custom registry
use <registry> Set npm config registry
lsp List all the proxies
addp <proxy> <url> Add one custom proxy
delp <proxy> Delete one custom proxy
start <proxy> Set npm config proxy
stop Disable all proxies
test [proxy] Show the response time
help Print this help
Options:
-h, --help output usage information
-V, --version output the version number
Example
- 添加代理:
$ nkk addp myproxy1 http://user:pass@proxy-address:port
add proxy "myproxy1" success
- 查看所有已添加的代理(当前使用的代理前面有 * 号):
$ nkk lsp
myproxy1 ----- http://user:pass@proxy-address:port
* myproxy2 ----- http://user2:pass2@proxy-address:port
- 使用某个代理:
$ nkk start myproxy1
Proxy has been set to: "http://user:pass@proxy-address:port" !
* myproxy1 ----- http://user:pass@proxy-address:port
myproxy2 ----- http://user2:pass2@proxy-address:port
- 停止使用代理:
$ nkk stop
Proxy has been set to disabled !
myproxy1 ----- http://user:pass@proxy-address:port
myproxy2 ----- http://user2:pass2@proxy-address:port
- 代理测速:
$ nkk test
myproxy1 ---- 39ms
myproxy2 --- Fetch Error
- 删除某个代理:
$ nkk delp myproxy2
delete proxy "myproxy2" success
myproxy1 ----- http://user:pass@proxy-address:port
License
MIT©kakusiilong