chr15m / bugout

Back end web app services over WebRTC.
https://chr15m.github.io/bugout
MIT License
604 stars 59 forks source link

couldn't connect succesfully with devices over different network #32

Closed cap-code closed 3 years ago

cap-code commented 3 years ago

could only connect with devices on same network , it did not connect to devices on other network . I was testing your demo app ,so it did'nt connect to device with another network connection

jaytohe commented 3 years ago

Same issue here. It used to work in July but now nothing.

jaytohe commented 3 years ago

@chr15m what gives?

jkriss commented 3 years ago

I had this issue until I stood up my own TURN server. Some peers cannot be routed to each other with STUN alone. In practice, if you have a larger number of nodes, then the peers can all connect as long as there are enough connections to bridge the whole set. But if you're testing with two peers, it's quite easy to get into the situation where they can't reach each other.

For me, I was testing on my phone with wifi off and my computer on wifi.

draeder commented 3 years ago

I've been playing around with Bugout for a long time and have not had many issues connecting from external networks. Sometimes, I would have to refresh the browser on the first instance and the same for the 2nd instance. And other times there was some delay to establish the connection. In the beginning, I also had some misunderstandings of how to write my application. Bugout was designed to be server -> client (yes while still being browser <-> browser), but I was trying to make it fully meshed p2p where both sides were servers and clients simultaneously. That misunderstanding caused me some problems with connectivity, too.

chr15m commented 3 years ago

@cap-code @jaytohe you can turn on debugging: localstorage["debug"] = "bugout" which might give more information about why your connection is failing. Also check the network tab in the developer console and see if the websocket connections to the trackers are being made successfully. It is not possible to debug when the only detail is "it doesn't work".

cap-code commented 3 years ago

i was trying to make an webapp where u could transfer file , without any servers . I think its mainly because of the webtorrent websocket trackers . There is also a node module called p2pt by https://github.com/subins2000/p2pt , this also work by connecting websocket trackers of webtorrent, this thing has also same issue , as far as i know its because of TURN server, when i added an TURN server information in p2pt it worked. So the same thing goes bugout. i will debug just like u did and will get back to u

chr15m commented 3 years ago

See the answer on #35.