func DialForSSH(addr string) (net.Conn, error) {
	if _, _, err := net.SplitHostPort(addr); err != nil && addr != "" {
		if _, _, err := net.SplitHostPort(addr + ":22"); err == nil {
			addr += ":22"
		}
	}
	return net.Dial("tcp", addr)
}
DialForSSH is the modified version of net.Dial, would add ":22" automaticlly
package upstream
import (
	"fmt"
	"net"
	"strconv"
	"golang.org/x/crypto/ssh"
	"github.com/tg123/sshpiper/sshpiperd/registry"
)
type Handler func(conn ssh.ConnMetadata, challengeContext ssh.AdditionalChallengeContext) (net.Conn, *ssh.AuthPipe, error)
type CreatePipeOption struct {
	Username         string
	UpstreamUsername string
	Host             string
	Port             int
}
type Pipe struct {
	Username         string
	UpstreamUsername string
	Host             string
	Port             int
}
type PipeManager interface {
	ListPipe() ([]Pipe, error)
	CreatePipe(opt CreatePipeOption) error
	RemovePipe(name string) error
}
type Provider interface {
	registry.Plugin
	PipeManager
	GetHandler() Handler
}
var (
	drivers = registry.NewRegistry()
)
func Register(name string, driver Provider) {
	drivers.Register(name, driver)
}
func All() []string {
	return drivers.Drivers()
}
func Get(name string) Provider {
	if d, ok := drivers.Get(name).(Provider); ok {
		return d
	}
	return nil
}
func SplitHostPortForSSH(addr string) (host string, port int, err error) {
	host = addr
	h, p, err := net.SplitHostPort(host)
	if err == nil {
		host = h
		port, err = strconv.Atoi(p)
		if err != nil {
			return
		}
	} else if host != "" {
		if _, _, err = net.SplitHostPort(host + ":22"); err == nil {
			port = 22
		}
	}
	if host == "" {
		err = fmt.Errorf("empty addr")
	}
	return
}