Login at Kodi Home


I want to install Kodi on my Linux system (Flatpak package, probably), but I need it to be connected to the internet via a proxy running on my host (I have both HTTP and SOCKS5, both with authentication).
In the past I tried to use the HTTP proxy with Kodi on my Fire Stick and I noticed that an extension was not detected the public internet IP of the VPN behind the proxy, rather it detected my real public IP, so it was not using the proxy.
IDK whether it’s possible or not on Kodi, what do you think?
What alternatives do I have, otherwise?
Note: I cannot run the VPN at system level, I need to do it per app using the proxy!