sshpoke/internal/server/driver/ssh/sshproto/forward.go
2023-11-18 17:51:04 +03:00

20 lines
398 B
Go

package sshproto
import "fmt"
type Forward struct {
// local service to be forwarded
Local Endpoint `json:"local"`
// remote forwarding port (on remote SSH server network)
Remote Endpoint `json:"remote"`
}
type Endpoint struct {
Host string `json:"host"`
Port int `json:"port"`
}
func (endpoint *Endpoint) String() string {
return fmt.Sprintf("%s:%d", endpoint.Host, endpoint.Port)
}