enabled TLS
This commit is contained in:
@@ -1,13 +1,14 @@
|
||||
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"
|
||||
"github.com/phayes/freeport"
|
||||
"math/rand"
|
||||
"strconv"
|
||||
"time"
|
||||
"github.com/phayes/freeport"
|
||||
)
|
||||
|
||||
// Client This struct stores
|
||||
@@ -144,6 +145,11 @@ func (c *Client) StartFRPClient() error {
|
||||
|
||||
cfg := config.GetDefaultClientConf()
|
||||
|
||||
Config, err := defaultConfig.ConfigInit(nil, nil)
|
||||
if err != nil {
|
||||
return err
|
||||
}
|
||||
|
||||
var proxyConfs map[string]config.ProxyConf
|
||||
var visitorCfgs map[string]config.VisitorConf
|
||||
|
||||
@@ -151,6 +157,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
|
||||
|
||||
for i, _ := range c.ClientMappings {
|
||||
var tcpcnf config.TCPProxyConf
|
||||
|
||||
@@ -377,8 +377,6 @@ func MapPort(port string, domainName string) (string, string, error) {
|
||||
// random large number
|
||||
lowestLatency = 10000000
|
||||
|
||||
fmt.Println("here --------------------------------")
|
||||
|
||||
for i, _ := range table.IpAddress {
|
||||
// Checks if the ping is the lowest and if the following node is acting as a proxy
|
||||
//if table.IpAddress[i].Latency.Milliseconds() < lowestLatency && table.IpAddress[i].ProxyPort != "" {
|
||||
|
||||
Reference in New Issue
Block a user