-
Notifications
You must be signed in to change notification settings - Fork 956
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
[Bug]: Video not playing if Freetube configured for use socks5 or http proxy. Base network is blocking jnn-pa.googleapis.com and proxy is not blocking it. Error: Error invoking remote method 'generate-po-token': Error: Failed to fetch. #6722
Comments
I created an issue two days ago and it was closed before I could get back to testing and replying, I do have pihole yet I have never blocked jnn-pa.googleapis.com, I have it actually white listed, During more testing I disabled pihole and connect directly to my modem without any sponsor blocks and a different network/IP entirely, Then tried Freetube again, I have found Freetube to work on my end with a vpn without issues. Yet the moment I disable my vpn things start to break again. This is with LocalAPI and with Invidious both tested, Invidious didn't seem to work at all in my case, It doesn't appear to be a pihole issue as stated, Maybe I am misunderstanding? #6678 |
@Lucky00Snake Please provide a working proxy that can be used to test this. |
Not really sure what I must do... Local http or socks5 proxy can be easy configured with sing-box оr some GUI for sing-box like nekobox/nekoray, karing, hiddify etc. Sing-box with free wireguard (e.g. ProtonVPN or Cloudflare Warp) must do the job. Nekobox for Android can even generate proper CF Warp wireguard configuration and be configured to work as a proxy server on local network. Not sure about Tor, though, because Youtube now seems to not really love connections from the tor network. But maybe it will work too. On Linux I can see connections to hosts *.1e100.net (for example lh-in-f95.1e100.net, lj-in-x5f.1e100.net -- that names corresponds with IP addresses resolved from jnn-pa.googleapis.com) in iftop with proxy enabled in FreeTube 0.23.1. Аnd it should not be possible if all traffic from FreeTube goes into the proxy (of course any other processes that can generate such network traffic was stopped or filtered). I cannot see such connections with FreeTube 0.22.1 -- and that is proper behaviour for this version, as I can understand. |
Tor on local network or local PC will work fine. This list is not full and precise, but will do as a temporary measure for test purposes. |
As those steps are a lot more complicated than the simple proxy IP + port combination that I was asking for, it will likely be a lot easier if we provide a test build with the changes that are supposed to fix it and you tell us if it works or not. I was hoping for a simple IP + port combination, as all the ones on the free public lists don't work at all, not instructions for every dev that needs to test the changes having to spend hours reconfiguring their network setup. |
Yes, It will work too. I can do test like that.
That the whole point: if you just set up some proxy in FreeTube it will work as nothing happens. So to recreate the problem you need to alter your network config some way because in most cases is nothing blocks jnn-pa. (It's really rare this days to have a network connection only thru proxy). Or you need to monitor connections of Freetube some way or another - on Linux it's possible with auditd service, for example (the part of auditd log that shows a bunch of connections to google servers made directly, not thru Tor proxy on 192.168.1.2:9050 is attached). Not shure about how to did it on windows. I'm really sorry if I some way offended you. I just thinking that make a firewall rule that you can turn on - turn off instantly is the simpliest way to make a testing in that case. I'm really sorry but I currently can't provide a hosting with proxy. |
Here are three ways to reproduce this issue (plus #6713 and its dups) and demonstrate the poToken code is ignoring the proxy settings. A) System proxy settings + Tor/SSH proxy:
B) Snoop on the network traffic.With the proxy set, all traffic (ignoring dev-runner) should go to the proxy, but it's not. Again, there are many ways to do this and depends on your system and familiarity with the tools (e.g. Resource Monitor on Windows, Activity Monitor on MacOS, tcpdump/lsof/netstat/etc. on unix). I can see it in my DNS logs. C) Use the Source.You can simulate a proxy which blocks everything except what's whitelisted with a simple code change. Set an invalid proxy in src\main\poTokenGenerator.js#generatePoToken. webContentsView.webContents.session.setProxy({
proxyRules: `socks5://0.0.0.0:3128`,
// proxyBypassRules: 'jnn-pa.googleapis.com'
}) This will block/unblock the domain independent of the FreeTube proxy settings producing the error when it's blocked ( This looks like where the code should be setting the proper proxy. I would have submitted a PR but I haven't figured out the best way to get the proxy settings to this part of the code or clone it from |
Layman's explanation of the problem, minus all the networking minutiae: FreeTube, when configured to use a Proxy, does not route all traffic through the proxy. One such example, as was in my case, when connecting to "jnn-pa.googleapis.com" via port 443 on tcp and tcp6. Thank you, hope this helps resolve the issue on the next go around! |
Guidelines
Describe the bug
I checked that both on Linux and Windows 10. Checked socks5 and http proxies. And it seems to me that after Commit 248581d connection to jnn-pa.googleapis.com is needed but it connects directly, not using proxy. If I run VPN and all traffic except local network addresses goes thru tunnel - FreeTube is working fine even if proxy in local net still configured in FreeTube.
Basically that bug renders FreeTube unusable if base network is blocking YouTube or host jnn-pa.googleapis.com or internet connection is possible only thru proxy.
It's connected with issue #6713: #6713 but topic was locked before I can test and post results.
Expected Behavior
Play videos with proxy configured without problems.
Issue Labels
content not loading
FreeTube Version
v.0.23.1
Operating System Version
Debian Linux 12.9
Installation Method
Portable
Primary API used
Local API
Last Known Working FreeTube Version (If Any)
v.0.22.1 nightly build 5363
Additional Information
No response
Nightly Build
The text was updated successfully, but these errors were encountered: