all: implement self-uninstall ctrld based on REFUSED queries

This commit is contained in:
Cuong Manh Le
2024-08-07 15:51:11 +07:00
committed by Cuong Manh Le
parent e6ad39b070
commit 80cf79b9cb
6 changed files with 103 additions and 36 deletions
+1 -1
View File
@@ -147,7 +147,7 @@ func addHeader(ctx context.Context, req *http.Request, uc *UpstreamConfig) {
if ci, ok := ctx.Value(ClientInfoCtxKey{}).(*ClientInfo); ok && ci != nil {
printed = ci.Mac != "" || ci.IP != "" || ci.Hostname != ""
switch {
case uc.isControlD():
case uc.IsControlD():
dohHeader = newControlDHeaders(ci)
case uc.isNextDNS():
dohHeader = newNextDNSHeaders(ci)