fix: prefix match in DNS https (#1573)
Signed-off-by: Cherrling <me@cherr.cc>
This commit is contained in:
parent
d34dc40eff
commit
6dc0f3f792
1 changed files with 1 additions and 1 deletions
|
|
@ -20,7 +20,7 @@ type dohResolver struct {
|
||||||
|
|
||||||
func NewDoHResolver(addr string, timeout time.Duration, sni string, insecure bool, next PluggableOutbound) PluggableOutbound {
|
func NewDoHResolver(addr string, timeout time.Duration, sni string, insecure bool, next PluggableOutbound) PluggableOutbound {
|
||||||
// User may provide just the IP address or full URL
|
// User may provide just the IP address or full URL
|
||||||
if !strings.HasSuffix(addr, "https://") {
|
if !strings.HasPrefix(addr, "https://") {
|
||||||
addr = fmt.Sprintf("https://%s/dns-query", addr)
|
addr = fmt.Sprintf("https://%s/dns-query", addr)
|
||||||
}
|
}
|
||||||
tr := http.DefaultTransport.(*http.Transport).Clone()
|
tr := http.DefaultTransport.(*http.Transport).Clone()
|
||||||
|
|
|
||||||
Loading…
Add table
Reference in a new issue