feature: Adds basic TCP support for SSHAppBackend.
This commit is contained in:
parent
432d457ad7
commit
15176831e6
5 changed files with 622 additions and 172 deletions
|
@ -132,12 +132,12 @@ func (helper *BackendApplicationHelper) Start() error {
|
|||
ok, err := helper.Backend.StartProxy(command)
|
||||
var hasAnyFailed bool
|
||||
|
||||
if !ok {
|
||||
log.Warnf("failed to add proxy (%s:%d -> remote:%d): StartProxy returned into failure state", command.SourceIP, command.SourcePort, command.DestPort)
|
||||
hasAnyFailed = true
|
||||
} else if err != nil {
|
||||
if err != nil {
|
||||
log.Warnf("failed to add proxy (%s:%d -> remote:%d): %s", command.SourceIP, command.SourcePort, command.DestPort, err.Error())
|
||||
hasAnyFailed = true
|
||||
} else if !ok {
|
||||
log.Warnf("failed to add proxy (%s:%d -> remote:%d): StartProxy returned into failure state", command.SourceIP, command.SourcePort, command.DestPort)
|
||||
hasAnyFailed = true
|
||||
}
|
||||
|
||||
response := &commonbackend.ProxyStatusResponse{
|
||||
|
@ -160,12 +160,12 @@ func (helper *BackendApplicationHelper) Start() error {
|
|||
ok, err := helper.Backend.StopProxy(command)
|
||||
var hasAnyFailed bool
|
||||
|
||||
if !ok {
|
||||
log.Warnf("failed to remove proxy (%s:%d -> remote:%d): RemoveProxy returned into failure state", command.SourceIP, command.SourcePort, command.DestPort)
|
||||
hasAnyFailed = true
|
||||
} else if err != nil {
|
||||
if err != nil {
|
||||
log.Warnf("failed to remove proxy (%s:%d -> remote:%d): %s", command.SourceIP, command.SourcePort, command.DestPort, err.Error())
|
||||
hasAnyFailed = true
|
||||
} else if !ok {
|
||||
log.Warnf("failed to remove proxy (%s:%d -> remote:%d): RemoveProxy returned into failure state", command.SourceIP, command.SourcePort, command.DestPort)
|
||||
hasAnyFailed = true
|
||||
}
|
||||
|
||||
response := &commonbackend.ProxyStatusResponse{
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue