librespot icon indicating copy to clipboard operation
librespot copied to clipboard

Librespot available outside of home network

Open lolstarz opened this issue 8 years ago • 2 comments

I couldn't find a related issue so forgive me if this has been discussed previously.

I can control my device running librespot when I am not connected to the same network as it. I didn't expect this to be the case (and indeed it isn't for any other spotify connect device I have). Is this an unexpected result or do I need to add a particular iptables rule to block this?

Running on a raspberry pi 3 B on Raspbian (Stretch).

Steps to reproduce: Followed the "compiling and running" steps exactly. Then used the supervisor documentation in the wiki to run it in the background when my pi starts. I then restart my pi, and I can see it available and control it from my phone which is not connected to my wifi network.

Expected: When using the spotify client on my phone while not connected to the same network as the raspberry pi, I would not see the librespot-installed device in my list of additional devices.

Thanks in advance, and thanks for your work on this software.

lolstarz avatar Mar 20 '18 00:03 lolstarz

Controlling connect devices from outside of your home network is a Spotify connect feature. There's an option in the Android app to hide non-local devices (see https://support.spotify.com/us/using_spotify/troubleshooting/spotify-connect-cant-find-my-device/) but I'd have thought that's up the Android client to implement, rather than librespot. I think librespot is behaving correctly.

kingosticks avatar Mar 20 '18 01:03 kingosticks

This is an intended feature of Spotify Connect. Despite appearances, control is not happening over your local network, only discovery and authentication. Control happens through Spotify relay servers. Your speaker and device have no idea whether they are on the same network once authenticated. You can see this by connecting to librespot from a computer, then launch Spotify on a mobile whilst on 4G. The device will show up as an available device.

In the meantime, closing this as it's not an issue.

sashahilton00 avatar Mar 20 '18 15:03 sashahilton00