WebRTC uses ICE to connect to remote peers, which supports NAT traversal pretty well.
WebRTC is a peer-to-peer protocol but this script assigns one peer as server and the other as client, and creates an SOCKS5 proxy on server.
- Clone this repository.
- Run
npm install
npm run server
You will see a server ID at end.
npm run client -- <serverId>
Set SOCKS5 proxy to 127.0.0.1:1082
.
This project used to use gladkikhartem/koshare-router as WebRTC signaling server.
The original server had been shut down, so I created my own implementation at yume-chan/koshare-router-nodejs.
Usually I use pnpm to install npm packages.
But due to it doesn't support bundledDependencies
, it can't be used to install the most important dependency of this project, wrtc.
So this project uses npm
directly.