Skip to content

Commit 33a3292

Browse files
authored
Merge pull request #590 from ctlaltlaltc/feat/execd-websocket-pty
feat(execd): add WebSocket PTY support
2 parents 84a4ed8 + decf68e commit 33a3292

17 files changed

Lines changed: 2345 additions & 0 deletions

‎components/execd/go.mod‎

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -5,6 +5,7 @@ go 1.24.0
55
require (
66
github.com/alibaba/opensandbox/internal v0.0.0
77
github.com/bmatcuk/doublestar/v4 v4.9.1
8+
github.com/creack/pty v1.1.24
89
github.com/elastic/go-seccomp-bpf v1.6.0
910
github.com/gin-gonic/gin v1.10.0
1011
github.com/go-playground/validator/v10 v10.28.0

‎components/execd/go.sum‎

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -11,6 +11,8 @@ github.com/cloudwego/base64x v0.1.4/go.mod h1:0zlkT4Wn5C6NdauXdJRhSKRlJvmclQ1hhJ
1111
github.com/cloudwego/iasm v0.2.0 h1:1KNIy1I1H9hNNFEEH3DVnI4UujN+1zjpuk6gwHLTssg=
1212
github.com/cloudwego/iasm v0.2.0/go.mod h1:8rXZaNYT2n95jn+zTI1sDr+IgcD2GVs0nlbbQPiEFhY=
1313
github.com/creack/pty v1.1.9/go.mod h1:oKZEueFk5CKHvIhNR5MUki03XCEU+Q6VDXinZuGJ33E=
14+
github.com/creack/pty v1.1.24 h1:bJrF4RRfyJnbTJqzRLHzcGaZK1NeM5kTC9jGgovnR1s=
15+
github.com/creack/pty v1.1.24/go.mod h1:08sCNb52WyoAwi2QDyzUCTgcvVFhUzewun7wtTfvcwE=
1416
github.com/davecgh/go-spew v1.1.0/go.mod h1:J7Y8YcW2NihsgmVo/mv3lAwl/skON4iLHjSsI+c5H38=
1517
github.com/davecgh/go-spew v1.1.1 h1:vj9j/u1bqnvCEfJOwUhtlOARqs3+rkHYY13jYWTU97c=
1618
github.com/davecgh/go-spew v1.1.1/go.mod h1:J7Y8YcW2NihsgmVo/mv3lAwl/skON4iLHjSsI+c5H38=

‎components/execd/pkg/runtime/ctrl.go‎

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -42,6 +42,7 @@ type Controller struct {
4242
defaultLanguageSessions sync.Map // map[Language]string
4343
commandClientMap sync.Map // map[sessionID]*commandKernel
4444
bashSessionClientMap sync.Map // map[sessionID]*bashSession
45+
ptySessionMap sync.Map // map[sessionID]*ptySession
4546
db *sql.DB
4647
dbOnce sync.Once
4748
}

0 commit comments

Comments
 (0)