openwrt / packages

Community maintained packages for OpenWrt. Documentation for submitting pull requests is in CONTRIBUTING.md
GNU General Public License v2.0
3.94k stars 3.45k forks source link

Problem with "https-dns-proxy" after reconnecting WAN #15045

Open M33FT opened 3 years ago

M33FT commented 3 years ago

Hi . . . Thank you for your wonderful program. In the country where I live, DNS is "Hijacked".

luci-app-https

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.)

crontab_03

Is it possible for someone to help me solve this https problem after the WAN is down?

Aloki commented 2 years ago

My ISP uses PPPoE protocol, and sometimes the connection drops (either manually or by the ISP). After reconnection, the https-dns-proxy is reloaded and the service stops responding for 15 minutes. Messages "Connecting and sending request to resolver was successful, but no response was sent back" appear in the log during this time. Only restarting the service helps (or the problem disappears after 15 minutes). In the https://github.com/aarond10/https_dns_proxy/issues/106#issuecomment-858459047, the developer specified restart, not reload.

@M33FT you can edit /etc/hotplug.d/iface/90-https-dns-proxy file and replace reload with restart.

stangri commented 2 years ago

This has been addressed in https://github.com/openwrt/packages/pull/16776 and will be backported to 21.02 once merged for master branch.