This commit is contained in:
刘河
2019-02-16 23:18:58 +08:00
parent 3b18d66835
commit 7a8cb3d5b6
14 changed files with 243 additions and 217 deletions

View File

@@ -118,7 +118,7 @@ func (s *httpServer) process(c *conn.Conn, r *http.Request) {
err error
)
if host, err = file.GetCsvDb().GetInfoByHost(r.Host, r); err != nil {
lg.Printf("the url %s %s Can't be parsed!", r.Host, r.RequestURI)
lg.Printf("the url %s %s can't be parsed!", r.Host, r.RequestURI)
goto end
} else {
lastHost = host

View File

@@ -51,7 +51,7 @@ func DealBridgeTask() {
//start a new server
func StartNewServer(bridgePort int, cnf *file.Tunnel, bridgeType string) {
Bridge = bridge.NewTunnel(bridgePort, bridgeType, common.GetBoolByStr(beego.AppConfig.String("ipLimit")))
Bridge = bridge.NewTunnel(bridgePort, bridgeType, common.GetBoolByStr(beego.AppConfig.String("ipLimit")), RunList)
if err := Bridge.StartTunnel(); err != nil {
lg.Fatalln("服务端开启失败", err)
} else {
@@ -244,8 +244,8 @@ func DelClientConnect(clientId int) {
func GetDashboardData() map[string]int {
data := make(map[string]int)
data["hostCount"] = len(file.GetCsvDb().Hosts) - 1 //Remove the public key client
data["clientCount"] = len(file.GetCsvDb().Clients)
data["hostCount"] = len(file.GetCsvDb().Hosts)
data["clientCount"] = len(file.GetCsvDb().Clients) - 1 //Remove the public key client
list := file.GetCsvDb().Clients
dealClientData(list)
c := 0