Change the connection check for AD to a jolla url instead of google

Hi, I asked Jolla support first and they told me to put it here:
If an app is started and it needs an internet connection it will check for it by establishing a connection to an external server. When this is done in native Sailfish OS apps / SailfishOS itself, this check is send to for instance “ipv4.jolla.com/return_204”. (that is fine)

If we are talking about an Android app in “Alien Dalvik”, the request seems to be send to “connectivitycheck(-dot-)gstatic(-dot-)com(-slash-)generate_204” or “google(-dot-)com(-slash-)gen_204”.
(sorry… new users can not put more than 2 links into a post so I had to improvise)

Attached to this you will find an image showing the different connections occuring when using an “Alien Dalvik” based app.

If I am not wrong (I might be… this is only something I’ve been told), the /e/-project changed this behaviour and I would like to know if there is a possibility to not do the check to a Google server when using Alien Dalvik but for instance to the Jolla-Server too.

It is not really bad, but it would be great if that could be considered in future releases so Google does not always get the information that your IP connected to something.

Best regards
Fuchur

10 Likes

I am not sure that its a good idea for jolla to provide this service themselfs. There might be feasible alternatives, but I would expect that such a connectivity check should be widely supported by infrastructure. I would assume that you don’t want every connectivitycheck call to go around the world first but rather have that service in the local net.

I am no expert however, this just sprang to my mind when I read this.

For more privacy (if you have the possibilities to) you can host your own servers like that (apache here):

<VirtualHost *:80>
	ServerName v4.example.com

	ServerAdmin you@example.com
	DocumentRoot /var/www-v4

        <IfModule mod_removeip.c>
                REMOVEIPenable On
        </IfModule>


	ErrorLog ${APACHE_LOG_DIR}/v4-error.log
	CustomLog ${APACHE_LOG_DIR}/v4-access.log combined

	<Location /return_204>
    		Header always set X-ConnMan-Status "online"
	</Location>
	RedirectMatch 204 ^/return_204$
</VirtualHost>

(same for a ipv6 site)

And change the site names in /etc/connman/main.conf - this is - of course - for the SFOS-side not Dalvik. Probably overwrite connectivitycheck.gstatic.com to the own site in androids hosts (wherever it is in Dalvik)?

According to Defender app the hosts for Android/Alien are here:

android1_hosts="/system/etc/hosts"
android2_hosts="/opt/alien/system/etc/hosts"

But be warned: If you use e.g. Defender this will kill you hosts setup!

1 Like

Jolla provides the service itself (ipv4.jolla.com and ipv6.jolla.com as defined in `/etc/connman/main.conf) but this is somehow missing on the Android part.

2 Likes

Since it is already done for SailfishOS native apps with the jolla service, it should work for AD-stuff for SailfishOS users too, or am I missing something (@thigg)?
If not possible, why not make it changeable in the settings so you can put in your own and by default it is the jolla server there too or if not possible make it the google one or any other provider?

Just give the option to change it and do not send it without being able to change it easily to google.

2 Likes

I very much support this proposal :slight_smile:

1 Like