schlagmichdoch / PairDrop

PairDrop: Local file sharing in your browser. Inspired by Apple's AirDrop. Fork of Snapdrop.
https://pairdrop.net
GNU General Public License v3.0
3.67k stars 194 forks source link

Fix turn container files, docker-compose-coturn.yml and documentation #195

Closed schlagmichdoch closed 7 months ago

schlagmichdoch commented 8 months ago

Partly supersedes (and cherry-picked from) #106.

@xundeenergie, I have rebased and combined some of your changes into this to offer users a working example out of the box and added you as co-author.

As multiple users have had difficulties with PairDrop running without a TURN server I conformed the docker images (#194). This PR adds working compose files and your guide to easily deploy PairDrop alongside Coturn and integrate the changes into the new documentation.

It focuses on simplicity, so TURN over TLS runs on a separate port and not on 443. If you want to further investigate the possibility via nginx and upstreams or the use of another authentication method feel free to do so over at #106!

If you got some time on your hands, I’d appreciate it if you could quickly test whether everything works as expected before I merge this into master!

Thanks again for your contribution!

xundeenergie commented 7 months ago

I think, i got it running with nginx and stream to have coturn also listening on port 443, the same as the pairdrop-site does.

It's a bit of a hack, because coturn itself needs letsencrypt certificates as well as pairdrop needs. And if you do it with nginx and streams the le-certs have to be copied over and change owner of the copies, so that coturn can read it (but you need this also for the original setup.

but the other thing is, i realized it before i played around again... if two clients are in the same network without being paired... they do not see each other. Clients must be paired (or in the same pulic room), to be recognized from the other. Is this a bug or does it belong to my setup?

schlagmichdoch commented 7 months ago

Superseded by #202

xundeenergie commented 7 months ago

Ah, you're right. It was a vpn, i've overseen...

schlagmichdoch commented 2 months ago

The following comments were deleted by GitHub (via hubot) as part of mistakenly marking this account as spam on 17th February 2024. The correct thread order and the creation date is unclear. I decided to manually restore them anyway in order to complete the information this issue holds even though the restored information might be outdated:

Comment by @schlagmichdoch:

but the other thing is, i realized it before i played around again... if two clients are in the same network without being paired... they do not see each other. Clients must be paired (or in the same pulic room), to be recognized from the other. Is this a bug or does it belong to my setup?

I seem to have overlooked this. Sorry!

This might be the case if the public IP-addresses of your devices do not match (VPN, iCloud private relay etc.). You can try deploying it with DEBUG_MODE="true" to debug the IP addresses that PairDrop uses for the auto-discovery feature.

Also, if your devices connect to your instance via IPv6 you need to truncate the IPv6 addresses for the auto-discovery feature to work. See https://github.com/schlagmichdoch/PairDrop/blob/1c79290ad6a9bfe89659808664f0b5b63b47e0ef/docs/host-your-own.md#ipv6-localization