fix: EDNS cookies work properly #98
2 changed files with 6 additions and 6 deletions
10
cli/misc.go
10
cli/misc.go
|
@ -29,7 +29,7 @@ func ParseMiscArgs(args []string, opts *util.Options) error {
|
|||
switch {
|
||||
case strings.HasPrefix(arg, "tls://"):
|
||||
opts.TLS = true
|
||||
opts.Request.Server = strings.TrimPrefix(opts.Request.Server, "tls://")
|
||||
opts.Request.Server = strings.TrimPrefix(arg, "tls://")
|
||||
opts.Logger.Info("DNS-over-TLS implicitly set")
|
||||
case strings.HasPrefix(arg, "https://"):
|
||||
opts.HTTPS = true
|
||||
|
@ -37,18 +37,18 @@ func ParseMiscArgs(args []string, opts *util.Options) error {
|
|||
opts.Logger.Info("DNS-over-HTTPS implicitly set")
|
||||
case strings.HasPrefix(arg, "quic://"):
|
||||
opts.QUIC = true
|
||||
opts.Request.Server = strings.TrimPrefix(opts.Request.Server, "quic://")
|
||||
opts.Request.Server = strings.TrimPrefix(arg, "quic://")
|
||||
opts.Logger.Info("DNS-over-QUIC implicitly set.")
|
||||
case strings.HasPrefix(arg, "sdns://"):
|
||||
opts.DNSCrypt = true
|
||||
opts.Request.Server = arg
|
||||
opts.Logger.Info("DNSCrypt implicitly set")
|
||||
case strings.HasPrefix(arg, "tcp://"):
|
||||
opts.DNSCrypt = true
|
||||
opts.Request.Server = arg
|
||||
opts.TCP = true
|
||||
opts.Request.Server = strings.TrimPrefix(arg, "udp://")
|
||||
opts.Logger.Info("TCP implicitly set")
|
||||
case strings.HasPrefix(arg, "udp://"):
|
||||
opts.Request.Server = strings.TrimPrefix(opts.Request.Server, "udp://")
|
||||
opts.Request.Server = strings.TrimPrefix(arg, "udp://")
|
||||
default:
|
||||
opts.Request.Server = arg
|
||||
}
|
||||
|
|
2
doc/wiki
2
doc/wiki
|
@ -1 +1 @@
|
|||
Subproject commit 6f3070f5933d0cc48bc8bb5290a1d0cc1825cd75
|
||||
Subproject commit d41f6197e638d7f0c0b203bd8b7f1fa0fc4b7f97
|
Loading…
Reference in a new issue