Skip to content

Instantly share code, notes, and snippets.

@Zhaoyilunnn
Last active October 13, 2023 13:58
Show Gist options
  • Select an option

  • Save Zhaoyilunnn/2ee2a9346fe9305acb45b530a9c18f0e to your computer and use it in GitHub Desktop.

Select an option

Save Zhaoyilunnn/2ee2a9346fe9305acb45b530a9c18f0e to your computer and use it in GitHub Desktop.
js

Toolchain

node

npm

install

mirrors

https://cloud.tencent.com/developer/article/1372949

  1. npm config set registry http://mirrors.cloud.tencent.com/npm/
    • npm config get registry
  2. npm config set registry https://registry.npmmirror.com

Set socks5 proxy

https://zhuanlan.zhihu.com/p/337940332

查看代理

npm config get or npm config list

清除npm代理

npm config delete proxy and npm config delete https-proxy

# 假设本地socks5代理端口为1081
# 首先安装转换工具
npm install -g http-proxy-to-socks
# 然后使用这个工具监听8002端口,支持http代理,然后所有8002的http代理数据都将转换成socks的代理数据发送到1081上
hpts -s 10.2.0.0.102:10810 -p 108182
# 最后设置npm代理为108
npm config set proxy http://127.0.0.1:108102
npm config set https-proxy http://127.0.0.1:108182

options

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment