Bug 414469 - Option to change captive portal check url to other one
Summary: Option to change captive portal check url to other one
Status: RESOLVED NOT A BUG
Alias: None
Product: plasmashell
Classification: Plasma
Component: Networks widget (show other bugs)
Version: master
Platform: Other Linux
: NOR normal
Target Milestone: 1.0
Assignee: Jan Grulich
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2019-11-24 19:18 UTC by Daniel
Modified: 2024-12-23 18:25 UTC (History)
5 users (show)

See Also:
Latest Commit:
Version Fixed In:
Sentry Crash Report:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Daniel 2019-11-24 19:18:33 UTC
SUMMARY
Currently, the URL http://networkcheck.kde.org/ is hardcoded and it's not possible to change it to a self-hosted domain. This is not good as KDE phones home in a way and might allow the owner/admin of the corresponding webserver to track who uses plasma-nm and when they connect.
Comment 1 David Edmundson 2019-11-24 20:19:20 UTC
The only hardcoded value is a page to open if connectivity check fails. 

The ping is configured by your distro in your network manager config, see the connectivity section. I don't think any distro would set that to kde? (Though please check)

I don't see the issue?
Comment 2 Daniel 2019-11-25 19:06:07 UTC
If it uses the url set by uri= in connectivity to check whether there is a captive portal, why shouldn't it open that page than? It is super confusing to set a specific URI in settings, but then another one is opened when I click "Log in into network".
Comment 3 Jan Grulich 2019-11-29 11:32:32 UTC
I don't see reason why it matters what web page is opened to invoke the captive portal. Also, having our custom URL allows us to do things like verify the response and invoke CheckConnectivity in NetworkManager to get correct icon in the systray as soon as possible.

See https://phabricator.kde.org/D25466.
Comment 4 postix 2020-10-12 09:56:38 UTC
(In reply to David Edmundson from comment #1)
> The ping is configured by your distro in your network manager config, see
> the connectivity section.

Just to get it right:

It seems at least under Manjaro and Debian there's no captive portal check configured or enabled by default.
One has to create a corresponding config first, e.g.:

/etc/NetworkManager/conf.d/20-connectivity-debian.conf

[connectivity]
uri=http://network-test.debian.org/nm
response=NetworkManager is online
interval=300

If not configured, is the hardcoded http://networkcheck.kde.org/ used as a fallback for probing/opening the captive portal?
If it applies, as long as the URL is not changeable, can the captive portal check be disabled completely?
Comment 5 Daniel 2020-10-12 11:25:21 UTC
(In reply to Postix from comment #4)
> 
> It seems at least under Manjaro and Debian there's no captive portal check
> configured or enabled by default.

I would like to disagree. For Arch, networkmanager is built with the captive portal check-url configured by https://github.com/archlinux/svntogit-packages/blob/6d9a73b44b749ef95c9befe8696b742d0bdbd5a9/trunk/PKGBUILD#L115. And thus enabled, as seen in https://jlk.fjfi.cvut.cz/arch/manpages/man/NetworkManager.conf.5#CONNECTIVITY_SECTION :

> Whether connectivity check is enabled. Note that to enable connectivity check, a valid uri must also be configured. The value defaults to true, but since the uri is unset by default, connectivity check may be disabled. 

Also for Manjaro, a url is configured by default: https://gitlab.manjaro.org/packages/extra/networkmanager/-/blob/master/PKGBUILD#L101 and thus connectivity check is enabled.

Also for Debian, a url is configured by default: https://salsa.debian.org/utopia-team/network-manager/-/blob/debian/master/debian/20-connectivity-debian.conf#L2 and so connectivity check is enabled.


> If not configured, is the hardcoded http://networkcheck.kde.org/ used as a
> fallback for probing/opening the captive portal?

No, as far as I understand and have observed, plasma-nm gets a signal from NetworkManager that there is a captive portal (by checking its configured url). The user then is shown an popup by plasma-nm about limited connectivity. If the user clicks the button there, the url http://networkcheck.kde.org/ gets opened in the browser. So this is a fully different url than the one NetworkManager used to check the connectivity.


> If it applies, as long as the URL is not changeable, can the captive portal
> check be disabled completely?
It can be disabled withing NetworkManager by choosing the options linked at the beginning. The url http://networkcheck.kde.org/ is not contacted (at least as I have observed) until the user clicks that button in the plasma-nm popup.
Comment 6 Ben Cooksley 2024-12-23 18:25:58 UTC
Bulk transfer as requested in T17796