Port mux| https|tls crypt

This commit is contained in:
刘河
2019-03-05 09:23:18 +08:00
parent a29a7d4923
commit f81fb7760e
39 changed files with 706 additions and 251 deletions

View File

@@ -7,6 +7,7 @@ import (
"github.com/cnlh/nps/lib/file"
"github.com/cnlh/nps/lib/install"
"github.com/cnlh/nps/server"
"github.com/cnlh/nps/server/connection"
"github.com/cnlh/nps/server/test"
"github.com/cnlh/nps/vender/github.com/astaxie/beego"
"github.com/cnlh/nps/vender/github.com/astaxie/beego/logs"
@@ -37,7 +38,7 @@ func main() {
return
}
}
if level = beego.AppConfig.String("logLevel"); level == "" {
if level = beego.AppConfig.String("log_level"); level == "" {
level = "7"
}
logs.Reset()
@@ -51,10 +52,11 @@ func main() {
task := &file.Tunnel{
Mode: "webServer",
}
bridgePort, err := beego.AppConfig.Int("bridgePort")
bridgePort, err := beego.AppConfig.Int("bridge_port")
if err != nil {
logs.Error("Getting bridgePort error", err)
os.Exit(0)
}
server.StartNewServer(bridgePort, task, beego.AppConfig.String("bridgeType"))
connection.InitConnectionService()
server.StartNewServer(bridgePort, task, beego.AppConfig.String("bridge_type"))
}