Skip to content

yume-chan/webrtc-tunnel

Repository files navigation

WebRTC Tunnel

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.

Install

  1. Clone this repository.
  2. Run npm install

Run

server

npm run server

You will see a server ID at end.

client

npm run client -- <serverId>

Set SOCKS5 proxy to 127.0.0.1:1082.

Thanks

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.

Note on pnpm

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.

About

use WebRTC to create tunnels even when peers are behind NAT

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published