hrkfdn / ncspot

Cross-platform ncurses Spotify client written in Rust, inspired by ncmpc and the likes.

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

add support for --ap-port option

gilcu3 opened this issue · comments

Is your feature request related to a problem? Please describe.
This would solve issues with restrictive firewalls which block connections in the 4070 port but allow it on 443, which explains #90 and #1229

Describe the solution you'd like
librespot supports --ap-port 443 option, please make it available as an option to ncspot as well

PS:
I tested simply adding a line session_config.ap_port = Some(443); in function

ncspot/src/spotify.rs

Lines 131 to 141 in c0b78d3

pub fn session_config() -> SessionConfig {
let mut session_config = SessionConfig::default();
match env::var("http_proxy") {
Ok(proxy) => {
info!("Setting HTTP proxy {}", proxy);
session_config.proxy = Url::parse(&proxy).ok();
}
Err(_) => debug!("No HTTP proxy set"),
}
session_config
}

and it works on my environment. Adding proper support would require adding a config/command line option though.