ODoH servers should not require a static configuration
This commit is contained in:
parent
7980af6f46
commit
29613096da
|
@ -79,6 +79,7 @@ type Config struct {
|
|||
SourceRequireNoFilter bool `toml:"require_nofilter"`
|
||||
SourceDNSCrypt bool `toml:"dnscrypt_servers"`
|
||||
SourceDoH bool `toml:"doh_servers"`
|
||||
SourceODoH bool `toml:"odoh_servers"`
|
||||
SourceIPv4 bool `toml:"ipv4_servers"`
|
||||
SourceIPv6 bool `toml:"ipv6_servers"`
|
||||
MaxClients uint32 `toml:"max_clients"`
|
||||
|
@ -131,6 +132,7 @@ func newConfig() Config {
|
|||
SourceIPv6: false,
|
||||
SourceDNSCrypt: true,
|
||||
SourceDoH: true,
|
||||
SourceODoH: false,
|
||||
MaxClients: 250,
|
||||
BootstrapResolvers: []string{DefaultBootstrapResolver},
|
||||
IgnoreSystemDNS: false,
|
||||
|
@ -651,6 +653,7 @@ func ConfigLoad(proxy *Proxy, flags *ConfigFlags) error {
|
|||
config.SourceIPv6 = true
|
||||
config.SourceDNSCrypt = true
|
||||
config.SourceDoH = true
|
||||
config.SourceODoH = true
|
||||
}
|
||||
|
||||
var requiredProps stamps.ServerInformalProperties
|
||||
|
@ -670,6 +673,7 @@ func ConfigLoad(proxy *Proxy, flags *ConfigFlags) error {
|
|||
proxy.SourceIPv6 = config.SourceIPv6
|
||||
proxy.SourceDNSCrypt = config.SourceDNSCrypt
|
||||
proxy.SourceDoH = config.SourceDoH
|
||||
proxy.SourceODoH = config.SourceODoH
|
||||
|
||||
netprobeTimeout := config.NetprobeTimeout
|
||||
flag.Visit(func(flag *flag.Flag) {
|
||||
|
|
|
@ -69,6 +69,9 @@ dnscrypt_servers = true
|
|||
# Use servers implementing the DNS-over-HTTPS protocol
|
||||
doh_servers = true
|
||||
|
||||
# Use servers implementing the Oblivious DoH protocol
|
||||
odoh_servers = false
|
||||
|
||||
|
||||
## Require servers defined by remote sources to satisfy specific properties
|
||||
|
||||
|
|
|
@ -101,6 +101,7 @@ type Proxy struct {
|
|||
SourceIPv6 bool
|
||||
SourceDNSCrypt bool
|
||||
SourceDoH bool
|
||||
SourceODoH bool
|
||||
}
|
||||
|
||||
func (proxy *Proxy) registerUDPListener(conn *net.UDPConn) {
|
||||
|
@ -328,7 +329,8 @@ func (proxy *Proxy) updateRegisteredServers() error {
|
|||
}
|
||||
} else {
|
||||
if !((proxy.SourceDNSCrypt && registeredServer.stamp.Proto == stamps.StampProtoTypeDNSCrypt) ||
|
||||
(proxy.SourceDoH && registeredServer.stamp.Proto == stamps.StampProtoTypeDoH)) {
|
||||
(proxy.SourceDoH && registeredServer.stamp.Proto == stamps.StampProtoTypeDoH) ||
|
||||
(proxy.SourceODoH && registeredServer.stamp.Proto == stamps.StampProtoTypeODoHTarget)) {
|
||||
continue
|
||||
}
|
||||
var found bool
|
||||
|
|
Loading…
Reference in New Issue