mirror of
https://github.com/fatedier/frp.git
synced 2025-07-27 07:35:07 +00:00
First available commit
This commit is contained in:
30
cmd/frpc/main.go
Normal file
30
cmd/frpc/main.go
Normal file
@@ -0,0 +1,30 @@
|
||||
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!")
|
||||
}
|
Reference in New Issue
Block a user