goonism / hyperproxy

Hyperproxy aims to establish connection from WebRTC nodes to TCP/UDP DAT nodes
https://goonism.github.io/hyperproxy
MIT License
74 stars 5 forks source link

Need to figure out how to utilize Simple Peer to send data directly to other nodes #33

Closed ColdSauce closed 6 years ago

ColdSauce commented 6 years ago

We are running into an issue where we are not able to send data between peers via Simple Peer after receiving a data event from SignalHub.

The code in question is here:

https://github.com/goonism/hyperproxy/blob/master/packages/hyperproxy-node/src/index.js#L52

This code performs the functionality that we would like it to, it's just that it's using the SignalHub as a centralized source to proxy requests to all the other nodes in the channel.

Instead, the node that receives the event should reply directly to the node that sent it the request.