all: implement router setup for ddwrt

This commit is contained in:
Cuong Manh Le authored and Cuong Manh Le committed 2023-05-13 11:58:02 +07:00
1 parent c94be0df35
commit 8a2cdbfaa3
18 files changed
+4001 -36

No files matched your search

+4 -3
View File
@@ -20,12 +20,13 @@ func (r *dotResolver) Resolve(ctx context.Context, msg *dns.Msg) (*dns.Msg, erro
// regardless of the machine DNS status.
dialer := newDialer(net.JoinHostPort(bootstrapDNS, "53"))
dnsClient := &dns.Client{
Net: "tcp-tls",
Dialer: dialer,
Net: "tcp-tls",
Dialer: dialer,
TLSConfig: &tls.Config{RootCAs: r.uc.certPool},
}
endpoint := r.uc.Endpoint
if r.uc.BootstrapIP != "" {
dnsClient.TLSConfig = &tls.Config{ServerName: r.uc.Domain}
dnsClient.TLSConfig.ServerName = r.uc.Domain
_, port, _ := net.SplitHostPort(endpoint)
endpoint = net.JoinHostPort(r.uc.BootstrapIP, port)
}