mirror of
https://github.com/DNSCrypt/dnscrypt-proxy.git
synced 2025-04-04 21:57:44 +03:00
Deps update
This commit is contained in:
parent
dd878d4c60
commit
e8b183e576
12 changed files with 188 additions and 145 deletions
12
Gopkg.lock
generated
12
Gopkg.lock
generated
|
@ -23,7 +23,7 @@
|
|||
branch = "master"
|
||||
name = "github.com/aead/chacha20"
|
||||
packages = ["chacha"]
|
||||
revision = "e0d4ab3067da29fbce5b60445bed6d54c41c3c62"
|
||||
revision = "c1766ed472dff2392a1a13de7b82e8f5a64ab11d"
|
||||
|
||||
[[projects]]
|
||||
branch = "master"
|
||||
|
@ -121,8 +121,8 @@
|
|||
[[projects]]
|
||||
name = "github.com/k-sone/critbitgo"
|
||||
packages = ["."]
|
||||
revision = "1b44ffc7fc9ad8dea28251e340eadb04093c8af3"
|
||||
version = "v1.1.0"
|
||||
revision = "658116ef1e826b72c603cfe2091b12503f9bca43"
|
||||
version = "v1.2.0"
|
||||
|
||||
[[projects]]
|
||||
branch = "master"
|
||||
|
@ -154,7 +154,7 @@
|
|||
"poly1305",
|
||||
"salsa20/salsa"
|
||||
]
|
||||
revision = "d6449816ce06963d9d136eee5a56fca5b0616e7e"
|
||||
revision = "b0697eccbea9adec5b7ba8008f4c33d98d733388"
|
||||
|
||||
[[projects]]
|
||||
branch = "master"
|
||||
|
@ -171,7 +171,7 @@
|
|||
"ipv6",
|
||||
"lex/httplex"
|
||||
]
|
||||
revision = "d41e8174641f662c5a2d1c7a5f9e828788eb8706"
|
||||
revision = "5f9ae10d9af5b1c89ae6904293b14b064d4ada23"
|
||||
|
||||
[[projects]]
|
||||
branch = "master"
|
||||
|
@ -183,7 +183,7 @@
|
|||
"windows/svc/eventlog",
|
||||
"windows/svc/mgr"
|
||||
]
|
||||
revision = "b126b21c05a91c856b027c16779c12e3bf236954"
|
||||
revision = "79b0c6888797020a994db17c8510466c72fe75d9"
|
||||
|
||||
[[projects]]
|
||||
name = "golang.org/x/text"
|
||||
|
|
15
vendor/github.com/aead/chacha20/.travis.yml
generated
vendored
15
vendor/github.com/aead/chacha20/.travis.yml
generated
vendored
|
@ -1,23 +1,22 @@
|
|||
language: go
|
||||
|
||||
go:
|
||||
- "1.8.7"
|
||||
- "1.9.4"
|
||||
- "1.10"
|
||||
- "1.8.x"
|
||||
- "1.9.x"
|
||||
- "1.10.x"
|
||||
|
||||
env:
|
||||
- ARCH=x86_64
|
||||
- ARCH=i686
|
||||
- TRAVIS_GOARCH=amd64
|
||||
- TRAVIS_GOARCH=386
|
||||
|
||||
before_install:
|
||||
- export GOARCH=$TRAVIS_GOARCH
|
||||
|
||||
branches:
|
||||
only:
|
||||
- master
|
||||
|
||||
before_script:
|
||||
- go get -u github.com/klauspost/asmfmt/cmd/asmfmt
|
||||
|
||||
script:
|
||||
- diff -au <(gofmt -d .) <(printf "")
|
||||
- diff -au <(asmfmt -d .) <(printf "")
|
||||
- go test -v ./...
|
||||
|
|
4
vendor/github.com/aead/chacha20/chacha/chacha_test.go
generated
vendored
4
vendor/github.com/aead/chacha20/chacha/chacha_test.go
generated
vendored
|
@ -34,7 +34,7 @@ func TestHChaCha20(t *testing.T) {
|
|||
}
|
||||
if useAVX {
|
||||
t.Log("AVX version")
|
||||
testIncremental(t, 5, 2049)
|
||||
testHChaCha20(t)
|
||||
useAVX = false
|
||||
}
|
||||
if useSSSE3 {
|
||||
|
@ -63,7 +63,7 @@ func TestVectors(t *testing.T) {
|
|||
}
|
||||
if useAVX {
|
||||
t.Log("AVX version")
|
||||
testIncremental(t, 5, 2049)
|
||||
testVectors(t)
|
||||
useAVX = false
|
||||
}
|
||||
if useSSSE3 {
|
||||
|
|
4
vendor/github.com/k-sone/critbitgo/CHANGES.md
generated
vendored
4
vendor/github.com/k-sone/critbitgo/CHANGES.md
generated
vendored
|
@ -1,3 +1,7 @@
|
|||
## 1.2.0 (2018/04/25)
|
||||
|
||||
- Add ContainedIP() as fast way to check an IP [#7](https://github.com/k-sone/critbitgo/pull/7)
|
||||
|
||||
## 1.1.0 (2016/12/29)
|
||||
|
||||
- Add `LongestPrefix ` and `Walk` functions
|
||||
|
|
6
vendor/github.com/k-sone/critbitgo/critbit.go
generated
vendored
6
vendor/github.com/k-sone/critbitgo/critbit.go
generated
vendored
|
@ -236,9 +236,11 @@ func (t *Trie) Allprefixed(prefix []byte, handle func(key []byte, value interfac
|
|||
p := &t.root
|
||||
top := p
|
||||
if len(prefix) > 0 {
|
||||
for p.internal != nil {
|
||||
for q := p.internal; q != nil; q = p.internal {
|
||||
p = &q.child[q.direction(prefix)]
|
||||
if q.offset < len(prefix) {
|
||||
top = p
|
||||
p = &p.internal.child[p.internal.direction(prefix)]
|
||||
}
|
||||
}
|
||||
|
||||
// check prefix
|
||||
|
|
19
vendor/github.com/k-sone/critbitgo/critbit_test.go
generated
vendored
19
vendor/github.com/k-sone/critbitgo/critbit_test.go
generated
vendored
|
@ -137,7 +137,7 @@ func TestSize(t *testing.T) {
|
|||
}
|
||||
|
||||
func TestAllprefixed(t *testing.T) {
|
||||
keys := []string{"", "a", "aa", "b", "bb", "ab", "ba", "aba", "bab"}
|
||||
keys := []string{"", "a", "aa", "b", "bb", "ab", "ba", "aba", "bab", "bc"}
|
||||
trie := buildTrie(t, keys)
|
||||
|
||||
elems := make([]string, 0, len(keys))
|
||||
|
@ -150,10 +150,10 @@ func TestAllprefixed(t *testing.T) {
|
|||
if !trie.Allprefixed([]byte{}, handle) {
|
||||
t.Error("Allprefixed() - invalid result")
|
||||
}
|
||||
if len(elems) != 9 {
|
||||
if len(elems) != 10 {
|
||||
t.Errorf("Allprefixed() - invalid elems length [%v]", elems)
|
||||
}
|
||||
for i, key := range []string{"", "a", "aa", "ab", "aba", "b", "ba", "bab", "bb"} {
|
||||
for i, key := range []string{"", "a", "aa", "ab", "aba", "b", "ba", "bab", "bb", "bc"} {
|
||||
if key != elems[i] {
|
||||
t.Errorf("Allprefixed() - not found [%s]", key)
|
||||
}
|
||||
|
@ -172,6 +172,19 @@ func TestAllprefixed(t *testing.T) {
|
|||
}
|
||||
}
|
||||
|
||||
elems = make([]string, 0, len(keys))
|
||||
if !trie.Allprefixed([]byte("bb"), handle) {
|
||||
t.Error("Allprefixed() - invalid result")
|
||||
}
|
||||
if len(elems) != 1 {
|
||||
t.Errorf("Allprefixed() - invalid elems length [%v]", elems)
|
||||
}
|
||||
for i, key := range []string{"bb"} {
|
||||
if key != elems[i] {
|
||||
t.Errorf("Allprefixed() - not found [%s]", key)
|
||||
}
|
||||
}
|
||||
|
||||
elems = make([]string, 0, len(keys))
|
||||
handle = func(key []byte, value interface{}) bool {
|
||||
if k := string(key); k == value {
|
||||
|
|
21
vendor/github.com/k-sone/critbitgo/net.go
generated
vendored
21
vendor/github.com/k-sone/critbitgo/net.go
generated
vendored
|
@ -97,9 +97,25 @@ func (n *Net) MatchCIDR(s string) (route *net.IPNet, value interface{}, err erro
|
|||
return
|
||||
}
|
||||
|
||||
// Return a bool indicating whether a route would be found
|
||||
func (n *Net) ContainedIP(ip net.IP) (contained bool, err error) {
|
||||
k, _, err := n.matchIP(ip)
|
||||
contained = k != nil
|
||||
return
|
||||
}
|
||||
|
||||
// Return a specific route by using the longest prefix matching.
|
||||
// If `ip` is invalid IP, or a route is not found, `route` is nil.
|
||||
func (n *Net) MatchIP(ip net.IP) (route *net.IPNet, value interface{}, err error) {
|
||||
k, v, err := n.matchIP(ip)
|
||||
if k != nil {
|
||||
route = netKeyToIPNet(k)
|
||||
value = v
|
||||
}
|
||||
return
|
||||
}
|
||||
|
||||
func (n *Net) matchIP(ip net.IP) (k []byte, v interface{}, err error) {
|
||||
var isV4 bool
|
||||
ip, isV4, err = netValidateIP(ip)
|
||||
if err != nil {
|
||||
|
@ -111,10 +127,7 @@ func (n *Net) MatchIP(ip net.IP) (route *net.IPNet, value interface{}, err error
|
|||
} else {
|
||||
mask = mask128
|
||||
}
|
||||
if k, v := n.match(netIPNetToKey(ip, mask)); k != nil {
|
||||
route = netKeyToIPNet(k)
|
||||
value = v
|
||||
}
|
||||
k, v = n.match(netIPNetToKey(ip, mask))
|
||||
return
|
||||
}
|
||||
|
||||
|
|
9
vendor/github.com/k-sone/critbitgo/net_test.go
generated
vendored
9
vendor/github.com/k-sone/critbitgo/net_test.go
generated
vendored
|
@ -31,6 +31,12 @@ func TestNet(t *testing.T) {
|
|||
if r, v, err := trie.MatchIP(hostIP); r != nil || v != nil || err != nil {
|
||||
t.Errorf("MatchIP() - phantom: %v, %v, %v", r, v, err)
|
||||
}
|
||||
if _, err := trie.ContainedIP(net.IP([]byte{})); err == nil {
|
||||
t.Error("ContainedIP() - not error")
|
||||
}
|
||||
if b, err := trie.ContainedIP(hostIP); b || err != nil {
|
||||
t.Errorf("ContainedIP() - phantom: %v, %v", b, err)
|
||||
}
|
||||
if _, _, err := trie.DeleteCIDR(""); err == nil {
|
||||
t.Error("DeleteCIDR() - not error")
|
||||
}
|
||||
|
@ -50,6 +56,9 @@ func TestNet(t *testing.T) {
|
|||
if r, v, err := trie.MatchIP(hostIP); r == nil || r.String() != cidr || v != &cidr || err != nil {
|
||||
t.Errorf("MatchIP() - failed: %v, %v, %v", r, v, err)
|
||||
}
|
||||
if b, err := trie.ContainedIP(hostIP); !b || err != nil {
|
||||
t.Errorf("ContainedIP() - failed: %v, %v", b, err)
|
||||
}
|
||||
if v, ok, err := trie.DeleteCIDR(cidr); v != &cidr || !ok || err != nil {
|
||||
t.Errorf("DeleteCIDR() - failed: %v, %v, %v", v, ok, err)
|
||||
}
|
||||
|
|
3
vendor/golang.org/x/net/http2/transport.go
generated
vendored
3
vendor/golang.org/x/net/http2/transport.go
generated
vendored
|
@ -951,6 +951,9 @@ func (cc *ClientConn) awaitOpenSlotForRequest(req *http.Request) error {
|
|||
for {
|
||||
cc.lastActive = time.Now()
|
||||
if cc.closed || !cc.canTakeNewRequestLocked() {
|
||||
if waitingForConn != nil {
|
||||
close(waitingForConn)
|
||||
}
|
||||
return errClientConnUnusable
|
||||
}
|
||||
if int64(len(cc.streams))+1 <= int64(cc.maxConcurrentStreams) {
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue