fix: conn reader stuck when header have body
Some checks failed
Docker Build and Push / build-and-push (push) Has been cancelled
Some checks failed
Docker Build and Push / build-and-push (push) Has been cancelled
This commit is contained in:
37
session/forwarder.go
Normal file
37
session/forwarder.go
Normal file
@ -0,0 +1,37 @@
|
||||
package session
|
||||
|
||||
import (
|
||||
"net"
|
||||
|
||||
"golang.org/x/crypto/ssh"
|
||||
)
|
||||
|
||||
type Forwarder struct {
|
||||
Listener net.Listener
|
||||
TunnelType TunnelType
|
||||
ForwardedPort uint16
|
||||
|
||||
getSlug func() string
|
||||
setSlug func(string)
|
||||
}
|
||||
|
||||
type ForwardingController interface {
|
||||
HandleGlobalRequest(ch <-chan *ssh.Request)
|
||||
HandleTCPIPForward(req *ssh.Request)
|
||||
HandleHTTPForward(req *ssh.Request, port uint16)
|
||||
HandleTCPForward(req *ssh.Request, addr string, port uint16)
|
||||
AcceptTCPConnections()
|
||||
}
|
||||
|
||||
type ForwarderInfo interface {
|
||||
GetTunnelType() TunnelType
|
||||
GetForwardedPort() uint16
|
||||
}
|
||||
|
||||
func (f *Forwarder) GetTunnelType() TunnelType {
|
||||
return f.TunnelType
|
||||
}
|
||||
|
||||
func (f *Forwarder) GetForwardedPort() uint16 {
|
||||
return f.ForwardedPort
|
||||
}
|
||||
Reference in New Issue
Block a user