@channeljs/shadowsocks-ws
v0.1.57
Published
Readme
create a dedicated branch for publishing!!
installation
npm i @channeljs/shadowsocks-ws
shadow client
node src/ws/local.js -s wss://aes-128-cfb:[email protected]/ --socks5 1080 --http-connect 127.0.0.1:8080 -k aogog2727clsg -m aes-128-cfb -L 0.0.0.0:5200:127.0.0.1:5201 -L 0.0.0.0:5202:127.0.0.1:5201
testing
curl -x socks5h://127.0.0.1:1080 https://one.one.one.one/cdn-cgi/trace curl -x http://127.0.0.1:8080 https://one.one.one.one/cdn-cgi/trace iperf3 -d -f M -c 127.0.0.1 -p 5200
performance testing
iperf3
on server
iperf3 -s -f M
on client
iperf3 -d -f M -c 127.0.0.1 -p 5200
There're 2 types of password, one is for the shadow encryption and the other one is sent along in the url as basic header
ENABLE_SHADOW_AUTH=no node src/ws/server.js node local.js -L 0.0.0.0:5200:127.0.0.1:5201 -L 0.0.0.0:5202:127.0.0.1:5201
webpack is only for bunlding, files can be run without it!!
apache bench testing max concurrent connection?? other tools to test tcp concurrent connections?? use tcpkali
tcpkali -T30s --connections 10 -em "GET / HTTP/1.1\r\nHost: localhost:3000\r\n\r\n"
--latency-marker "HTTP/1.1" localhost:3000
cli usage option 1
the double hyphens are essential for it to work. without it, the argumetns will be passed as the args to npm rather than to the ssw
npm i @channeljs/shadowsocks-ws
npm exec -- ssw -s wss://aes-128-cfb:[email protected]/ --socks5 1080 --http-connect 127.0.0.1:8080 -k aogog2727clsg -m aes-128-cfb -L 0.0.0.0:5200:127.0.0.1:5201 -L 0.0.0.0:5202:127.0.0.1:5201cli usage option 2
2a. add in package.json:
"scripts": {
"client": "ssw -s wss://aes-128-cfb:[email protected]/ --socks5 1080 --http-connect 127.0.0.1:8080 -k aogog2727clsg -m aes-128-cfb -L 0.0.0.0:5200:127.0.0.1:5201 -L 0.0.0.0:5202:127.0.0.1:5201"
}
2b. execute
npm run client