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