fix dumb mistake
All checks were successful
continuous-integration/drone/push Build is passing
continuous-integration/drone/pr Build is passing

Signed-off-by: Sam Therapy <sam@samtherapy.net>
This commit is contained in:
Sam Therapy 2022-09-17 00:50:01 +02:00
parent 33cb3e4572
commit 80522df153
Signed by: sam
GPG key ID: 4D8B07C18F31ACBD
2 changed files with 6 additions and 6 deletions

View file

@ -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
}

@ -1 +1 @@
Subproject commit 6f3070f5933d0cc48bc8bb5290a1d0cc1825cd75
Subproject commit d41f6197e638d7f0c0b203bd8b7f1fa0fc4b7f97