func NewTCPProxy(frontendAddr, backendAddr *net.TCPAddr, client *ssh.Client) (*TCPProxy, error) {
	listener, err := net.ListenTCP("tcp", frontendAddr)
	if err != nil {
		return nil, err
	}
	return &TCPProxy{
		client:       client,
		listener:     listener,
		frontendAddr: listener.Addr().(*net.TCPAddr),
		backendAddr:  backendAddr,
	}, nil
}
NewTCPProxy creates a new TCPProxy.
package main
import (
	"io"
	"net"
	"sync"
	log "github.com/sirupsen/logrus"
	"golang.org/x/crypto/ssh"
)
type TCPProxy struct {
	client       *ssh.Client
	listener     *net.TCPListener
	frontendAddr *net.TCPAddr
	backendAddr  *net.TCPAddr
}