[GH-ISSUE #59] Allow configuring the ap_port #13

Closed
opened 2026-03-02 23:43:40 +03:00 by kerem · 3 comments
Owner

Originally created by @bartlibert on GitHub (Jun 30, 2022).
Original GitHub issue: https://github.com/aome510/spotify-player/issues/59

Originally assigned to: @aome510 on GitHub.

The proxy at my work is really strict on outgoing ports. I see from the librespot logs that most of the time, for authentication, the ap tries to connect to a server using port 4070 (e.g. ap-gew1.spotify.com:4070). This times out in the end, because the port is blocked.

I did a quick hack here:
github.com/aome510/spotify-player@52908a4d13/spotify_player/src/auth.rs (L39)

and here:
github.com/aome510/spotify-player@52908a4d13/spotify_player/src/auth.rs (L82)

To use a SessionConfig with ap_port Some(443) instead of the defaults, and now the app works.

Would it be possible to implement a possibility to configure this port in the config file?

Thanks!

Originally created by @bartlibert on GitHub (Jun 30, 2022). Original GitHub issue: https://github.com/aome510/spotify-player/issues/59 Originally assigned to: @aome510 on GitHub. The proxy at my work is really strict on outgoing ports. I see from the librespot logs that most of the time, for authentication, the ap tries to connect to a server using port 4070 (e.g. ap-gew1.spotify.com:4070). This times out in the end, because the port is blocked. I did a quick hack here: https://github.com/aome510/spotify-player/blob/52908a4d13a5cb72503a9eafa536e9a47e6f9a60/spotify_player/src/auth.rs#L39 and here: https://github.com/aome510/spotify-player/blob/52908a4d13a5cb72503a9eafa536e9a47e6f9a60/spotify_player/src/auth.rs#L82 To use a SessionConfig with ap_port Some(443) instead of the defaults, and now the app works. Would it be possible to implement a possibility to configure this port in the config file? Thanks!
kerem closed this issue 2026-03-02 23:43:40 +03:00
Author
Owner

@aome510 commented on GitHub (Jun 30, 2022):

Thanks for taking a look into this.

Would it be possible to implement a possibility to configure this port in the config file?

That should be easy. Will create a patch by EOD.

<!-- gh-comment-id:1171289747 --> @aome510 commented on GitHub (Jun 30, 2022): Thanks for taking a look into this. > Would it be possible to implement a possibility to configure this port in the config file? That should be easy. Will create a patch by EOD.
Author
Owner

@aome510 commented on GitHub (Jul 1, 2022):

@bartlibert created the patch here. Can you check out the branch and run the app locally to see if the patch works.

ap_port is configurable by adding a app_port={port} line in your app.toml.

<!-- gh-comment-id:1171825493 --> @aome510 commented on GitHub (Jul 1, 2022): @bartlibert created the patch [here](https://github.com/aome510/spotify-player/pull/60). Can you check out the branch and run the app locally to see if the patch works. `ap_port` is configurable by adding a `app_port={port}` line in your `app.toml`.
Author
Owner

@bartlibert commented on GitHub (Jul 1, 2022):

I tested the port setting with this branch, and it works fine, thanks! I have no proxy available to test, so that part is untested, but I guess it's very similar, so it should work as well.

<!-- gh-comment-id:1171989177 --> @bartlibert commented on GitHub (Jul 1, 2022): I tested the port setting with this branch, and it works fine, thanks! I have no proxy available to test, so that part is untested, but I guess it's very similar, so it should work as well.
Sign in to join this conversation.
No milestone
No project
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set.

Reference
starred/spotify-player#13
No description provided.