Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Bug: Pairing won't work for devices in different networks #130

Closed
Manrochri opened this issue Jul 27, 2023 · 21 comments
Closed

Bug: Pairing won't work for devices in different networks #130

Manrochri opened this issue Jul 27, 2023 · 21 comments
Labels
bug Something isn't working

Comments

@Manrochri
Copy link

Describe the bug
When trying to pair an android using mobile data to a computer, the paired devices won't appear and in the list of paired devices all are marked as "undefined". So, it won't let me send text or files between my phone and a computer that are not in the same network.

To Reproduce
Steps to reproduce the behavior:

  1. Go to the pair icon
  2. Pair the devices using either the qr code or the pin code
  3. Click on pair
  4. See the list of paired devices on the button "edit paired devices"

Expected behavior
All paired devices appear as "undefined" and those won't be paired

Screenshots
image
Screenshot_20230726-200108

Desktop (please complete the following information):

  • OS: Windows 10 22H2 19045.3208
  • Browser Google Chrome
  • Version 115.0.5790.110

Smartphone (please complete the following information):

  • Device: Huwei Y7 2019
  • OS: Android 8
  • Browser Pogresive web app Pairdrop from the Google play

Self-Hosted
No

Additional context
I used to pair my phone to a computer (both of them in different networks) and it used to work flawlessly. I didn't use to have problems with that kind of pairing. I use pairing on Pairdrop because I found that to be a practical way to share links from my phone to a computer from a classroom without having to log in into any kind of app or website.

@schlagmichdoch
Copy link
Owner

This should be fixed now. Please try again!

@schlagmichdoch schlagmichdoch added the bug Something isn't working label Jul 27, 2023
@Manrochri
Copy link
Author

Manrochri commented Jul 27, 2023 via email

@ghost
Copy link

ghost commented Jul 28, 2023

This should be fixed now. Please try again!

any update on this bug? if no -> @schlagmichdoch tag me when it's fixed....please

@Manrochri
Copy link
Author

Manrochri commented Jul 28, 2023 via email

@schlagmichdoch
Copy link
Owner

@Manrochri @marcoportincasa Please try again! I cannot reproduce the bug anymore.

@schlagmichdoch schlagmichdoch changed the title Bug:/Enhancement:/Feature Request: Pairing won't work for devices in different networks Bug: Pairing won't work for devices in different networks Jul 29, 2023
@Manrochri
Copy link
Author

Manrochri commented Aug 3, 2023 via email

@schlagmichdoch
Copy link
Owner

Great! Thanks for reporting back! I’ll close this then.

@s-rog
Copy link

s-rog commented Aug 6, 2023

I'm having the same issue when trying to pair devices across VLANs. Running 1.7.6 through a reverse proxy with the container running in one of the VLANs.

I tried running both clients in each LAN and everything works, perhaps a firewall allow rule is needed? Or does the pairdrop server need to be run from a different LAN from the clients to route correctly?

(also the pairdrop.net server works on both clients)

@schlagmichdoch
Copy link
Owner

schlagmichdoch commented Aug 6, 2023

@s-rog Have you included a TURN server in your setup?

@s-rog
Copy link

s-rog commented Aug 7, 2023

Negative, is that required for pairdrop to work for my setup?

@meichthys
Copy link
Contributor

I still seem to be seeing this issue with pairdrop.net

@louis-pre
Copy link

Same, I can reproduce it both self-hosted and paidrop.net
I could only try with my phone (phone on network) and computer (behind NAT) for now

@meichthys
Copy link
Contributor

@schlagmichdoch could we re-open this?

@meichthys
Copy link
Contributor

@louis-pre By chance, Is your NAT network run by a pfSense box?

@s-rog
Copy link

s-rog commented Aug 21, 2023

my vlans are setup on pfsense

@louis-pre
Copy link

@louis-pre By chance, Is your NAT network run by a pfSense box?

It is not, I tested directly connected to XFinity's router/modem

I can do some more tests this evening if you wish

@schlagmichdoch
Copy link
Owner

We need to differentiate between self-hosting and the instance running on pairdrop.net when discussing this issue


Negative, is that required for pairdrop to work for my setup?

Yes, a TURN Server is required to route your traffic if you use devices behind different NATs.

See Technical Documentation and Deployment Notes.


The instance on pairdrop.net is using the TURN server correctly again. Please try again and give feedback whether we can close this issue @louis-pre

@meichthys
Copy link
Contributor

@schlagmichdoch the public instance is working again for me 👍
I think you can close this.

@s-rog
Copy link

s-rog commented Aug 28, 2023

Are different subnets considered different NATs? or is a TURN server needed whenever a firewall involved?
(also I just gave pairdrop.net another go and two clients on different subnets/VLANs detect each other without pairing)

Edit: I read up more on TURN servers and it is indeed necessary, was hoping I could just poke a hole in my own subnet firewall!

@louis-pre
Copy link

@schlagmichdoch Thanks a lot, pairdrop.net works again for me too in all the uses-cases I have tested prior

I have not re-tested the self-hosted version again but I'm sure I can make it work if it works in the hosted version 👍

@schlagmichdoch
Copy link
Owner

(also I just gave pairdrop.net another go and two clients on different subnets/VLANs detect each other without pairing

Probably both clients have the same public IP address and are therefor shown to each other by PairDrop. The connection still only works when including a TURN server in the setup. Beware that snapdrop.net will show both devices to each other as well but actually sending sth will fail due to the lack of a TURN server.

Are different subnets considered different NATs? or is a TURN server needed whenever a firewall involved? (also I just gave pairdrop.net another go and two clients on different subnets/VLANs detect each other without pairing)

Edit: I read up more on TURN servers and it is indeed necessary, was hoping I could just poke a hole in my own subnet firewall!

Sadly this is not the case. If all devices can use IPv6 it might be possible to host PairDrop on IPv6 only which would eliminate the need of a TURN server but also the auto discovery feature for clients in the same network as every devices has its own IPv6 address.
If you are going to do some more testing I would appreciate if you would share your results! Maybe we can include them somewhere in the docs.

I'll close this for now. Thanks @everyone for testing!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

5 participants