Merge branch 'dev' of https://github.com/cbodonnell/frp into dev

This commit is contained in:
Craig O'Donnell 2023-01-25 23:43:01 -05:00
commit cb2e1cfffa
6 changed files with 12 additions and 12 deletions

View File

@ -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`

View File

@ -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.

View File

@ -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")

View File

@ -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()
}

View File

@ -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)
}

View File

@ -19,7 +19,7 @@ import (
"strings"
)
var version = "0.46.0"
var version = "0.46.1"
func Full() string {
return version