[HN Gopher] Sharedrop: Easy P2P file transfer powered by WebRTC ...
___________________________________________________________________
Sharedrop: Easy P2P file transfer powered by WebRTC - inspired by
Apple AirDrop
Author : nateb2022
Score : 80 points
Date : 2024-07-07 18:35 UTC (4 hours ago)
(HTM) web link (github.com)
(TXT) w3m dump (github.com)
| posix86 wrote:
| This is like PushBullet but better. Nice work! Gonna try when I
| need to move something from phone to tabled to PC.
| toenail wrote:
| Does this work on mobile? I use localsend so far,
| https://localsend.org/
| nateb2022 wrote:
| It works for me on Safari for iOS
| oezi wrote:
| They mention running this cost them money (likely for hosting and
| Firebase). Isn't there a way that this could be entirely
| distributed?
| nateb2022 wrote:
| It could, but with the current WebRTC implementation initial
| connection establishment between peers requires a signaling
| server to coordinate network information.
| MuffinFlavored wrote:
| How can WebRTC be implemented for an app like this to not
| need a signal server?
| the8472 wrote:
| For physically local use: You could turn the session
| initiation tokens into QR codes and show them to each other
|
| For P2P over the broader internet: Either use another
| channel to convey the token or use a native application
| that can speak UDP/TCP to do actual distributed P2P
| transfers.
| kelnos wrote:
| For the broader internet case, you'll probably still be
| dealing with NATs between both devices, so you'll need a
| centralized STUN (or even TURN) server to hole-punch (or
| relay).
| ekr____ wrote:
| It's not just WebRTC. Basically, if you want things to work
| when both endpoints are behind typical NATs (a very common
| situation), you need some kind of signaling system. There are
| several reasons for this:
|
| - NAT bindings are usually not stable over long periods of
| time - Many NATs implement what's basically a stateful
| inspection firewall, which means that you actually need to
| send a packet out to the peer's address before it will be
| allowed to send a packet to you from the outside - In some
| nontrivial fraction of cases, you actually need to relay
| traffic through a third party.
|
| The result is that you need some coordination protocol to set
| up the connection and that has to go through some service
| which is accessible from the endpoints; generally this means
| some type of service. So, yes WebRTC is designed this way,
| but it's basically a constraint of any system of this type.
|
| For more on this than you wanted to know, see:
| https://educatedguesswork.org/posts/nat-part-1/ and following
| posts.
| BitPirate wrote:
| Sadly things are a bit broken if IPv6 is involved:
|
| https://github.com/szimek/sharedrop/issues/55
| ValtteriL wrote:
| How is this different from webwormhole.io?
| alternatex wrote:
| My fave is https://snapdrop.net
| user_7832 wrote:
| I'd like to give a shoutout to localsend as well:
| https://github.com/localsend/localsend
| almog wrote:
| So it's not offline first, and even though it can do P2P through
| WebRTC I've ran into situation where I wanted to send a file from
| my android (not supporting AirDrop) phone to someone's iphone
| (not supporting Nearby Share) when we were both at the same
| location but days away from cell service.
|
| Localsend can do that. Problem being when the other person did
| does not have that installed on their phone. It's really crazy
| how offline-first networking is still partitioned by
| iPhone/Android for so many years.
| modeless wrote:
| Yeah, it's crazy how with a $15 walkie talkie running on AAA
| batteries you can talk to your friend _miles_ away in the
| wilderness, but your $1000 phone is a brick if it can 't see a
| cell tower. Something went wrong there.
|
| Pretty soon we're going to have satellite cell service via
| Starlink. So it will work, but it will be silly when your
| signals are going to space and back twice to travel a mile as
| the crow flies.
| almog wrote:
| Exactly and more generally it'd be interesting to see if
| those space cell tower live to the promise. I suspect they'd
| be great for texting and very light web pages but with 7
| Mbit/s per cell (that's the number I remember reading) it
| might end up feeling feel very sluggish if used with our
| existing internet applications and protocol stack.
| nashashmi wrote:
| Its a mobile (celltower) first technology. Not a device first
| technology.
| gruez wrote:
| >but your $1000 phone is a brick if it can't see a cell
| tower. Something went wrong there.
|
| it's not exactly a "brick". airdrop/bluetooth still work
| albeit at a reduced range.
| barbs wrote:
| >but your $1000 phone is a brick if it can't see a cell
| tower. Something went wrong there.
|
| I suppose in that case there are mesh networking apps such as
| Briar? https://briarproject.org/
| JaneLovesDotNet wrote:
| imho https://pairdrop.net/ is the best one of these
| jerbear4328 wrote:
| PairDrop is quite nice, it's my go to as it always works. It's
| a fork of the simpler SnapDrop.
| sandreas wrote:
| Well, maybe an alternative: Localsend[1]
|
| Works pretty good for my use cases.
|
| 1: https://localsend.org/
|
| EDIT: Oh, this was already mentioned... sorry.
| 1oooqooq wrote:
| > as well: https://github.com/localsend/localsend > imho
| https://pairdrop.net/ is the best > How is this different from
| webwormhole.io? > My fave is https://snapdrop.net
|
| it's so funny how everyone have a favorite. They all use
| standardized hacks on top of hacks, just because ISP do not want
| to let you serve content and will fight for NAT, which is their
| only line of defense from everyone else messing with their
| precious IGMP multicast hacks so they can subsidize their TV
| business on your internet bill. it's all so funny.
|
| but the best joke is how microsoft and apple both tried to "make
| things work" in the late 90s (?) with their special zero-conf-by-
| other-names trainwreak of network protocols.
|
| There's no end in sight.
| doctorpangloss wrote:
| > NAT, which is their only line of defense from everyone else
| messing with their precious IGMP multicast hacks so they can
| subsidize their TV business on your internet bill.
|
| What are you trying to say? This is intriguing.
| 1oooqooq wrote:
| all tv channels are transmitted with the same technology
| state actors use to redirect traffic from some site to their
| servers. (multicast)
|
| That tech have no authentication or authorization. (IGMP,
| PIM-SM, whatever)
|
| it mostly consist of a switch or router on the edge NOT
| forwarding UDP to some class D ip, or something, past it. But
| all the ancillary protocols have hundreds of redirection
| attacks still available.
|
| All that is besides the BGP stuff everyone document by now so
| it's only used as a last resort.
|
| Go read a book on network security published after 2013. If
| you want to play with it in your home, no need to build a
| homelab. Your home modem probably have smaller versions of
| this using uPNP or PCP or something. Not really recalling the
| consumer version names. But on those you mostly can point
| ports routed to any device to any other device, started by
| any device in or out of the network. fun stuff.
|
| the reason i don't remember any of the details is because all
| the perl scripts written in 2000 or so still work just fine.
| doctorpangloss wrote:
| I still don't really understand.
|
| What is the conspiracy? Concretely, what is it that I
| believe is "going on," what is "actually" "going on", and
| how does the "actually" "going on" part harm me or screw
| me... somehow?
| rzzzt wrote:
| NAT-PMP maybe?
| https://en.wikipedia.org/wiki/NAT_Port_Mapping_Protocol
| kortilla wrote:
| None of what you talked about has anything to do with NAT.
| The Internet in general does not route multicast and
| getting public IPs in no way will get you access to any
| multicast networks.
| martinald wrote:
| Who uses multicast for TV these days? I'm also unsure what this
| has to do with NAT.
|
| The reason they use CG-NAT is because there is a complete
| shortage of IPv4 addresses.
| 1oooqooq wrote:
| > Who uses multicast for TV these days
|
| you'd be surprised. Every resolution bump it gets back in
| fashion. And the infra is always left behind.
|
| And there's only a shortage of ipv4 because ISPs drag their
| feet on ipv6. It's circular. They even talk about IPv6 nat,
| lol. For user safety now, i think.
|
| remember when DSL didn't allow you to open listening ports?
| you had to buy "business DSL" for 10x more?
| martinald wrote:
| But linear TV viewing is shrinking all the time. I'm sure
| some people do use it, but I really don't understand what
| it has to do with NAT?
| KennyBlanken wrote:
| There is no shortage of IPv4 address space. There _is_ a
| problem with the government and private entities hoarding
| address space they don 't need.
|
| Amazon alone is sitting on _billions_ of IPv4 addresses.
| They 've snarfed up /10's, /8's, and partial /8's:
| https://toonk.io/aws-and-their-billions-in-
| ipv4-addresses/in...
|
| Every single man woman and child in the US could get three
| unique IPv4 addresses each and Amazon would still have
| _billions_ left over.
|
| And then recently the DoD transferred 175M IPv4 addresses
| to a shell corporation in Florida nobody has ever heard of,
| thus announcing the largest # of IPv4 addresses in the
| world: https://arstechnica.com/information-
| technology/2021/04/penta...
|
| The whole "IPv4 space is exhausted" is a load of shit to
| get people to feel guilty about having a class C and
| downsizing while Amazon, Google, and Microsoft snarf up
| more and more IPv4 space. It's exactly like "turn off your
| lights when you leave the room to reduce your carbon
| footprint" while a billionaire flies over you in his
| private jet in a 20 minute flight to the beach because he
| didn't want to sit in traffic.
|
| All this could have been avoided if a)address space could
| not be sold or "leased" but had to be returned to APIC
| b)rules regarding a minimum percentage of your existing
| address space being announced/routable with actual devices
| at the other end...before more space will be allocated to
| you.
| mihaaly wrote:
| I have Apple products at home for almost two decades, computer
| and phone and tablet generations, and I was satisfied in the
| beginning with the 'just works' kind of attitude that actually
| worked then, but then came this AirDrop and it almost never
| worked, still almost never works. Unpredictable which devices
| in which direction can send files to each other, yes, I have
| phone<>computer config that works in one direction but not in
| the other. I do not want to figure out why is this so, I just
| want to use it. I tell this to prevent the predictably arriving
| helpful suggestions and explanations, I don't care. Does not
| work and that's it, I do not rely on that. Doing it some old
| reliable way instead.
| bongodongobob wrote:
| Your middle paragraph is word salad.
| bevenhall wrote:
| ELI5: Do you have two devices on the same local network - is it a
| single common wifi access point in the badlands, just a local
| lan, no internet? Do I *need* to have your file on my phone? Why?
| kelnos wrote:
| Local discovery didn't work for me. Loaded it on my (Linux)
| laptop and (Android) phone (both Firefox), but they didn't see
| each other.
|
| I wonder if it's an IPv6 issue? My two devices might have shown
| up to the server as two different IPv6 addresses, not the same
| NATed IPv4 address.
| tamimio wrote:
| I tried most of these apps some time ago, and the best ones for
| large files were Landrop and Localsend. If you have a VPN, you
| can use them to transfer files remotely too.
|
| https://landrop.app
|
| https://localsend.org
| smusamashah wrote:
| I keep a list of about 10 such browser based p2p file sending
| tools
| https://gist.github.com/SMUsamaShah/fd6e275e44009b72f64d0570...
|
| Have made this using occasional threads like this one and update
| it when I find some new tool.
| GeekyBear wrote:
| If this is truly "inspired by Airdrop", then it should continue
| to function without a accessible cellular signal or WiFi network,
| by automatically configuring one of the devices to act as a
| mobile Wifi hotspot.
___________________________________________________________________
(page generated 2024-07-07 23:00 UTC)