Skip to content

Commit

Permalink
Merge pull request #3248 from fatedier/dev
Browse files Browse the repository at this point in the history
bump version
  • Loading branch information
fatedier authored Jan 10, 2023
2 parents a4189ba + 679992d commit 595aba5
Show file tree
Hide file tree
Showing 7 changed files with 22 additions and 19 deletions.
11 changes: 3 additions & 8 deletions Release.md
Original file line number Diff line number Diff line change
@@ -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.
7 changes: 4 additions & 3 deletions cmd/frpc/sub/stcp.go
Original file line number Diff line number Diff line change
Expand Up @@ -59,7 +59,8 @@ var stcpCmd = &cobra.Command{
prefix = user + "."
}

if role == "server" {
switch role {
case "server":
cfg := &config.STCPProxyConf{}
cfg.ProxyName = prefix + proxyName
cfg.ProxyType = consts.STCPProxy
Expand All @@ -75,7 +76,7 @@ var stcpCmd = &cobra.Command{
os.Exit(1)
}
proxyConfs[cfg.ProxyName] = cfg
} else if role == "visitor" {
case "visitor":
cfg := &config.STCPVisitorConf{}
cfg.ProxyName = prefix + proxyName
cfg.ProxyType = consts.STCPProxy
Expand All @@ -92,7 +93,7 @@ var stcpCmd = &cobra.Command{
os.Exit(1)
}
visitorConfs[cfg.ProxyName] = cfg
} else {
default:
fmt.Println("invalid role")
os.Exit(1)
}
Expand Down
7 changes: 4 additions & 3 deletions cmd/frpc/sub/sudp.go
Original file line number Diff line number Diff line change
Expand Up @@ -59,7 +59,8 @@ var sudpCmd = &cobra.Command{
prefix = user + "."
}

if role == "server" {
switch role {
case "server":
cfg := &config.SUDPProxyConf{}
cfg.ProxyName = prefix + proxyName
cfg.ProxyType = consts.SUDPProxy
Expand All @@ -75,7 +76,7 @@ var sudpCmd = &cobra.Command{
os.Exit(1)
}
proxyConfs[cfg.ProxyName] = cfg
} else if role == "visitor" {
case "visitor":
cfg := &config.SUDPVisitorConf{}
cfg.ProxyName = prefix + proxyName
cfg.ProxyType = consts.SUDPProxy
Expand All @@ -92,7 +93,7 @@ var sudpCmd = &cobra.Command{
os.Exit(1)
}
visitorConfs[cfg.ProxyName] = cfg
} else {
default:
fmt.Println("invalid role")
os.Exit(1)
}
Expand Down
7 changes: 4 additions & 3 deletions cmd/frpc/sub/xtcp.go
Original file line number Diff line number Diff line change
Expand Up @@ -59,7 +59,8 @@ var xtcpCmd = &cobra.Command{
prefix = user + "."
}

if role == "server" {
switch role {
case "server":
cfg := &config.XTCPProxyConf{}
cfg.ProxyName = prefix + proxyName
cfg.ProxyType = consts.XTCPProxy
Expand All @@ -75,7 +76,7 @@ var xtcpCmd = &cobra.Command{
os.Exit(1)
}
proxyConfs[cfg.ProxyName] = cfg
} else if role == "visitor" {
case "visitor":
cfg := &config.XTCPVisitorConf{}
cfg.ProxyName = prefix + proxyName
cfg.ProxyType = consts.XTCPProxy
Expand All @@ -92,7 +93,7 @@ var xtcpCmd = &cobra.Command{
os.Exit(1)
}
visitorConfs[cfg.ProxyName] = cfg
} else {
default:
fmt.Println("invalid role")
os.Exit(1)
}
Expand Down
2 changes: 1 addition & 1 deletion pkg/plugin/server/manager.go
Original file line number Diff line number Diff line change
Expand Up @@ -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")
Expand Down
5 changes: 5 additions & 0 deletions pkg/util/net/conn.go
Original file line number Diff line number Diff line change
Expand Up @@ -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()
}
2 changes: 1 addition & 1 deletion pkg/util/version/version.go
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@ import (
"strings"
)

var version = "0.46.0"
var version = "0.46.1"

func Full() string {
return version
Expand Down

0 comments on commit 595aba5

Please sign in to comment.