命令行模式同步

This commit is contained in:
刘河
2019-02-01 02:39:28 +08:00
parent 4e6754deb9
commit c336bf94d8
5 changed files with 9 additions and 9 deletions

View File

@@ -13,7 +13,6 @@ var (
)
func main() {
log.SetFlags(log.Lshortfile)
flag.Parse()
stop := make(chan int)
for _, v := range strings.Split(*verifyKey, ",") {

View File

@@ -22,7 +22,6 @@ var (
)
func main() {
log.SetFlags(log.Lshortfile)
flag.Parse()
task := &utils.Tunnel{
TcpPort: *httpPort,
@@ -45,6 +44,8 @@ func main() {
Remark: "",
Status: true,
IsConnect: false,
Cnf: &utils.Config{},
Flow: &utils.Flow{},
}
c.Cnf.CompressDecode, c.Cnf.CompressEncode = utils.GetCompressType(c.Cnf.Compress)
server.CsvDb.Clients[0] = c
@@ -60,5 +61,8 @@ func main() {
}
log.Println("服务端启动监听tcp服务端端口", *TcpPort)
task.Config.CompressDecode, task.Config.CompressEncode = utils.GetCompressType(task.Config.Compress)
if *rpMode!="webServer" {
server.CsvDb.Tasks[0] = task
}
server.StartNewServer(*TcpPort, task)
}