aleab / toastify

:mega: TOASTIFY DEVELOPMENT HAS STOPPED | Toastify adds global hotkeys and toast notifications to Spotify
https://aleab.github.io/toastify
GNU General Public License v2.0
434 stars 48 forks source link

Cannot connect to Spotify if it's using a SOCKS proxy #72

Open faridv opened 6 years ago

faridv commented 6 years ago

I cannot make Toastify to connect to Spotify if it's connection is using proxy. I use Tor socks proxy and have tried both Toastify settings to add proxy info and manually changing Toastify.cfg. In both cases it gives me this error: Invalid proxy settings. Returned error code: NotImplemented

"UseProxy": true,
  "ProxyConfig": {
    "Host": "127.0.0.1",
    "Port": 9150,
    "Username": "",
    "BypassProxyOnLocal": true
  }

Here is the log file: Toastify.log

faridv commented 6 years ago

By looking at the log file, I found a strange error stack trace! Following local file path is hardcoded:

20:43:49,229+04:30 WARN  [Toastify.Core.Spotify.ConnectWithSpotify, 324] (6) – Proxy settings had no effect! Returned error code: NotImplemented
System.Net.WebException: The remote server returned an error: (501) Not Implemented.
   at System.Net.WebClient.DownloadDataInternal(Uri address, WebRequest& request)
   at System.Net.WebClient.DownloadString(Uri address)
   at SpotifyAPI.Local.RemoteHandler.GetOAuthKey()
   at SpotifyAPI.Local.RemoteHandler.Init()
   at Toastify.Core.Spotify.ConnectWithSpotify(DoWorkEventArgs e) in E:\Users\Alessandro\Documents\Visual Studio 2017\Projects\toastify\Toastify\src\Core\Spotify.cs:line 324
aleab commented 6 years ago

SOCKS proxies are not supported at the moment; only HTTP(S) for now.