nps/lib/conn/link.go

32 lines
554 B
Go
Raw Normal View History

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 {
ConnType string //连接类型
Host string //目标
Crypt bool //加密
Compress bool
RemoteAddr string
2019-02-09 09:07:47 +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{
RemoteAddr: remoteAddr,
ConnType: connType,
Host: host,
Crypt: crypt,
Compress: compress,
2019-02-26 14:40:28 +00:00
}
}