Remove KIO's KPAC in favor of QNetworkProxy and libproxy
Open, Needs TriagePublic

Description

It's one of the last QtScript users, and duplicating functionality that QNetworkProxy and/or libproxy already have.

Details

Differential Revisions
D23801: Port kpac from QtScript
vkrause created this task.Sep 9 2019, 2:14 PM

@carewolf ported it away from QtScript, https://phabricator.kde.org/D23801

He also said, Qt disabled the use of libproxy back when libproxy linked to Qt4 (clashing with Qt5).
That was probably for reading the KDE proxy settings (!), which nowadays can be done by just using XDG_CONFIG_HOME | ~/.config and not linking to any Qt/KDE code...

The biggest problem is how to test all this...

libproxy does not link against Qt anymore, they use kreadconfig5 and friends to read the values. So using that should be safe.

fvogt added a subscriber: fvogt.Sep 10 2019, 12:13 PM

libproxy does not link against Qt anymore, they use kreadconfig5 and friends to read the values. So using that should be safe.

That's what I wrote on the bug report as well: https://bugreports.qt.io/browse/QTBUG-52252

It's still disabled by default and when enabling it manually there's a huge warning in bold to not do that...

alex moved this task from Backlog to Waiting on Qt Changes on the KF6 board.Oct 28 2021, 3:42 PM

Actually KIO::ProxyScout has to be ported to something else, because QNetworkConfiguration is gone in Qt6, and there is no replacement.

void ProxyScout::disconnectNetwork(const QNetworkConfiguration &config)
{

// NOTE: We only care of Defined state because we only want
// to redo WPAD when a network interface is brought out of
// hibernation or restarted for whatever reason.
if (config.state() == QNetworkConfiguration::Defined) {
    reset();
}

}

nicolasfella renamed this task from Investigate removal of KIO's KPAC in favor of QNetworkProxy to Remove KIO's KPAC in favor of QNetworkProxy and libproxy.

There's one thing in our proxy settings that libproxy doesn't seem to cover: The "Use proxy settings only for addresses in the exceptions list" settings.

nicolasfella moved this task from Backlog to In Progress on the KF6 board.Nov 7 2023, 11:27 PM
nicolasfella moved this task from In Progress to Done on the KF6 board.