Does anyone know if OpenWRT could function in an educational setting where a classroom needed to browse the web when-internet-available, but if not available, then browse whatever cached pages we had somehow on-the-box?
So we would need to cache pages in real time when-the-user was able to see the web. This is for intermittent wan connections which in this scenario happens a lot.
This is a real world need and I was wondering if anyone had done it. Thank you for your help.
If general purpose file sharing is all that is necessary (say PDF files, etc.), it would certainly be possible to use OpenWrt as a file sharing system. It's not ideal for this purpose, but it could certainly work.
What server? What cached page? As @slh stated earlier, most websites now use https, so you cannot cache pages in any meaningful way.
What you are probably looking for is a proxy server with caching.... those have historically been where the page caching has happened, not on routers. However, with https, this just isn't a thing anymore. But OpenWrt would not be a good choice for a caching proxy server.
ONLY In case you are willing and able to install special certificate on the users device, you will be able to cache quite a few, not all, https sites. However, this setup is not trivial.
Which then might be done using openwrt, or full Linux, like ubuntu. Which is preferred, because of better docs. However, upper level processor and reasonable amount of RAM required for acceptable response times. Sufficient mass storage for caching, i.e. SSD, assumed.
it depends on what site you visit, how the site is built, level of security exists on the site ...
back in time caching proxy like squid for example was used to - as implied by the name - cache web content you visited, which worked nicely because in past HTTP was used. nowadays, modern decent web sites are using HTTPS to secure communication between client and server. and other "whistles" like HTST, OCSP etc on top of TLS1.3, which all prohibit traditional caching proxies to do their job. i.e. they cannot sit in the middle between client and server to capture traffic and cache / filter.
other pain point can be if the site you are visiting is working with dynamic content, generated on-the-fly.
so your possibilities are limited:
try to save web site content to local file - this could work if content is mostly static. but you need to resolve how to share files.
use HTTPS caching proxies - which exist but as others already said it will require HTTPS intercept, you must have a good understanding how TLS is working in order to "lie" your proxy's certificate to clients instead of destination site's. basically your proxy will act as man-in-middle attacker.
you may clone web content to a local web server (as suggested already) and then use local DNS entry to assign the real, public web server's ip address and your local web server. in this way if public one is not working still the local ip will work.
obviously to mimic the real web server is less likely to work if content is dynamically generated, for example using data from a database, in case it is unlikely you can replicate properly the site.
better option to add a 2nd wan link on different medium if possible, for example a mobile internet as contingency.
Since money is a consideration (and reasonably so), what OpenWrt devices are you planning to deploy?
is the classroom stuff served on a site via http or https? Is the data available to you to download as an entire site package (i.e. could you run your own local web server for this content)? Does it change frequently? Is it personalized content (i.e.per student for uploads and/or downloads), or is it just a virtual version of classroom text books and activities?
So that basically means the answer here is going to be "no." As stated by others, it's not impossible, but this is not trivial. Especially if the content is not static and may be personalized on a per-student basis.
The ideal case would be for you to work with the content provider to enable a mirrored solution on some local web server that you can run... but that means the content can't be that dynamic, and personalized logins are not going to work.