配置写在config.js,分为tunnel,client,server三部分
需要自己生成及导入证书
node lib/index.js -t
PROXY_ENV=client node lib/index.js
PROXY_ENV=server node lib/index.js
将浏览器代理设置为socks5代理,端口为client所在端口
client和server密码要一致,client的serverPort 与 server的 port 要一致
- aes-256-cfb: 不限制
- aes-256-gcm: 32
- aes-192-gcm: 24
- aes-128-gcm: 16
gcm算法还需要一个初始向量,长度推荐为12
The IV depends on the mode of operation. For most modes (e.g. CBC), the IV must have the same length as the block. AES uses 128-bit blocks, so a 128-bit IV. Note that AES-256 uses a 256-bit key (hence the name), but still with 128-bit blocks.
docker build -f client.dockerfile -t zenxds/nproxy:latest .
docker build -f server.dockerfile -t zenxds/nproxy:latest .
sh ./start.sh