nps/lib/conn/link.go

34 lines
614 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
2019-04-08 09:01:08 +00:00
LocalProxy bool
RemoteAddr string
2019-02-09 09:07:47 +00:00
}
2019-04-08 09:01:08 +00:00
func NewLink(connType string, host string, crypt bool, compress bool, remoteAddr string, localProxy bool) *Link {
2019-02-09 09:07:47 +00:00
return &Link{
RemoteAddr: remoteAddr,
ConnType: connType,
Host: host,
Crypt: crypt,
Compress: compress,
2019-04-08 09:01:08 +00:00
LocalProxy: localProxy,
2019-02-26 14:40:28 +00:00
}
}