2019-02-09 09:07:47 +00:00
|
|
|
package conn
|
|
|
|
|
2019-02-23 15:29:48 +00:00
|
|
|
type Secret struct {
|
|
|
|
Password string
|
|
|
|
Conn *Conn
|
|
|
|
}
|
|
|
|
|
|
|
|
func NewSecret(p string, conn *Conn) *Secret {
|
|
|
|
return &Secret{
|
|
|
|
Password: p,
|
|
|
|
Conn: conn,
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
2019-02-09 09:07:47 +00:00
|
|
|
type Link struct {
|
2019-03-01 09:23:14 +00:00
|
|
|
ConnType string //连接类型
|
|
|
|
Host string //目标
|
|
|
|
Crypt bool //加密
|
|
|
|
Compress bool
|
|
|
|
RemoteAddr string
|
2019-02-09 09:07:47 +00:00
|
|
|
}
|
|
|
|
|
2019-03-01 09:23:14 +00:00
|
|
|
func NewLink(connType string, host string, crypt bool, compress bool, remoteAddr string) *Link {
|
2019-02-09 09:07:47 +00:00
|
|
|
return &Link{
|
2019-03-01 09:23:14 +00:00
|
|
|
RemoteAddr: remoteAddr,
|
|
|
|
ConnType: connType,
|
|
|
|
Host: host,
|
|
|
|
Crypt: crypt,
|
|
|
|
Compress: compress,
|
2019-02-26 14:40:28 +00:00
|
|
|
}
|
|
|
|
}
|