New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Add proxy support #88
Comments
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 |
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 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
its easy to implement proxy via http CONNECT https://en.wikipedia.org/wiki/HTTP_tunnel#HTTP_CONNECT_tunneling 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 |
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 ( |
It's available in nightly release |
login is not proxied |
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 Iran. |
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. |
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 |
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 flutter/flutter#26359 |
tried netsh winhttp set proxy localhost:1080 and starting the app, time out as well |
Please try to follow the steps below.
|
thanks, but don't think it works |
Can you even log in?
|
it works as expect on my windows 11. |
I have a SSH tunnel, so socks5 proxy. @rockxsj What type of proxy do you have? |
Because of multiple duplicates regarding SOCKS5 support, I thought I'd looked into it. The flutter_socks_proxy package makes this look as easy as adding a text field in the settings page. I tested using Charles Proxy, but it's hard to tell if every thing is working as it should. If someone could test from my changes and report back, that would be awesome! Here's a video of how the field works: Spotube.2024-02-20.18-55-50.mp4 |
@olivier2 any instructions on how to build on Windows? |
These build instructions for Spotube might be the only steps you really need (Install SDK and call the flutter commands to build/run) If you're planning on developing for flutter, check out setting up an editor for flutter. |
@olivier2 getting build errors, maybe I will wait for the nightly release. |
If using MacOS. You should be fine to close terminal if you use |
Did you run: The nightly only contains changes from the dev branch, but my changes are in a completely different fork. |
Attached is the terminal output from building on Windows, getting a different error message now. How do I check out your changes? Sorry, kinda newbie here. |
Hi. I've cloned proxy-setting branch and built the Windows app.
The full log is log_2402271108.txt It seems that the proxy is not applied to every internet-related functions maybe. |
if set proxy related environment variables works, on macOS you can install https://github.com/hschmidt/EnvPane to set environment variables for all GUI apps |
Does setting these env vars actually works? If it works, I can add a Proxy section in the settings page that can be used to override these variables |
Same here, getting the 403 thing on android. An option to put the token manually would be nice. |
Indeed, it does. Here's my slightly edited desktop entry to launch with proxy.
|
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!
The text was updated successfully, but these errors were encountered: