refactor(session): add registry to manage SSH sessions
- Implement thread-safe session registry with sync.RWMutex - Add Registry interface for session management operations - Support Get, Register, Update, and Remove session operations - Enable dynamic slug updates for existing sessions - Fix Connection closed by remote because HandleTCPIPForward run on a goroutine
This commit is contained in:
@@ -106,7 +106,6 @@ func (s *SSHSession) HandleTCPIPForward(req *ssh.Request) {
|
||||
}
|
||||
|
||||
portToBind := uint16(rawPortToBind)
|
||||
|
||||
if isBlockedPort(portToBind) {
|
||||
log.Printf("Port %d is blocked or restricted", portToBind)
|
||||
err := req.Reply(false, nil)
|
||||
|
||||
Reference in New Issue
Block a user