mirror of
https://github.com/cloudflare/cloudflared.git
synced 2026-06-22 20:00:16 +00:00
9388e7f48c
Remove the DNS over HTTPS (DoH) proxy feature built on CoreDNS due to security vulnerabilities (GO-2025-3942, GO-2026-4289). This removes: - Standalone proxy-dns command (cloudflared proxy-dns) - Tunnel subcommand (cloudflared tunnel proxy-dns) - Proxy-dns flags for tunnel run (--proxy-dns, --proxy-dns-port, etc.) - Config file resolver section support - tunneldns/ package (CoreDNS-based implementation) - Related component tests BREAKING CHANGE: The proxy-dns feature is no longer available. Users should migrate to alternative DNS over HTTPS solutions.
45 lines
1.5 KiB
Go
45 lines
1.5 KiB
Go
package config
|
|
|
|
import (
|
|
"crypto/sha256"
|
|
"fmt"
|
|
"io"
|
|
)
|
|
|
|
// Forwarder represents a client side listener to forward traffic to the edge
|
|
type Forwarder struct {
|
|
URL string `json:"url"`
|
|
Listener string `json:"listener"`
|
|
TokenClientID string `json:"service_token_id" yaml:"serviceTokenID"`
|
|
TokenSecret string `json:"secret_token_id" yaml:"serviceTokenSecret"`
|
|
Destination string `json:"destination"`
|
|
IsFedramp bool `json:"is_fedramp" yaml:"isFedramp"`
|
|
}
|
|
|
|
// Tunnel represents a tunnel that should be started
|
|
type Tunnel struct {
|
|
URL string `json:"url"`
|
|
Origin string `json:"origin"`
|
|
ProtocolType string `json:"type"`
|
|
}
|
|
|
|
// Root is the base options to configure the service.
|
|
type Root struct {
|
|
LogDirectory string `json:"log_directory" yaml:"logDirectory,omitempty"`
|
|
LogLevel string `json:"log_level" yaml:"logLevel,omitempty"`
|
|
Forwarders []Forwarder `json:"forwarders,omitempty" yaml:"forwarders,omitempty"`
|
|
Tunnels []Tunnel `json:"tunnels,omitempty" yaml:"tunnels,omitempty"`
|
|
// `resolver` key is reserved for a removed feature (proxy-dns) and should not be used.
|
|
}
|
|
|
|
// Hash returns the computed values to see if the forwarder values change
|
|
func (f *Forwarder) Hash() string {
|
|
h := sha256.New()
|
|
_, _ = io.WriteString(h, f.URL)
|
|
_, _ = io.WriteString(h, f.Listener)
|
|
_, _ = io.WriteString(h, f.TokenClientID)
|
|
_, _ = io.WriteString(h, f.TokenSecret)
|
|
_, _ = io.WriteString(h, f.Destination)
|
|
return fmt.Sprintf("%x", h.Sum(nil))
|
|
}
|