TUN-8861: Add session limiter to UDP session manager

## Summary
In order to make cloudflared behavior more predictable and
prevent an exhaustion of resources, we have decided to add
session limits that can be configured by the user. This first
commit introduces the session limiter and adds it to the UDP
handling path. For now the limiter is set to run only in
unlimited mode.
This commit is contained in:
João "Pisco" Fernandes
2025-01-20 02:52:32 -08:00
parent 8918b6729e
commit bf4954e96a
66 changed files with 3409 additions and 1184 deletions

19
vendor/modules.txt vendored
View File

@@ -304,11 +304,12 @@ go.opentelemetry.io/proto/otlp/trace/v1
go.uber.org/automaxprocs/internal/cgroups
go.uber.org/automaxprocs/internal/runtime
go.uber.org/automaxprocs/maxprocs
# go.uber.org/mock v0.4.0
## explicit; go 1.20
# go.uber.org/mock v0.5.0
## explicit; go 1.22
go.uber.org/mock/gomock
go.uber.org/mock/mockgen
go.uber.org/mock/mockgen/model
# golang.org/x/crypto v0.23.0
# golang.org/x/crypto v0.24.0
## explicit; go 1.18
golang.org/x/crypto/blake2b
golang.org/x/crypto/blowfish
@@ -328,13 +329,13 @@ golang.org/x/crypto/ssh/internal/bcrypt_pbkdf
# golang.org/x/exp v0.0.0-20240506185415-9bf2ced13842
## explicit; go 1.20
golang.org/x/exp/rand
# golang.org/x/mod v0.17.0
# golang.org/x/mod v0.18.0
## explicit; go 1.18
golang.org/x/mod/internal/lazyregexp
golang.org/x/mod/modfile
golang.org/x/mod/module
golang.org/x/mod/semver
# golang.org/x/net v0.25.0
# golang.org/x/net v0.26.0
## explicit; go 1.18
golang.org/x/net/bpf
golang.org/x/net/context
@@ -360,7 +361,7 @@ golang.org/x/oauth2/internal
# golang.org/x/sync v0.7.0
## explicit; go 1.18
golang.org/x/sync/errgroup
# golang.org/x/sys v0.20.0
# golang.org/x/sys v0.21.0
## explicit; go 1.18
golang.org/x/sys/cpu
golang.org/x/sys/execabs
@@ -371,10 +372,10 @@ golang.org/x/sys/windows/registry
golang.org/x/sys/windows/svc
golang.org/x/sys/windows/svc/eventlog
golang.org/x/sys/windows/svc/mgr
# golang.org/x/term v0.20.0
# golang.org/x/term v0.21.0
## explicit; go 1.18
golang.org/x/term
# golang.org/x/text v0.15.0
# golang.org/x/text v0.16.0
## explicit; go 1.18
golang.org/x/text/cases
golang.org/x/text/internal
@@ -386,7 +387,7 @@ golang.org/x/text/secure/bidirule
golang.org/x/text/transform
golang.org/x/text/unicode/bidi
golang.org/x/text/unicode/norm
# golang.org/x/tools v0.21.0
# golang.org/x/tools v0.22.0
## explicit; go 1.19
golang.org/x/tools/go/ast/astutil
golang.org/x/tools/go/ast/inspector