8 Commits

Author SHA1 Message Date
4a714dcd0e fix proxy to https issue 2023-09-27 14:05:25 +08:00
43d3ef275e fix proxy to https issue 2023-09-27 14:02:12 +08:00
d581a65002 update version code 2023-09-27 12:03:22 +08:00
f6d2362f48 fix dashboard_addr https issue 2023-09-27 12:01:29 +08:00
53ba8780ff update version code 2023-09-26 13:13:10 +08:00
0dc6d9bc12 solve http login issue 2023-09-26 13:11:38 +08:00
a8165c9b93 Merge remote-tracking branch 'origin/main' 2023-09-26 10:44:12 +08:00
bd83acef45 update readme 2023-09-26 10:44:01 +08:00
5 changed files with 9 additions and 6 deletions

View File

@@ -85,7 +85,7 @@ dashboard_pwd = "admin"
enable = false
```
3. 运行 frps-panel指定监听地址以及 token 存储文件路径。
3. 运行 frps-panel指定配置文件路径。
`./frps-panel -c ./frps-panel.toml`

View File

@@ -12,7 +12,7 @@ import (
"strings"
)
const version = "1.7.0"
const version = "1.7.2"
var (
showVersion bool
@@ -87,7 +87,7 @@ func parseConfigFile(configFile, tokensFile string) (controller.HandleController
}
}
common.Common.DashboardTls = strings.HasPrefix("https://", strings.ToLower(common.Common.DashboardAddr))
common.Common.DashboardTls = strings.HasPrefix(strings.ToLower(common.Common.DashboardAddr), "https://")
tls := server.TLS{
Enable: common.Common.TlsMode,

2
go.mod
View File

@@ -8,7 +8,6 @@ require (
github.com/gin-contrib/i18n v1.0.0
github.com/gin-contrib/sessions v0.0.5
github.com/gin-gonic/gin v1.9.1
github.com/pelletier/go-toml/v2 v2.0.9
github.com/spf13/cobra v0.0.3
golang.org/x/text v0.11.0
)
@@ -36,6 +35,7 @@ require (
github.com/modern-go/concurrent v0.0.0-20180306012644-bacd9c7ef1dd // indirect
github.com/modern-go/reflect2 v1.0.2 // indirect
github.com/nicksnyder/go-i18n/v2 v2.2.1 // indirect
github.com/pelletier/go-toml/v2 v2.0.9 // indirect
github.com/spf13/pflag v1.0.5 // indirect
github.com/twitchyliquid64/golang-asm v0.15.1 // indirect
github.com/ugorji/go/codec v1.2.11 // indirect

View File

@@ -556,6 +556,9 @@ func (c *HandleController) MakeProxyFunc() func(context *gin.Context) {
res := ProxyResponse{}
host := c.CommonInfo.DashboardAddr
port := c.CommonInfo.DashboardPort
host, _ = strings.CutPrefix(host, protocol)
requestUrl := protocol + host + ":" + strconv.Itoa(port) + context.Param("serverApi")
request, _ := http.NewRequest("GET", requestUrl, nil)
username := c.CommonInfo.DashboardUser

View File

@@ -175,9 +175,9 @@ func (s *Server) initHTTPServer() error {
engine := gin.New()
authStore := cookie.NewStore([]byte("frps-panel"))
authStore.Options(sessions.Options{
Secure: true,
Secure: false,
HttpOnly: false,
SameSite: 4,
SameSite: http.SameSiteDefaultMode,
Path: "/",
MaxAge: s.cfg.CommonInfo.AdminKeepTime,
})