mirror of
https://github.com/librespot-org/librespot.git
synced 2026-04-27 00:05:55 +03:00
[GH-ISSUE #91] Option for forcing port to listen on #79
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#79
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/91
Saturday Sep 23, 2017 at 11:11 GMT
Originally opened as https://github.com/plietar/librespot/issues/253
Currently, librespot listens on 5353 and a random port. This makes running it on a pc with firewall difficult. It would be nice if there was an option to select a specific port instead.
I've never programmed in rust before, so I haven't made a PR for it. Currently locally I solved it by simply putting my port instead of 0 in the following piece of code:
TcpListener::bind(&"0.0.0.0:0".parse().unwrap(), handle)?;.@ComlOnline commented on GitHub (Jan 29, 2018):
Runtime flag to be added
@sashahilton00 commented on GitHub (Jan 29, 2018):
This has been requested a few times, we should implement this as it's pretty trivial to do so. Runtime flag of
--zeroconf-portsuggested. Usage would be as follows:./librespot --name "Librespot" --zeroconf-port 5353one thing we must remember though is that any port number lower than 1024 are priviledged, so we should probably add some logic that rejects ports < 1024 and kicks out a warning that their chosen port has been ignored, then let the OS choose as it already does.@michaelherger commented on GitHub (Jan 30, 2018):
In addition to allowing specification of the port to listen on, librespot should not die if it fails to open that port. IMHO an error message logged should be good enough.
(adding "mdns" to this comment as I keep searching for it and don't find this report :-))
@michaelherger commented on GitHub (Jan 30, 2018):
mdns is implemented using @plietar's own https://github.com/plietar/rust-mdns. I tried to change port by changing the hard-coded value in there to 5354. Unfortunately the Spotify client would no longer see it, as if it was expecting the service to run on 5353 and nothing else.
@sashahilton00 commented on GitHub (Jan 30, 2018):
Implemented with the
-zor the--zeroconf-port