3 ms·
> You are known as Azure Bug Ok, that’s cute. I would perhaps delay showing the funny name until at least one other machine is detected, it makes it feel like
by zaroth 6y ago
> You are known as Azure Bug
Ok, that’s cute.
I would perhaps delay showing the funny name until at least one other machine is detected, it makes it feel like my name is being broadcast over the public Internet for anyone to connect to, and not just a LAN connection, the way it is.
But worked perfectly for me to send a few photos back and forth.
LAN connections seem like the perfect application for WebRTC not having to deal with TURN or STUN.
It is a bit unnerving that there’s no permission request before being able to do network discovery on the LAN however.
How is one machine finding the other? Central server matching the public IP used to then share their private IP? Or does WebRTC provide a discovery service?
Edit: Ok, Looking at the server code [1] there is indeed a “room” per public IP and the server passes messages between peers in the same room.
[1] - https://github.com/RobinLinus/snapdrop/blob/master/server/index.js https://github.com/RobinLinus/snapdrop/blob/master/server/in...
- winrid 6y agoIt looks like the server could easily be expanded to allow you to enter the other person's ID and send to them over WAN
- zaroth 6y agoThe code is so simple mostly because it doesn’t need to deal with NAT hole-punching. It would have been beautiful if the discovery could have been purely client-side though.
- deleted 6y ago[deleted]
- dheera 6y agoAlthough my plate is pretty full with projects I'm curious to know whether it's possible to implement a peer discovery service by consuming bandwidth in a modulated fashion and detecting those changes in bandwidth availability on another machine. You could also scan a LAN's entire subnet for machines with this: https://github.com/jdfreder/pingjs https://github.com/jdfreder/pingjs