update dependencies (#3539)

This commit is contained in:
fatedier 2023-07-21 14:34:44 +08:00 committed by GitHub
parent 46ff40543a
commit 3235addaaa
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
6 changed files with 146 additions and 833 deletions

View File

@ -1,4 +1,3 @@
### Fixes ### Features
* Fix the issue of not disabling tcp keepalive when configuring `tcp_keepalive` = -1 in frps. * Adds a `completion` command for shell completions.
* Fix a race condition error.

View File

@ -378,7 +378,7 @@ func (cm *ConnectionManager) OpenConnection() error {
} }
tlsConfig.NextProtos = []string{"frp"} tlsConfig.NextProtos = []string{"frp"}
conn, err := quic.DialAddrContext( conn, err := quic.DialAddr(
cm.ctx, cm.ctx,
net.JoinHostPort(cm.cfg.ServerAddr, strconv.Itoa(cm.cfg.ServerPort)), net.JoinHostPort(cm.cfg.ServerAddr, strconv.Itoa(cm.cfg.ServerPort)),
tlsConfig, &quic.Config{ tlsConfig, &quic.Config{

View File

@ -413,7 +413,7 @@ func (qs *QUICTunnelSession) Init(listenConn *net.UDPConn, raddr *net.UDPAddr) e
return fmt.Errorf("create tls config error: %v", err) return fmt.Errorf("create tls config error: %v", err)
} }
tlsConfig.NextProtos = []string{"frp"} tlsConfig.NextProtos = []string{"frp"}
quicConn, err := quic.Dial(listenConn, raddr, raddr.String(), tlsConfig, quicConn, err := quic.Dial(context.Background(), listenConn, raddr, tlsConfig,
&quic.Config{ &quic.Config{
MaxIdleTimeout: time.Duration(qs.clientCfg.QUICMaxIdleTimeout) * time.Second, MaxIdleTimeout: time.Duration(qs.clientCfg.QUICMaxIdleTimeout) * time.Second,
MaxIncomingStreams: int64(qs.clientCfg.QUICMaxIncomingStreams), MaxIncomingStreams: int64(qs.clientCfg.QUICMaxIncomingStreams),

81
go.mod
View File

@ -4,76 +4,81 @@ go 1.20
require ( require (
github.com/armon/go-socks5 v0.0.0-20160902184237-e75332964ef5 github.com/armon/go-socks5 v0.0.0-20160902184237-e75332964ef5
github.com/coreos/go-oidc/v3 v3.4.0 github.com/coreos/go-oidc/v3 v3.6.0
github.com/fatedier/beego v0.0.0-20171024143340-6c6a4f5bd5eb github.com/fatedier/beego v0.0.0-20171024143340-6c6a4f5bd5eb
github.com/fatedier/golib v0.1.1-0.20230720124328-204db2e322f8 github.com/fatedier/golib v0.1.1-0.20230720124328-204db2e322f8
github.com/fatedier/kcp-go v2.0.4-0.20190803094908-fe8645b0a904+incompatible github.com/fatedier/kcp-go v2.0.4-0.20190803094908-fe8645b0a904+incompatible
github.com/go-playground/validator/v10 v10.11.0 github.com/go-playground/validator/v10 v10.14.1
github.com/google/uuid v1.3.0 github.com/google/uuid v1.3.0
github.com/gorilla/mux v1.8.0 github.com/gorilla/mux v1.8.0
github.com/gorilla/websocket v1.5.0 github.com/gorilla/websocket v1.5.0
github.com/hashicorp/yamux v0.1.1 github.com/hashicorp/yamux v0.1.1
github.com/onsi/ginkgo/v2 v2.8.3 github.com/onsi/ginkgo/v2 v2.11.0
github.com/onsi/gomega v1.27.0 github.com/onsi/gomega v1.27.8
github.com/pion/stun v0.4.0 github.com/pion/stun v0.6.1
github.com/pires/go-proxyproto v0.6.2 github.com/pires/go-proxyproto v0.7.0
github.com/prometheus/client_golang v1.13.0 github.com/prometheus/client_golang v1.16.0
github.com/quic-go/quic-go v0.34.0 github.com/quic-go/quic-go v0.36.2
github.com/rodaine/table v1.0.1 github.com/rodaine/table v1.1.0
github.com/samber/lo v1.38.1 github.com/samber/lo v1.38.1
github.com/spf13/cobra v1.1.3 github.com/spf13/cobra v1.7.0
github.com/stretchr/testify v1.8.1 github.com/stretchr/testify v1.8.4
golang.org/x/net v0.7.0 golang.org/x/net v0.12.0
golang.org/x/oauth2 v0.3.0 golang.org/x/oauth2 v0.10.0
golang.org/x/sync v0.1.0 golang.org/x/sync v0.3.0
golang.org/x/time v0.0.0-20220210224613-90d013bbcef8 golang.org/x/time v0.3.0
gopkg.in/ini.v1 v1.67.0 gopkg.in/ini.v1 v1.67.0
k8s.io/apimachinery v0.26.1 k8s.io/apimachinery v0.27.4
k8s.io/client-go v0.26.1 k8s.io/client-go v0.27.4
) )
require ( require (
github.com/Azure/go-ntlmssp v0.0.0-20200615164410-66371956d46c // indirect github.com/Azure/go-ntlmssp v0.0.0-20200615164410-66371956d46c // indirect
github.com/beorn7/perks v1.0.1 // indirect github.com/beorn7/perks v1.0.1 // indirect
github.com/cespare/xxhash/v2 v2.1.2 // indirect github.com/cespare/xxhash/v2 v2.2.0 // indirect
github.com/davecgh/go-spew v1.1.1 // indirect github.com/davecgh/go-spew v1.1.1 // indirect
github.com/go-logr/logr v1.2.3 // indirect github.com/gabriel-vasile/mimetype v1.4.2 // indirect
github.com/go-playground/locales v0.14.0 // indirect github.com/go-jose/go-jose/v3 v3.0.0 // indirect
github.com/go-playground/universal-translator v0.18.0 // indirect github.com/go-logr/logr v1.2.4 // indirect
github.com/go-task/slim-sprig v0.0.0-20210107165309-348f09dbbbc0 // indirect github.com/go-playground/locales v0.14.1 // indirect
github.com/go-playground/universal-translator v0.18.1 // indirect
github.com/go-task/slim-sprig v0.0.0-20230315185526-52ccab3ef572 // indirect
github.com/golang/mock v1.6.0 // indirect github.com/golang/mock v1.6.0 // indirect
github.com/golang/protobuf v1.5.2 // indirect github.com/golang/protobuf v1.5.3 // indirect
github.com/golang/snappy v0.0.4 // indirect github.com/golang/snappy v0.0.4 // indirect
github.com/google/go-cmp v0.5.9 // indirect github.com/google/go-cmp v0.5.9 // indirect
github.com/google/pprof v0.0.0-20210720184732-4bb14d4b1be1 // indirect github.com/google/pprof v0.0.0-20210720184732-4bb14d4b1be1 // indirect
github.com/inconshreveable/mousetrap v1.0.0 // indirect github.com/inconshreveable/mousetrap v1.1.0 // indirect
github.com/klauspost/cpuid/v2 v2.0.6 // indirect github.com/klauspost/cpuid/v2 v2.0.6 // indirect
github.com/klauspost/reedsolomon v1.9.15 // indirect github.com/klauspost/reedsolomon v1.9.15 // indirect
github.com/leodido/go-urn v1.2.1 // indirect github.com/kr/text v0.2.0 // indirect
github.com/matttproud/golang_protobuf_extensions v1.0.1 // indirect github.com/leodido/go-urn v1.2.4 // indirect
github.com/pion/transport/v2 v2.0.0 // indirect github.com/matttproud/golang_protobuf_extensions v1.0.4 // indirect
github.com/pion/dtls/v2 v2.2.7 // indirect
github.com/pion/logging v0.2.2 // indirect
github.com/pion/transport/v2 v2.2.1 // indirect
github.com/pkg/errors v0.9.1 // indirect github.com/pkg/errors v0.9.1 // indirect
github.com/pmezard/go-difflib v1.0.0 // indirect github.com/pmezard/go-difflib v1.0.0 // indirect
github.com/prometheus/client_model v0.2.0 // indirect github.com/prometheus/client_model v0.3.0 // indirect
github.com/prometheus/common v0.37.0 // indirect github.com/prometheus/common v0.42.0 // indirect
github.com/prometheus/procfs v0.8.0 // indirect github.com/prometheus/procfs v0.10.1 // indirect
github.com/quic-go/qtls-go1-19 v0.3.2 // indirect github.com/quic-go/qtls-go1-19 v0.3.2 // indirect
github.com/quic-go/qtls-go1-20 v0.2.2 // indirect github.com/quic-go/qtls-go1-20 v0.2.2 // indirect
github.com/rogpeppe/go-internal v1.11.0 // indirect
github.com/spf13/pflag v1.0.5 // indirect github.com/spf13/pflag v1.0.5 // indirect
github.com/templexxx/cpufeat v0.0.0-20180724012125-cef66df7f161 // indirect github.com/templexxx/cpufeat v0.0.0-20180724012125-cef66df7f161 // indirect
github.com/templexxx/xor v0.0.0-20191217153810-f85b25db303b // indirect github.com/templexxx/xor v0.0.0-20191217153810-f85b25db303b // indirect
github.com/tjfoc/gmsm v1.4.1 // indirect github.com/tjfoc/gmsm v1.4.1 // indirect
golang.org/x/crypto v0.4.0 // indirect golang.org/x/crypto v0.11.0 // indirect
golang.org/x/exp v0.0.0-20221205204356-47842c84f3db // indirect golang.org/x/exp v0.0.0-20221205204356-47842c84f3db // indirect
golang.org/x/mod v0.8.0 // indirect golang.org/x/mod v0.10.0 // indirect
golang.org/x/sys v0.5.0 // indirect golang.org/x/sys v0.10.0 // indirect
golang.org/x/text v0.7.0 // indirect golang.org/x/text v0.11.0 // indirect
golang.org/x/tools v0.6.0 // indirect golang.org/x/tools v0.9.3 // indirect
google.golang.org/appengine v1.6.7 // indirect google.golang.org/appengine v1.6.7 // indirect
google.golang.org/protobuf v1.28.1 // indirect google.golang.org/protobuf v1.31.0 // indirect
gopkg.in/square/go-jose.v2 v2.6.0 // indirect
gopkg.in/yaml.v3 v3.0.1 // indirect gopkg.in/yaml.v3 v3.0.1 // indirect
k8s.io/utils v0.0.0-20221107191617-1a15be271d1d // indirect k8s.io/utils v0.0.0-20230209194617-a36077c30491 // indirect
) )
// TODO(fatedier): Temporary use the modified version, update to the official version after merging into the official repository. // TODO(fatedier): Temporary use the modified version, update to the official version after merging into the official repository.

885
go.sum

File diff suppressed because it is too large Load Diff

View File

@ -70,7 +70,7 @@ type Service struct {
kcpListener net.Listener kcpListener net.Listener
// Accept connections using quic // Accept connections using quic
quicListener quic.Listener quicListener *quic.Listener
// Accept connections using websocket // Accept connections using websocket
websocketListener net.Listener websocketListener net.Listener
@ -499,7 +499,7 @@ func (svr *Service) HandleListener(l net.Listener) {
} }
} }
func (svr *Service) HandleQUICListener(l quic.Listener) { func (svr *Service) HandleQUICListener(l *quic.Listener) {
// Listen for incoming connections from client. // Listen for incoming connections from client.
for { for {
c, err := l.Accept(context.Background()) c, err := l.Accept(context.Background())