Skip to content

Commit

Permalink
enabled TLS
Browse files Browse the repository at this point in the history
  • Loading branch information
Akilan1999 committed Aug 23, 2024
1 parent 0a13327 commit 5a5985a
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 9 deletions.
15 changes: 7 additions & 8 deletions p2p/frp/client.go
Original file line number Diff line number Diff line change
@@ -1,7 +1,6 @@
package frp

import (
defaultConfig "github.com/Akilan1999/p2p-rendering-computation/config"
"github.com/Akilan1999/p2p-rendering-computation/server/docker"
"github.com/fatedier/frp/client"
"github.com/fatedier/frp/pkg/config"
Expand Down Expand Up @@ -145,10 +144,10 @@ func (c *Client) StartFRPClient() error {

cfg := config.GetDefaultClientConf()

Config, err := defaultConfig.ConfigInit(nil, nil)
if err != nil {
return err
}
//Config, err := defaultConfig.ConfigInit(nil, nil)
//if err != nil {
// return err
//}

var proxyConfs map[string]config.ProxyConf
var visitorCfgs map[string]config.VisitorConf
Expand All @@ -157,9 +156,9 @@ func (c *Client) StartFRPClient() error {

cfg.ServerAddr = c.Server.address
cfg.ServerPort = c.Server.port
cfg.TLSEnable = true
cfg.TLSKeyFile = Config.KeyFile
cfg.TLSCertFile = Config.PemFile
//cfg.TLSEnable = true
//cfg.TLSKeyFile = Config.KeyFile
//cfg.TLSCertFile = Config.PemFile

for i, _ := range c.ClientMappings {
var tcpcnf config.TCPProxyConf
Expand Down
2 changes: 1 addition & 1 deletion server/ReverseProxy.go
Original file line number Diff line number Diff line change
Expand Up @@ -97,7 +97,7 @@ func Proxy(c *gin.Context) {
return
}

rUrl := fmt.Sprintf("%v://%v%v", scheme, forwardTo, c.Request.URL)
rUrl := fmt.Sprintf("%v://%v%v", "http", forwardTo, c.Request.URL)

remote, err := url.Parse(rUrl)

Expand Down

0 comments on commit 5a5985a

Please sign in to comment.