diff --git a/agent/app/api/v2/terminal.go b/agent/app/api/v2/terminal.go index 61372620349a..16685edac1c3 100644 --- a/agent/app/api/v2/terminal.go +++ b/agent/app/api/v2/terminal.go @@ -228,8 +228,8 @@ func wshandleError(ws *websocket.Conn, err error) bool { } var upGrader = websocket.Upgrader{ - ReadBufferSize: 1024, - WriteBufferSize: 1024 * 1024 * 10, + ReadBufferSize: 4096, + WriteBufferSize: 16384, CheckOrigin: func(r *http.Request) bool { return true }, diff --git a/core/app/api/v2/host.go b/core/app/api/v2/host.go index 33312855d4d1..621f6d0df7ec 100644 --- a/core/app/api/v2/host.go +++ b/core/app/api/v2/host.go @@ -327,8 +327,8 @@ func (b *BaseApi) WsSsh(c *gin.Context) { } var upGrader = websocket.Upgrader{ - ReadBufferSize: 1024, - WriteBufferSize: 1024 * 1024 * 10, + ReadBufferSize: 4096, + WriteBufferSize: 16384, CheckOrigin: func(r *http.Request) bool { return true },