-
-
Notifications
You must be signed in to change notification settings - Fork 13.6k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #4496 from fatedier/dev
bump version
- Loading branch information
Showing
19 changed files
with
125 additions
and
51 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,8 +1,4 @@ | ||
### Features | ||
|
||
* Added a new plugin `tls2raw`: Enables TLS termination and forwarding of decrypted raw traffic to local service. | ||
* Added a default timeout of 30 seconds for the frpc subcommands to prevent commands from being stuck for a long time due to network issues. | ||
|
||
### Fixes | ||
|
||
* Fixed the issue that when `loginFailExit = false`, the frpc stop command cannot be stopped correctly if the server is not successfully connected after startup. | ||
* The frpc visitor command-line parameter adds the `--server-user` option to specify the username of the server-side proxy to connect to. | ||
* Support multiple frpc instances with different subjects when using oidc authentication. |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,4 +1,4 @@ | ||
FROM golang:1.22 AS building | ||
FROM golang:1.23 AS building | ||
|
||
COPY . /building | ||
WORKDIR /building | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,4 +1,4 @@ | ||
FROM golang:1.22 AS building | ||
FROM golang:1.23 AS building | ||
|
||
COPY . /building | ||
WORKDIR /building | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,64 @@ | ||
package auth_test | ||
|
||
import ( | ||
"context" | ||
"testing" | ||
"time" | ||
|
||
"github.com/coreos/go-oidc/v3/oidc" | ||
"github.com/stretchr/testify/require" | ||
|
||
"github.com/fatedier/frp/pkg/auth" | ||
v1 "github.com/fatedier/frp/pkg/config/v1" | ||
"github.com/fatedier/frp/pkg/msg" | ||
) | ||
|
||
type mockTokenVerifier struct{} | ||
|
||
func (m *mockTokenVerifier) Verify(ctx context.Context, subject string) (*oidc.IDToken, error) { | ||
return &oidc.IDToken{ | ||
Subject: subject, | ||
}, nil | ||
} | ||
|
||
func TestPingWithEmptySubjectFromLoginFails(t *testing.T) { | ||
r := require.New(t) | ||
consumer := auth.NewOidcAuthVerifier([]v1.AuthScope{v1.AuthScopeHeartBeats}, &mockTokenVerifier{}) | ||
err := consumer.VerifyPing(&msg.Ping{ | ||
PrivilegeKey: "ping-without-login", | ||
Timestamp: time.Now().UnixMilli(), | ||
}) | ||
r.Error(err) | ||
r.Contains(err.Error(), "received different OIDC subject in login and ping") | ||
} | ||
|
||
func TestPingAfterLoginWithNewSubjectSucceeds(t *testing.T) { | ||
r := require.New(t) | ||
consumer := auth.NewOidcAuthVerifier([]v1.AuthScope{v1.AuthScopeHeartBeats}, &mockTokenVerifier{}) | ||
err := consumer.VerifyLogin(&msg.Login{ | ||
PrivilegeKey: "ping-after-login", | ||
}) | ||
r.NoError(err) | ||
|
||
err = consumer.VerifyPing(&msg.Ping{ | ||
PrivilegeKey: "ping-after-login", | ||
Timestamp: time.Now().UnixMilli(), | ||
}) | ||
r.NoError(err) | ||
} | ||
|
||
func TestPingAfterLoginWithDifferentSubjectFails(t *testing.T) { | ||
r := require.New(t) | ||
consumer := auth.NewOidcAuthVerifier([]v1.AuthScope{v1.AuthScopeHeartBeats}, &mockTokenVerifier{}) | ||
err := consumer.VerifyLogin(&msg.Login{ | ||
PrivilegeKey: "login-with-first-subject", | ||
}) | ||
r.NoError(err) | ||
|
||
err = consumer.VerifyPing(&msg.Ping{ | ||
PrivilegeKey: "ping-with-different-subject", | ||
Timestamp: time.Now().UnixMilli(), | ||
}) | ||
r.Error(err) | ||
r.Contains(err.Error(), "received different OIDC subject in login and ping") | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -14,7 +14,7 @@ | |
|
||
package version | ||
|
||
var version = "0.60.0" | ||
var version = "0.61.0" | ||
|
||
func Full() string { | ||
return version | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters