-
-
Notifications
You must be signed in to change notification settings - Fork 312
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Add the ability to cancel tunnel requests (#311)
* Add the ability to cancel tunnel requests * No need to check for session with cancellations
- Loading branch information
1 parent
b59cd1e
commit c31c49e
Showing
3 changed files
with
73 additions
and
7 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -26,6 +26,8 @@ func handleRequest(newRequest *ssh.Request, sshConn *utils.SSHConnection, state | |
case "tcpip-forward": | ||
go checkSession(newRequest, sshConn, state) | ||
handleRemoteForward(newRequest, sshConn, state) | ||
case "cancel-tcpip-forward": | ||
handleCancelRemoteForward(newRequest, sshConn, state) | ||
case "[email protected]": | ||
err := newRequest.Reply(true, nil) | ||
if err != nil { | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters