mirror of
https://github.com/moul/sshportal.git
synced 2025-10-02 09:24:43 +08:00
Implement @arkan's session.MaskedReqs
This commit is contained in:
parent
742cacf384
commit
84e8352338
1 changed files with 1 additions and 8 deletions
9
proxy.go
9
proxy.go
|
@ -22,10 +22,7 @@ func proxy(s ssh.Session, config *Config) error {
|
|||
}
|
||||
|
||||
log.Println("SSH Connectin established")
|
||||
lreqs := make(chan *gossh.Request, 1)
|
||||
defer close(lreqs)
|
||||
|
||||
return pipe(lreqs, rreqs, s, rch)
|
||||
return pipe(s.MaskedReqs(), rreqs, s, rch)
|
||||
}
|
||||
|
||||
func pipe(lreqs, rreqs <-chan *gossh.Request, lch, rch gossh.Channel) error {
|
||||
|
@ -46,10 +43,6 @@ func pipe(lreqs, rreqs <-chan *gossh.Request, lch, rch gossh.Channel) error {
|
|||
errch <- errors.New("rch closed the connection")
|
||||
}()
|
||||
|
||||
go func() {
|
||||
// FIXME: find a way to get the client requests
|
||||
}()
|
||||
|
||||
for {
|
||||
select {
|
||||
case req := <-lreqs: // forward ssh requests from local to remote
|
||||
|
|
Loading…
Add table
Reference in a new issue