I am using this program on OpenWrt project and on Raspberrypi4B device and it works very well. The only problem I have is that when my WAN connection is disconnected (from the Provider) and after it comes back it does not open any website (because it is not Resolve) and I have to restart service "/etc/init.d/https-dns-proxy" from Startup or via Terminal to connect.
Can you tell me how I can solve this problem? Is there a way that I can restart the service after the shutdown, for example through Shell Script?
I saw a script somewhere on the internet but I do not think it is a shell script and if so where should it be used:
#!/bin/sh
# Put this script run in crond.
service=ocserv
if test $(netstat -na | grep 0.0.0.0:443 | wc -l) = 2
then
echo "$service is running!"
else
/etc/init.d/$service start
fi
Do I have to change the script above as follows? (Unfortunately, I do not know any scripting.)
I should also add that when the https-dns-proxy service crashes, I have the DNS Server (GoogleDNS, etc. . .)pinged, but no Page will load until https-dns-proxy is restarted.
Thanks buddy, but unfortunately this method did not work because Ping is using port 53, but in this case, no page opens for me because port 80,443 is down and that script must be restarted after these ports fail.
That's not the expected behavior, I just triggered ifdown wan; ifup wan; and I didn't lose ability to resolve domain names thru DoH proxy. I highly recommend you use the current OpenWrt release instead of the "ImmortalWrt 18.06-snapshot".
Thanks for answering. Do you think this is possible because I did not use Openwrt Direct Source?
I used immortalWRT because it has very good packages and is based on OpenWRT 18.06.
Anyway, Thanks bro