spotube
spotube copied to clipboard
Add proxy support
Is your feature request related to a problem? Please describe. Since I can't connect to many platforms because of censorship, I always use the proxy settings; but IDK where to implement them here!
same here, from China mainland.
I kind of have no idea how proxy works because I never had to use it. If anyone of you are experienced with proxy & flutter please share
I kind of have no idea how proxy works because I never had to use it. If anyone of you are experienced with proxy & flutter please share
https://github.com/Sangwan5688/BlackHole/search?q=proxy&type=commits, but this is http proxy only, while many users would prefer a socks one
Disclamer: I have no idea what I'm doing, I'm not familiar with flutter I've made a spotube-socks5 demo, it has hardcoded local socks5 proxy. I have no idea how to add a settings menu for proxy, so I'll just leave it here in hopes that this would help. I works globally within the app.
Package used: flutter_socks_proxy [MIT license]
For Linux users, there is an option to run spotube using proxychains tool and it will tunnel the application through a custom proxy
Sorry bro.. Forgot to add this feature request to Todo
spotify has left my country, so im w8 so much for proxy support in spotube
I kind of have no idea how proxy works because I never had to use it. If anyone of you are experienced with proxy & flutter please share
its easy to implement proxy via http CONNECT https://en.wikipedia.org/wiki/HTTP_tunnel#HTTP_CONNECT_tunneling idk dart lang, but there is a pseudocode example:
function http.proxyRequest(proxy, request)
connection = http.connect(proxy.host, proxy.port, proxy.tls)
connection.write("CONNECT", {
["Host"] = request.host,
["Proxy-Authorization"] = proxy.credentials
})
response = connection.read()
if response and response.code == 200 then
connection.host = request.host
connection.port = request.port
connection.tls = request.tls
connection.write(request.method, request.headers, request.body)
return connection.read()
else
retry with another proxy...
end
end
hi thanks for write this application please if it possible set upper priority for this option in many country spotify is block thanks
I'd love to add this feature but I'm just not sure how to approach it. Looking for an expert on this topic for months :)
I think this is no longer required/valid as Spotube now uses piped API which is accessible globally
If the default server API (kavin.rocks
) is not available in your region you can change it from "Settings" > "Piped Server Instance" selector
You can find which server is closer to your region in Piped Wiki
i have no "Piped Server Instance" in settings, is this feature released?
screenshots
It's available in nightly release
login is not proxied
ok, then I tried to login with my http proxy server - i got 403 (login in browser spotify app works ok)
seems like when i try with my own proxy spotube login button still opens https://www.spotify.com/int/why-not-available/
because in browser when proxy enabled on this page i got 403 too, like in spotube login
i think its cached?
Please allow using a custom Piped instance like how Libretube handles that.
I have the 403 issue too, maybe you can make that the login instance opens in the default browser. Idk if it's possible but i think that it would solve the problem
"login instance opens in the default browser" - yep this would allow to proxy browser http requests and pass the login stage, rn the application is just useless in countries where spotify left :(
Or it will be great to give a choice between the in app browser and the cookie method (like in the pc version).
same here, from China mainland.
same here, from Iran.
Piped Server Instance
I can't access github in my region, reading the online Piped Server Instance fails.😂
As well as I can build my own piped server, hopefully I can customize the input server address.
I can't access github in my region, reading the online Piped Server Instance fails.😂
Dang it. I should've thought of it earlier. I'll provide some default server list and also a field to manually add a Piped instance url
@KRTirtho I noticed that even if we use a custom Piped instance Spotube fetches playlists and track info from Spotify which is also blocked in many countries and the Spotube is not able to fetch those data so the app won't work at all. Maybe there should be some sort of local caching at least for user playlists, So without any proxy we can play our own playlists using a custom piped instance.
I'm thinking of better solutions to handle that, maybe something like piped API but just to fetch info and playlists from Spotify.
You can use VPN probably
I'd love to add this feature but I'm just not sure how to approach it. Looking for an expert on this topic for months :)
Probably check if the proxy is selected and check if the proxy is accessible, then another check if proxy is enabled and is accessible use it for query and download
It seems the http client limit on dart, maybe we can try some solution from https://github.com/flutter/flutter/issues/26359
You can use the terminal proxy
export https_proxy=http://127.0.0.1:$port;export http_proxy=http://127.0.0.1:$port;export all_proxy=socks5://127.0.0.1:$port
, then open spotube application in terminal
/Applications/spotube.app/Contents/MacOS/spotube
don't close termainal.
You can use the terminal proxy
export https_proxy=http://127.0.0.1:$port;export http_proxy=http://127.0.0.1:$port;export all_proxy=socks5://127.0.0.1:$port
, then open spotube application in terminal
/Applications/spotube.app/Contents/MacOS/spotube
don't close termainal. use this command open can close terminal
nohup /Applications/spotube.app/Contents/MacOS/spotube &
You can use the terminal proxy
export https_proxy=http://127.0.0.1:$port;export http_proxy=http://127.0.0.1:$port;export all_proxy=socks5://127.0.0.1:$port
, then open spotube application in terminal
/Applications/spotube.app/Contents/MacOS/spotube
don't close termainal.
it is work well under windows
You can use the terminal proxy
export https_proxy=http://127.0.0.1:$port;export http_proxy=http://127.0.0.1:$port;export all_proxy=socks5://127.0.0.1:$port
, then open spotube application in terminal
/Applications/spotube.app/Contents/MacOS/spotube
don't close termainal. use this command open can close terminal
nohup /Applications/spotube.app/Contents/MacOS/spotube &
It works very well, thanks!
Is there any progress now? I am a Windows user/
windows user in mainland China, hoping for socks5 support.