Skip to content

Commit

Permalink
perf: use guacamole rdp error message
Browse files Browse the repository at this point in the history
  • Loading branch information
LeeEirc committed Dec 12, 2024
1 parent f1f348d commit aa17d55
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 2 deletions.
4 changes: 4 additions & 0 deletions pkg/tunnel/conn.go
Original file line number Diff line number Diff line change
Expand Up @@ -201,6 +201,10 @@ func (t *Connection) Run(ctx *gin.Context) (err error) {
msg := fmt.Sprintf("required: %s", strings.Join(instruction.Args, ","))
logger.Infof("Session[%s] receive guacamole server required: %s", t, msg)
requiredErr = guacd.NewInstruction(guacd.InstructionServerError, msg)
logger.Errorf("Session[%s] send guacamole server required err: %s", t,
requiredErr.String())
_ = t.writeWsMessage([]byte(requiredErr.String()))
continue
default:
noNopTime = time.Now()
}
Expand Down
4 changes: 2 additions & 2 deletions ui/src/utils/status.js
Original file line number Diff line number Diff line change
@@ -1,6 +1,5 @@
export const ErrorStatusCodes = {
256: 'GuaErrUnSupport',
519: 'GuaErrUpstreamNotFound',
514: 'GuaErrUpStreamTimeout',
521: 'GuaErrSessionConflict',
769: 'GuaErrClientUnauthorized',
Expand Down Expand Up @@ -65,5 +64,6 @@ export const GuacamoleErrMsg = {
'Manually disconnected.': 'GuacamoleErrManuallyDisconnected',
'Manually logged off.': 'GuacamoleErrManuallyLoggedOff',

'Unsupported credential type requested.': 'GuacamoleErrUnsupportedCredentialTypeRequested'
'Unsupported credential type requested.': 'GuacamoleErrUnsupportedCredentialTypeRequested',
'Unable to connect to VNC server.': 'GuacamoleErrUnableToConnectToVNCServer'
}

0 comments on commit aa17d55

Please sign in to comment.