Komet / MediaElch

Media Manager for Kodi
https://mediaelch.github.io/mediaelch-doc/about.html
GNU Lesser General Public License v3.0
845 stars 94 forks source link

With proxy enabled the library update does not work #1430

Closed b-m-f closed 1 year ago

b-m-f commented 2 years ago

Describe the bug With the proxy enabled, the request to update the library in Kodi will not trigger

To Reproduce Steps to reproduce the behavior:

  1. Enable Socks5 Proxy
  2. Click on update Kodi library/Clean library
  3. Nothing is triggered on the Kodi Instance
  4. See error / Crash

Expected behavior Library update is triggered

MediaElch Version:

Operating System:

bugwelle commented 2 years ago

Hi,

sorry to hear that. Proxies as well as the sync feature is not something I use myself. I will try to reproduce and fix this issue soon.

Does MediaElch crash? If so, do you get any output?

For others reading this: Help is welcome, though.

Regards, Andre

b-m-f commented 2 years ago

Hi,

It does not affect MediaElch in any way. The API call simply doesn't reach the Kodi instance on the local network.

I'm guessing there I single point where all traffic leaves MediaElch from?

Maybe the Kodi Update function needs to have a special way of sending traffic or a boolean to bypass the proxy?

bugwelle commented 2 years ago

Out of curiosity: What proxy are you using? i.e. do you use a local one or a public one? Is your Kodi instance reachable through the (public) proxy? Can you download movies/concerts/shows/... with the proxy enabled?

b-m-f commented 2 years ago

The Kodi instance is not reachable through the proxy. It lives on the local network.

Downloading works as expected. Its a public SOCKS5 proxy.

bugwelle commented 2 years ago

Hi,

ok. Maybe I am misunderstanding your issue, but if the Kodi instance can't be reached through the proxy, what do you expect MediaElch to do? We don't skip the proxy just for the Kodi instance. It is a global setting, i.e. either all or no network requests go through the proxy. :-)

Regards, Andre

b-m-f commented 2 years ago

I was thinking to split the traffic. Sent internet traffic through a proxy and route traffic to the Kodi instance normally.

Purely for privacy concerns :)

bugwelle commented 2 years ago

Ah, thanks. :-)

We use Qt's QNetworkProxy with QNetworkProxy::setApplicationProxy(proxy);, i.e. a global proxy that is used for all connections.

It may be possible to deactivate the proxy for the Kodi connection only. Would that be sufficient for you?

Regards, Andre

b-m-f commented 2 years ago

That would fit the use-case 100%!

bugwelle commented 2 years ago

Sorry for the late reply. #1442 will implement this. Disclaimer: I haven't deeply tested this.

Do you use an AppImage or did you build MediaElch yourself? :-)

b-m-f commented 2 years ago

Using AppImage. But I can build it to test during the week.

bugwelle commented 2 years ago

Latest AppImage available on https://mediaelch-downloads.ameyering.de/snapshots/Linux/

b-m-f commented 2 years ago
MediaElch 2022-06-01 17:37:17.912 DEBUG : [KodiSync] Disbaled Proxy
MediaElch 2022-06-01 17:37:19.127 INFO  : [KodiSync] Start Sync
MediaElch 2022-06-01 17:37:23.408 WARN  : [TmdbApi] Network Error: "Operation canceled" for URL QUrl("https://api.themoviedb.org/3/configuration?api_key=5d832bdf69dcb884922381ab01548d5b&language=en-US")

The proxy doesnt seem to start back up again.

Going into the settings enables it again. MediaElch 2022-06-01 17:39:47.853 INFO : Using Proxy: Socks5Proxy

b-m-f commented 2 years ago

MediaElch_linux_2.8.17-dev_2022-06-01_03-16_git-master-387e02f.AppImage is the version I have tried

bugwelle commented 2 years ago

The proxy doesnt seem to start back up again.

hmmm... Should only be disabled for Kodi. Could [TmdbApi] Network Error: "Operation canceled" for URL be due to the proxy or do you think this happens because the proxy is not used?

b-m-f commented 2 years ago

I'll recheck soon and let you know!

bugwelle commented 1 year ago

I'm closing this issue due to inactivity. If you find the time to re-check and the issue still persists, don't hesitate to reply and I will re-open this issue.

Regards, Andre