Yes, you can change it in the Android source code. E.g. you can fork FP Open or Lineage OS.
But actually for Wifi I’m surprised. Is it a Google sponsored Wifi or why can’t you open the login page without gstatic? It does not sound logic to me, that it does not work.
I had another, more recent post in mind in fact, but I didn’t find it … but these posts should do … all hail the forum search engine (which probably is innocent, but more convenient to blame instead of our brain) …
Login pages are opened by going to this URL. The wifi network - if it has a login page - is expected to redirect you to the login page when that URL (or any other one with HTTP protocol) is requested.
And, as soon as this URL does not return an error or a redirect, a connection to the Internet is detected.
By blocking it, you indeed break both login pages and connection detection. You can disable both features if you want, but then you don’t get a login page notification; and you also don’t see ‘no internet available’ any more when there is actually no internet.
If you’re using an open-source OS such as FP Open OS or Lineage it should be possible to have the URL changed. However, someone needs to host a comparable page and I don’t know whether Fairphone is willing to host a connectivity check on their own servers. Fairphone being a small company would need considerable effort to ensure as much uptime as possible for a page that breaks functionality on your phone when it’s down.
If someone knows how to get some prifacy changes into the fairphonewrite /lineageos image or know how to write xposed plugins, please add some settings to “developper settings” which allow activate/deactivate and manipulate DNS and Dowload address of the connections we discused above.
I’m thinking about setup a cache for the quallcom files and place a 204 site on my own website. An other public dns could be made default also.