mirror of
https://github.com/DNSCrypt/dnscrypt-proxy.git
synced 2025-04-04 21:57:44 +03:00
Accept sdns: scheme without a namespace
This commit is contained in:
parent
864476b835
commit
b624f8ef58
17 changed files with 3404 additions and 79 deletions
9
vendor/github.com/jedisct1/go-dnsstamps/Gopkg.lock
generated
vendored
9
vendor/github.com/jedisct1/go-dnsstamps/Gopkg.lock
generated
vendored
|
@ -1,9 +0,0 @@
|
|||
# This file is autogenerated, do not edit; changes may be undone by the next 'dep ensure'.
|
||||
|
||||
|
||||
[solve-meta]
|
||||
analyzer-name = "dep"
|
||||
analyzer-version = 1
|
||||
inputs-digest = "ab4fef131ee828e96ba67d31a7d690bd5f2f42040c6766b1b12fe856f87e0ff7"
|
||||
solver-name = "gps-cdcl"
|
||||
solver-version = 1
|
25
vendor/github.com/jedisct1/go-dnsstamps/Gopkg.toml
generated
vendored
25
vendor/github.com/jedisct1/go-dnsstamps/Gopkg.toml
generated
vendored
|
@ -1,25 +0,0 @@
|
|||
# Gopkg.toml example
|
||||
#
|
||||
# Refer to https://github.com/golang/dep/blob/master/docs/Gopkg.toml.md
|
||||
# for detailed Gopkg.toml documentation.
|
||||
#
|
||||
# required = ["github.com/user/thing/cmd/thing"]
|
||||
# ignored = ["github.com/user/project/pkgX", "bitbucket.org/user/project/pkgA/pkgY"]
|
||||
#
|
||||
# [[constraint]]
|
||||
# name = "github.com/user/project"
|
||||
# version = "1.0.0"
|
||||
#
|
||||
# [[constraint]]
|
||||
# name = "github.com/user/project2"
|
||||
# branch = "dev"
|
||||
# source = "github.com/myfork/project2"
|
||||
#
|
||||
# [[override]]
|
||||
# name = "github.com/x/y"
|
||||
# version = "2.4.0"
|
||||
|
||||
|
||||
[[constraint]]
|
||||
branch = "master"
|
||||
name = "golang.org/x/crypto"
|
10
vendor/github.com/jedisct1/go-dnsstamps/dnsstamps.go
generated
vendored
10
vendor/github.com/jedisct1/go-dnsstamps/dnsstamps.go
generated
vendored
|
@ -71,10 +71,14 @@ func NewDNSCryptServerStampFromLegacy(serverAddrStr string, serverPkStr string,
|
|||
}
|
||||
|
||||
func NewServerStampFromString(stampStr string) (ServerStamp, error) {
|
||||
if !strings.HasPrefix(stampStr, "sdns://") && !strings.HasPrefix(stampStr, "dnsc://") {
|
||||
return ServerStamp{}, errors.New("Stamps are expected to start with sdns://")
|
||||
if !strings.HasPrefix(stampStr, "sdns:") {
|
||||
return ServerStamp{}, errors.New("Stamps are expected to start with sdns:")
|
||||
}
|
||||
bin, err := base64.RawURLEncoding.DecodeString(stampStr[7:])
|
||||
stampStr = stampStr[5:]
|
||||
if strings.HasPrefix(stampStr, "//") {
|
||||
stampStr = stampStr[2:]
|
||||
}
|
||||
bin, err := base64.RawURLEncoding.DecodeString(stampStr)
|
||||
if err != nil {
|
||||
return ServerStamp{}, err
|
||||
}
|
||||
|
|
3
vendor/github.com/jedisct1/go-dnsstamps/go.mod
generated
vendored
Normal file
3
vendor/github.com/jedisct1/go-dnsstamps/go.mod
generated
vendored
Normal file
|
@ -0,0 +1,3 @@
|
|||
module github.com/jedisct1/go-dnsstamps
|
||||
|
||||
go 1.12
|
Loading…
Add table
Add a link
Reference in a new issue