I followed this article to enable DNS Over HTTPS on the router-level. The problem is that it requires installing a package named "stubby" from a remote repository.
When upgrading OpenWrt, even though I checked restoring configurations, it seems that the packages are not restored. So, basically, the Internet connection does not work after upgrading OpenWrt, because the restored configuration relies on "stubby", yet it does not exist, and I cannot install "stubby" from the Web UI, because the Internet is not working. I had to do some cumbersome things like resetting the settings, installing "stubby", and then restoring the settings.
But, is there anyway to install "stubby" offline, like copying the package to another storage before updating OpenWRT, and then copy it back to OpenWRT using SSH, without requiring an Internet connection?
If you need additional packages for connectivity (or for secure DNS etc.), the best approach is to cook a personal firmware image that includes the needed packages.
Other alternative is to download the packages (.ipk files) to your PC before flashing, and then after flashing, first transfer them with SCP/FTP/whatever to the router and install it with opkg while having only LAN connectvity. (and you can even do that package uploading and installation in the LuCI GUI, system/software tab).