From b03f0ad1e681f72e2067e31d60d25ad09ee2f61a Mon Sep 17 00:00:00 2001 From: Craig O'Donnell Date: Sun, 8 Jan 2023 21:34:09 -0500 Subject: [PATCH 1/5] fix: incorrect op for newWorkConn (#3244) (cherry picked from commit 53b6bbf0b14ab632dc89416d7fffa9b1d0887c0a) --- pkg/plugin/server/manager.go | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/pkg/plugin/server/manager.go b/pkg/plugin/server/manager.go index 5a8a309c..516f407e 100644 --- a/pkg/plugin/server/manager.go +++ b/pkg/plugin/server/manager.go @@ -211,7 +211,7 @@ func (m *Manager) NewWorkConn(content *NewWorkConnContent) (*NewWorkConnContent, ctx = NewReqidContext(ctx, reqid) for _, p := range m.newWorkConnPlugins { - res, retContent, err = p.Handle(ctx, OpPing, *content) + res, retContent, err = p.Handle(ctx, OpNewWorkConn, *content) if err != nil { xl.Warn("send NewWorkConn request to plugin [%s] error: %v", p.Name(), err) return nil, errors.New("send NewWorkConn request to plugin error") From 5cfbb976f47bedaa29ed2fc8194db4c825c7205f Mon Sep 17 00:00:00 2001 From: fatedier Date: Tue, 10 Jan 2023 10:19:37 +0800 Subject: [PATCH 2/5] pkg/util/net: fix quic streams leak (#3246) --- pkg/util/net/conn.go | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/pkg/util/net/conn.go b/pkg/util/net/conn.go index 1258ed48..a09da99e 100644 --- a/pkg/util/net/conn.go +++ b/pkg/util/net/conn.go @@ -211,3 +211,8 @@ func (conn *wrapQuicStream) RemoteAddr() net.Addr { } return (*net.TCPAddr)(nil) } + +func (conn *wrapQuicStream) Close() error { + conn.Stream.CancelRead(0) + return conn.Stream.Close() +} From 679992db256d97da3ccf9498727a8d3bd7e83b21 Mon Sep 17 00:00:00 2001 From: fatedier Date: Tue, 10 Jan 2023 10:24:44 +0800 Subject: [PATCH 3/5] update version (#3247) --- Release.md | 11 +++-------- pkg/util/version/version.go | 2 +- 2 files changed, 4 insertions(+), 9 deletions(-) diff --git a/Release.md b/Release.md index bbcb8c5c..6738c32b 100644 --- a/Release.md +++ b/Release.md @@ -1,9 +1,4 @@ -### New +### Fix -* Add `oidc_scope` parameter to frpc when `authentication_method = oidc`. -* Support quic protocol between frpc and frps. - - -### Improve - -* Upgrade oidc and oauth2 package which is forward compatible. +* Server Plugin send incorrect op name for NewWorkConn. +* QUIC stream leak. diff --git a/pkg/util/version/version.go b/pkg/util/version/version.go index 6228c092..849002d7 100644 --- a/pkg/util/version/version.go +++ b/pkg/util/version/version.go @@ -19,7 +19,7 @@ import ( "strings" ) -var version = "0.46.0" +var version = "0.46.1" func Full() string { return version From ad3548d3322c007773d495436dfa7abadae8aac4 Mon Sep 17 00:00:00 2001 From: bobo liu <7552030+fakeboboliu@users.noreply.github.com> Date: Sat, 14 Jan 2023 21:43:26 +0800 Subject: [PATCH 4/5] optimize: GetAuthKey (#3254) --- pkg/util/util/util.go | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/pkg/util/util/util.go b/pkg/util/util/util.go index b13f9a77..b72209c6 100644 --- a/pkg/util/util/util.go +++ b/pkg/util/util/util.go @@ -44,9 +44,9 @@ func RandIDWithLen(idLen int) (id string, err error) { } func GetAuthKey(token string, timestamp int64) (key string) { - token += fmt.Sprintf("%d", timestamp) md5Ctx := md5.New() md5Ctx.Write([]byte(token)) + md5Ctx.Write([]byte(strconv.FormatInt(timestamp, 10))) data := md5Ctx.Sum(nil) return hex.EncodeToString(data) } From 0eecab06c17d69ba11a84162aae35ed7d94f0423 Mon Sep 17 00:00:00 2001 From: Richard Kovacs Date: Sun, 15 Jan 2023 12:15:48 +0100 Subject: [PATCH 5/5] Fix basic example server to join in readme (#3209) --- README.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/README.md b/README.md index 57a68949..a02d0a5a 100644 --- a/README.md +++ b/README.md @@ -143,7 +143,7 @@ Note that `local_port` (listened on client) and `remote_port` (exposed on server `./frpc -c ./frpc.ini` -5. From another machine, SSH to server B like this (assuming that username is `test`): +5. From another machine, SSH to server B via server A like this (assuming that username is `test`): `ssh -oPort=6000 test@x.x.x.x`