fix https to http

This commit is contained in:
2023-01-17 18:48:41 +00:00
parent c6ff05a9cb
commit add0ae7fb6
2 changed files with 7 additions and 1 deletions

View File

@@ -11,6 +11,7 @@ import (
"io/ioutil"
"net/http"
"strconv"
"time"
)
func Server() error {
@@ -189,10 +190,12 @@ func Server() error {
// If there is an identified node
if lowestLatency != 10000000 {
serverPort, err := frp.GetFRPServerPort("https://" + lowestLatencyIpAddress.Ipv4 + ":" + lowestLatencyIpAddress.ServerPort)
serverPort, err := frp.GetFRPServerPort("http://" + lowestLatencyIpAddress.Ipv4 + ":" + lowestLatencyIpAddress.ServerPort)
if err != nil {
return err
}
// Create 1 second delay to allow FRP server to start
time.Sleep(1000)
// Starts FRP as a client with
proxyPort, err := frp.StartFRPClientForServer(lowestLatencyIpAddress.Ipv4, serverPort, config.ServerPort)
if err != nil {