mirror of
https://github.com/lwch/natpass
synced 2025-10-06 05:46:49 +08:00
移除反向代理代码
This commit is contained in:
26
code/client/rule/shell/h_resize.go
Normal file
26
code/client/rule/shell/h_resize.go
Normal file
@@ -0,0 +1,26 @@
|
||||
package shell
|
||||
|
||||
import (
|
||||
"fmt"
|
||||
"natpass/code/client/pool"
|
||||
"net/http"
|
||||
"strconv"
|
||||
)
|
||||
|
||||
// Resize resize terminal
|
||||
func (shell *Shell) Resize(pool *pool.Pool, w http.ResponseWriter, r *http.Request) {
|
||||
id := r.FormValue("id")
|
||||
rows := r.FormValue("rows")
|
||||
cols := r.FormValue("cols")
|
||||
|
||||
shell.RLock()
|
||||
link := shell.links[id]
|
||||
shell.RUnlock()
|
||||
|
||||
nRows, _ := strconv.ParseUint(rows, 0, 32)
|
||||
nCols, _ := strconv.ParseUint(cols, 0, 32)
|
||||
|
||||
link.SendResize(uint32(nRows), uint32(nCols))
|
||||
|
||||
fmt.Fprint(w, "ok")
|
||||
}
|
Reference in New Issue
Block a user