mirror of
https://github.com/DNSCrypt/dnscrypt-proxy.git
synced 2025-01-21 03:15:47 +01:00
Avoid double slashes in ODoH relay URLs
This commit is contained in:
parent
d2947cad75
commit
1cdb71cd7c
@ -9,7 +9,7 @@ file = 'query.log'
|
||||
stamp = 'sdns://BQcAAAAAAAAAF29kb2guY2xvdWRmbGFyZS1kbnMuY29tCi9kbnMtcXVlcnk'
|
||||
|
||||
[static.'odohrelay']
|
||||
stamp = 'sdns://hQcAAAAAAAAAAAAdcHJveHkub2RvaC5jbG91ZGZsYXJlLWRucy5jb20FcHJveHk'
|
||||
stamp = 'sdns://hQcAAAAAAAAAAAAdcHJveHkub2RvaC5jbG91ZGZsYXJlLWRucy5jb20GL3Byb3h5'
|
||||
|
||||
[anonymized_dns]
|
||||
routes = [
|
||||
|
@ -419,7 +419,7 @@ func route(proxy *Proxy, name string) (*Relay, error) {
|
||||
dlog.Noticef("Anonymizing queries for [%v] via [%v]", name, relayName)
|
||||
return &Relay{Proto: stamps.StampProtoTypeDNSCryptRelay, Dnscrypt: &DNSCryptRelay{RelayUDPAddr: relayUDPAddr, RelayTCPAddr: relayTCPAddr}}, nil
|
||||
case stamps.StampProtoTypeODoHRelay:
|
||||
target, err := url.Parse("https://" + relayCandidateStamp.ProviderName + "/" + relayCandidateStamp.Path)
|
||||
target, err := url.Parse("https://" + url.PathEscape(relayCandidateStamp.ProviderName) + relayCandidateStamp.Path)
|
||||
if err != nil {
|
||||
return nil, err
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user