mirror of
https://github.com/librespot-org/librespot.git
synced 2026-04-27 08:15:50 +03:00
[GH-ISSUE #33] librespot and firewall ports #23
Labels
No labels
A-Alsa
SpotifyAPI
Tokio 1.0
audio
bug
can't reproduce
compilation
dependencies
duplicate
enhancement
good first issue
help wanted
high priority
imported
imported
invalid
new api
pull-request
question
reverse engineering
wiki
wontfix
No milestone
No project
No assignees
1 participant
Notifications
Due date
No due date set.
Dependencies
No dependencies set.
Reference
starred/librespot#23
Loading…
Add table
Add a link
Reference in a new issue
No description provided.
Delete branch "%!s()"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
Originally created by @sashahilton00 on GitHub (Jan 29, 2018).
Original GitHub issue: https://github.com/librespot-org/librespot/issues/33
Tuesday Jul 05, 2016 at 17:17 GMT
Originally opened as https://github.com/plietar/librespot/issues/89
My laptop/mobile phone and my raspberrypi are connected to separate subnets.
After starting librespot I can see that the entries are published via mdns
If I try to connect from my laptop to XXX.XXX.XXX.XXX:38143 I get a 404, and in the console where librespot is running I can see the message
When I start Spotify, I can't see the librespot device name in the list of available Spotify Connect devices.
The firewall rules allow hosts in the LAN to connect to every tcp/udp port of all the devices in the network with the raspberrypi, but not the other way around. Is there any communication happening from librespot to the spotify app that requires ports to be opened?
@sashahilton00 commented on GitHub (Jan 29, 2018):
Tuesday Jul 05, 2016 at 18:23 GMT
(Just to confirm, does non-discovery authentication work ?)
The 404 is normal, does
http://XXX.XXX.XXX.XXX:38143/?action=getInfowork ?Here's my educated guess at the issue.
Discovery uses mDNS, which normally relies on multicast UDP on port 5353.
However Spotify has it's own implementation which uses unicast instead (if a Spotify engineer reads this, fyi this goes against the RFC)
Your router is probably letting multicast through but not unicast, which explains why avahi-browse works.
I don't think the client uses a fixed UDP port to receive packets, though you could fire up wireshark to check.
Does your firewall let you filter packets by source IP/port ?
Port 5353 from the Pi is where the packets come from.
Let me know if this helps !
@sashahilton00 commented on GitHub (Jan 29, 2018):
Tuesday Jul 05, 2016 at 18:29 GMT
Do you have access to an iOS device? I think Spotify uses Apple's implementation of mDNS on there, which appropriately uses multicast. If it works it would confirm my suspicions.
@sashahilton00 commented on GitHub (Jan 29, 2018):
Tuesday Jul 05, 2016 at 19:02 GMT
Non-discovery auth: not tested, will give it a try.
The 404 doesn't bother me that much, was just a way to confirm that librespotify is receiving and responding to packets coming from the LAN, and it does.
The firewall allows all UDP packets with destination port 5353 to flow in both directions. I don't have an iOS device to verify, will try to get my hands on one of them in the next days.
Keep in mind that, using separate subnets, the firewall has avahi-daemon working as reflector.
I'll run some more tests to try to pinpoint the issue. In the meantime I just moved the raspberrypi to the LAN and everything works fine - thanks for this amazing piece of software :)
@ComlOnline commented on GitHub (Jan 31, 2018):
@giannello Did you get anywhere with this?
@ComlOnline commented on GitHub (Feb 5, 2018):
Since the zero-config port addition and the fact that this is an environment issue, I'm going to close this. If you need any more help let us know.