mirror of
https://gitee.com/IrisVega/frp.git
synced 2024-11-01 22:31:29 +08:00
32 lines
534 B
Go
32 lines
534 B
Go
package main
|
|
|
|
import (
|
|
"os"
|
|
"sync"
|
|
|
|
"github.com/fatedier/frp/models/client"
|
|
"github.com/fatedier/frp/utils/log"
|
|
)
|
|
|
|
func main() {
|
|
err := client.LoadConf("./frpc.ini")
|
|
if err != nil {
|
|
os.Exit(-1)
|
|
}
|
|
|
|
log.InitLog(client.LogWay, client.LogFile, client.LogLevel)
|
|
|
|
// wait until all control goroutine exit
|
|
var wait sync.WaitGroup
|
|
wait.Add(len(client.ProxyClients))
|
|
|
|
for _, client := range client.ProxyClients {
|
|
go ControlProcess(client, &wait)
|
|
}
|
|
|
|
log.Info("Start frpc success")
|
|
|
|
wait.Wait()
|
|
log.Warn("All proxy exit!")
|
|
}
|