Bug 302598 - Add Proxy support with MediaWiki server
Summary: Add Proxy support with MediaWiki server
Status: RESOLVED FIXED
Alias: None
Product: digikam
Classification: Applications
Component: Plugin-WebService-MediaWiki (show other bugs)
Version: 1.0.0
Platform: Compiled Sources Linux
: NOR wishlist
Target Milestone: ---
Assignee: Digikam Developers
URL:
Keywords:
Depends on:
Blocks: 379608
  Show dependency treegraph
 
Reported: 2012-06-26 21:10 UTC by Peter Potrowl
Modified: 2023-12-21 14:27 UTC (History)
2 users (show)

See Also:
Latest Commit:
Version Fixed In: 8.3.0


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Peter Potrowl 2012-06-26 21:10:30 UTC
I compiled the digiKam KIPI plugin WikiMedia uploader and it is working very well (I can connect to Wikimedia Commons and upload pictures).

Now, I'm behind a proxy (well configured on my system settings) and I cannot connect anymore.

Since this KIPI plugin is using libmediawiki for all login/upload operations, I'm pretty sure the reason is that libmediawiki is lacking proxy management.

I looked at the source code and found no place where the proxies are managed.

I tried to add QNetworkProxyFactory::setUseSystemConfiguration(true); in mediawiki.cpp but after recompilation, I obtain the same result.

I also noticed that libmediawiki uses QNetworkAccessManager. Since it is a KDE library, shouldn't it use KIO for network operations?

Reproducible: Always

Steps to Reproduce:
1. Compile and run digiKam with the KIPI plugin MediaWiki uploader
2. Connect to a wiki
3. Behind a proxy, it fails
Comment 1 Adrián Chaves (Gallaecio) 2014-06-17 17:23:39 UTC
I’ve asked for feedback as I don’t really know where to start: http://mail.kde.org/pipermail/kde-testing/2014-June/000395.html
Comment 2 Christoph Feck 2014-07-20 20:50:27 UTC
I guess you should have posted that question to the kde-devel or even kde-core-devel list. Since it mentions proxies, even CC'ing kfm-devel might make sense.
Comment 3 Adrián Chaves (Gallaecio) 2014-12-19 18:44:10 UTC
“I also noticed that libmediawiki uses QNetworkAccessManager. Since it is a KDE library, shouldn't it use KIO for network operations?”

I’ve been reading about how proxy is handled in KDE applications, and there is not much information. As far as I can see, the reason for there not being much information is because KIO handles proxy configuration automatically.

In other words, I agree with you, I will look into porting the current code to KIO, hopefully solving the proxy support issue.
Comment 4 Adrián Chaves (Gallaecio) 2015-03-01 11:49:08 UTC
I've started looking into porting libmediawiki to KF5, and if it depended on KIO it would become a tier 3 framework. That seemed a bit high for a library that is conceptually as simple as this library.

I checked the list of Tier 1 frameworks, and first in the list there is Attica, which is basically the same as libmediawiki but for a different service API. So I figured there must be some way to use proxy settings without depending on KIO.

So I searched a bit again, and found that a simple static call may be all I need: http://stackoverflow.com/questions/9526473/how-can-i-automatically-detect-a-proxy

I will try that after the port to KF5 instead of moving to KIO. If that does not work, I’ll check Attica’s code to see what they are doing to support conections behind a proxy, and if I cannot find that code I’ll just ask the developer of Attica. It must definitely be doable without depending on KIO.
Comment 5 caulier.gilles 2016-01-16 12:52:55 UTC
What's about this entry with KF5 port of libmediawiki ?

Peter, this problem still valid ?

Gilles Caulier
Comment 6 Peter Potrowl 2016-01-16 13:23:35 UTC
Gilles,

I cannot test it now but I may have an occasion to try connecting behind a proxy before the end of this month.

I will post more information when I can.
Comment 7 caulier.gilles 2023-12-21 14:27:52 UTC
Git commit c6b5d83df049df850b216b10397f63d167ad7dc1 by Gilles Caulier.
Committed on 21/12/2023 at 15:26.
Pushed by cgilles into branch 'master'.

Add generic Network Proxy settings for digiKam and Showfoto.
Related: bug 379608
FIXED-IN: 8.3.0

M  +0    -1    core/utilities/geolocation/marble/CMakeLists.txt
M  +0    -8    core/utilities/geolocation/marble/core/MarbleGlobal.h
M  +2    -112  core/utilities/geolocation/marble/settings/MarbleConfigView.cpp
M  +0    -10   core/utilities/geolocation/marble/settings/MarbleConfigView.h
M  +2    -0    core/utilities/setup/CMakeLists.txt
R  +2    -2    core/utilities/setup/misc/proxysettingswidget.ui [from: core/utilities/geolocation/marble/settings/proxysettingswidget.ui - 099% similarity]
M  +61   -0    core/utilities/setup/misc/systemsettings.cpp
M  +19   -6    core/utilities/setup/misc/systemsettings.h
M  +45   -9    core/utilities/setup/misc/systemsettingswidget.cpp

https://invent.kde.org/graphics/digikam/-/commit/c6b5d83df049df850b216b10397f63d167ad7dc1