-
Notifications
You must be signed in to change notification settings - Fork 224
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
[Feature Request] Upstream failover and Upstream IP. #100
Comments
Actually this is the exact problem I have observed on my lab environment in China. (sigh...) If you are really good at DIY, you might want to run a HAProxy / Nginx at your local computer. |
The problem is: if a single HTTP/2.0 connection to the server fails, my code detects it and tries to start a new connection, but the Go standard library did not detect this connection failure and still tries to reuse the existing connection pool. |
Yeah. That's why I never recommend DoT: they are doomed to get blocked from day one. |
It really surprised me the other day when my ISP blocked it. Was quite a hassle trying to fix the problem when standard DNS53 returned funky results. Over HTTPS is a much more stealthier approach, but there too few clients and those I have found are poorly implemented. I've just setup IMHO, the internet as it stands right now needs a complete overhaul. |
Yes, I spend more efforts on |
I run
doh-server
on my server under two domains. My server is proxied by cloudflare, so I have 3 IPs for each domain, plus the servers real IP address.I've configured
doh-client
locally with the two domains, and added the six cloudflare IPs to my/etc/hosts
file. Now, here is the problem. Sometimes, a cloudflare IP will become unstable with massive packet drops, causing thedoh-client
to timeout and return an empty response. We need the client to try again with either a different upstream or a different IP (if one exists) for the same domain.I suggest adding the ability to specify the upstream IP address alongside the domain, thus eliminating the need to add them to the
hosts
file. This should allow us to add multiple entries for the same domain. In addition, when the first query fails I'd like to see a failover to the next upstream server. A maximum_failover setting could be introduced and/or an individual upstream timeout (with the current timeout setting acting as a global timeout).Please note, I live in China which has recently blocked all DNS-over-TLS. Regular DNS53 IPs get blocked for a short time if I query banned domains (youtube/facebook etc). I cannot risk using my servers real IP, and must proxy it with cloudfare, out of the chance it will get blocked by the GFW. Currently
dns-over-https
is the only software I've found that actually works. But every time one of my IPs becomes unstable I have to edit thehosts
file and restart services.I would offer a pull request myself, but I unfortunately know nothing about the GO language.
The text was updated successfully, but these errors were encountered: