v0.9.21 WebSSH

This commit is contained in:
naiba
2021-08-18 11:56:54 +08:00
parent 960266bf71
commit 9bf536b68a
13 changed files with 597 additions and 99 deletions

View File

@@ -5,6 +5,7 @@ import (
"html/template"
"net/http"
"strings"
"sync"
"time"
"code.cloudfoundry.org/bytefmt"
@@ -135,7 +136,7 @@ func ServeWeb(port uint) *http.Server {
func routers(r *gin.Engine) {
// 通用页面
cp := commonPage{r}
cp := commonPage{r: r, terminals: make(map[string]*terminalContext), terminalsLock: new(sync.Mutex)}
cp.serve()
// 游客页面
gp := guestPage{r}