Syncthing Android uses relay server to connect to LAN

Hello people,

I guess this question is for @Nutomic or other members of the Android port team.

I’ve read the documentation as well as this forum as much as I can, but still have this issue: my Syncthing instance on Android uses relays to connect to LAN devices, instead of a LAN IP. At least, this is what is displayed in the web UI (with the corresponding slow speed).

Syncthing is working as expected (ie with a LAN IP) with another client (Opensilk) installed on the same device.

It has been working fine until a few days back, now I can’t find out what has changed.

Do you have any idea on this ?

Thanks in advance.

PJ

Check if they are in the same subnet.

Yes they are.

Now that I think about this, I recall there being a bug related to this issue. Never the less, I think it should switch to a local connection after 2 reconnecy intervals (2min by default) if all is well with the network.

The other thing could be AP isolation on the router.

This is exactly the main reason why I don’t use BitTorrent Sync anymore, the android client doesn’t have much advanced settings so even if my phone and desktop are on the same subnet, it still uses relay which is kinda frustrating.

Now, I’m glad that the desktop and android version of Syncthing uses the same code. I overcame this situation by disabling “Relay” in my desktop and android’s advanced settings.

Hope this helps!

@AudriusButkevicius It doesn’t switch to local connection anymore, and things have been so for these last 2-3 weeks. And all is well with the network, since all other instances on various devices run normally.

@Galileo_Lajara Thanks for your insight. It helps, for sure. But I guess disabling “Relay” will harm the repos that I sync over Internet (such as my “current work” folder).

Anyway, these last days, Syncthing Android has been behaving strangely : hangs/loads indefinitely, impossible to restart, unless the device is rebooted. Please note that I haven’t updated to the latest version, because I still haven’t found time to migrate all my instances to v0.13. So I’m still running the latest v0.12.2X.

Please @Nutomic, are you with us ?

Well then there is something with your network that blocks local discovery announcements.

I don’t think the code has changed much since 0.12 in regards to local discovery, and android wrapper uses the same syncthing underneath the hood, so there is nothing that nutomic could have done to break this.

Did you actually verify that local discovery is enabled on both sides?

I’m rather thinking of something wrong with the device or its configuration (firewalls, etc.), cause other devices connect just fine. I’ll keep investigating.