Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Is it possible to create peer-to-peer connections in different network?

I want to create peer-to-peer connections between 2 nodejs client.

using websocket (dnode)

here is the limit:

  • nodejs client run at 2 pc which is in different network.
  • they don't have static ip (192.168.1.100 && 192.168.2.200) behind NAT or firewalls
  • no permission to change the mapping of router.
  • has only static web server in public network. (can change the file by human)
  • can install application at pc (win)

is it possible? thanks

like image 905
atian25 Avatar asked Oct 17 '25 14:10

atian25


1 Answers

May be you can use PeerJS to achieve your objectives. PeerJS simplifies WebRTC peer-to-peer data, video, and audio calls. PeerJS wraps the browser's WebRTC implementation to provide a complete, configurable, and easy-to-use peer-to-peer connection API. Equipped with nothing but an ID, a peer can create a P2P data or media stream connection to a remote peer.

Also to broker connections, PeerJS connects to a PeerServer. Note that no peer-to-peer data goes through the server; The server acts only as a connection broker.

like image 89
Arash Milani Avatar answered Oct 20 '25 04:10

Arash Milani



Donate For Us

If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!