fix: reject non tunnel request & reject duplicated port

This commit is contained in:
2025-04-08 23:14:42 +07:00
parent 5350bc13a9
commit 0117931817
6 changed files with 51 additions and 16 deletions

View File

@ -1,7 +1,6 @@
package server
import (
"fmt"
"golang.org/x/crypto/ssh"
"log"
"net"
@ -16,7 +15,7 @@ func (s *Server) handleConnection(conn net.Conn) {
return
}
fmt.Println("SSH connection established:", sshConn.User())
log.Println("SSH connection established:", sshConn.User())
session.New(sshConn, chans, reqs)
}