frp/cmd/frpc/main.go

31 lines
451 B
Go
Raw Normal View History

2016-01-27 21:24:36 +08:00
package main
import (
"os"
"sync"
2016-02-03 18:46:24 +08:00
"github.com/fatedier/frp/utils/log"
2016-01-27 21:24:36 +08:00
)
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!")
}