This forum has been archived. All content is frozen. Please use KDE Discuss instead.

Issues with KDE/Plasma and proxy with authentication

Tags: None
(comma "," separated)
rafaellinuxuser
Registered Member
Posts
67
Karma
0
OS
Our computers are on an intranet that uses a proxy to access the Internet, therefore only for the HTTP(S) protocol. The proxy requires authentication by username and password. To use the other protocols (FTP, FISH, Samba), no proxy is used, since they are only accesses to local servers by their IP.

We use Krusader/Dolphin to remotely access computers using FTP/FISH/Samba.

The first problem we encounter under this scenario is that Plasma must distinguish when a native application requires a proxy and when it does not. To make all this work in Plasma, we have created a Proxy Auto-Configuration (PAC) file. In it we specify that all local addresses, do not use the proxy, and for everything else, it does use it (this is the content of the proxy_PAC_configuration.pac file we have created):

if (! (url.substring(0, 4)=="http") ) return "DIRECT";
if (
isPlainHostName(host)
|| shExpMatch(host, "*.local")
|| isInNet(dnsResolve(host), "10.162.0.0.0", "255.255.240.0")
|| isInNet(dnsResolve(host), "127.0.0.0.0", "255.255.255.255.0")
)
return "DIRECT";
return "PROXY 10.160.0.10:3120; ";

We use this file in the Firefox proxy configuration, to be able to access both Internet HTTP(S) servers and our intranet in the URL format "file:///home/rafael/proxy_PAC_configuracion.pac".

In Plasma's proxy preferences, we specify that this file is also used for any application that needs to access the Internet/Intranet.
However, for a few years now, we have had to use for WebKit-based browsers the parameters:
Code: Select all
--disable-namespace-sandbox --proxy-pac-url='... - DELETED CODED - )
, but works anyway, not the issue of this post.

At the system level (outside the windows environment) and some applications (like Qbittorrent) has a configuration form where username and password are specified in the proxy configuration form, so the system does not need to ask for them.

The native Plasma applications however, seem to ignore that file, because none of them are able to access the Internet using that PAC file. It is inferred that all native Plasma applications, should use the proxy configured through Preferences and, however, it is not so. If I try to download any customizable items that require the Internet, such as:

- "Get new global themes" (under "Globable Themes").
- "Get new Plasma styles" (under "Plasma style").
- "Get new window decorations" (under "Window decorations")
- "Get new graphic elements" (in "Graphic elements" with <Alt><D> and then <A> on the desktop)
- etc

I must add that issue is present from beginning, since we began to use KDE years ago.
The proxy configuration at system level is done through Yast (openSUSE tool), and it works perfectly, taking into account that Yast allows to put in the same URL of the proxy, the user and password of access. This allows everything related to the system (updates and downloads) to work smoothly.

I'm sure the problem is related to Plasma, cause Plasma never asks about user/password neccesary to access thru proxy. The PAC file is loading, cause if I change name for a non-existent file, Plasma notifies it can't load that file just after user login screen.


Summary: The PAC file is correctly processed by browsers (with the aforementioned for WebKit based browsers). Those other programs that allow to specify a proxy (QMMP, Qbittorrent, Thunderbird). However, KMail is working correctly. Konqueror and Opera (being WebKit based) need specific parameters like Chrome to be able to use the proxy. When launching "Discover", it curiously asks for the "root" password to access the proxy ...

Operating System: openSUSE Tumbleweed 20211102
KDE Plasma Version: 5.23.2
KDE Frameworks Version: 5.87.0
Qt Version: 5.15.2
Kernel Version: 5.14.14-1-default (64-bit)
Graphics Platform: X11
Processors: 8 × Intel® Core™ i7-9700K CPU @ 3.60GHz
Memory: 15.4 GiB of RAM
Graphics Processor: NVIDIA GeForce RTX 2060/PCIe/SSE2


Bookmarks



Who is online

Registered users: Bing [Bot], Evergrowing, Google [Bot], rblackwell