Thank you for your donation!


Cloudsmith graciously provides open-source package management and distribution for our project.


Self Hosting Connectivity Check on MoodeOS
#2
@psychofaktory 

You've already done the heavy lifting by installing dnsmasq and configuring it and the hosts file.

nginx is used by moOde to serve its webUI, you should need only adjust it to support the new virtual hosts. To do this the nginx "way", create a file in /etc/nginx/sites-available with a suggestive name such as walled-garden.conf with contents similar to what is shown in your second hyperlinked reference, i.e.


Code:
# =====================================================================
# = android walled garden hack                                        =
# =====================================================================

server {
   server_name
       clients3.google.com
       clients.l.google.com
       connectivitycheck.android.com
       connectivitycheck.gstatic.com
       play.googleapis.com
       ;
   listen 80;

   location /generate_204 {
       return 204;
   }
}


Obviously you need include only the domains you've added via dnsmasq. I suspect just connectivitycheck.gstatic.com may be sufficient.

The file should have the same permissions as the files already in the directory.

Now, in the parallel /etc/nginx/sites-enabled directory, create a symlink to the file you just created (see the existing /etc/nginx/sites-enabled/moode-http.conf symlink as an example.

Finally, restart the nginx service. you should be good to go (and let me know either way).


As an aside, it's true that Android contains code to check for Internet connectivity but various handset vendors treat the results differently.

For example, my Google Pixel 6a phone (also Android 13) will say of my moOde AP "This network has no internet access. Stay connected?" I can choose yes (and choose to tell it to remember I said so) and then the moOde webUI is fully performant on the phone.

Regards,
Kent
Reply


Messages In This Thread
RE: Self Hosting Connectivity Check on MoodeOS - by TheOldPresbyope - 03-21-2023, 06:08 PM

Forum Jump: