link.go 614 B

123456789101112131415161718192021222324252627282930313233
  1. package conn
  2. type Secret struct {
  3. Password string
  4. Conn *Conn
  5. }
  6. func NewSecret(p string, conn *Conn) *Secret {
  7. return &Secret{
  8. Password: p,
  9. Conn: conn,
  10. }
  11. }
  12. type Link struct {
  13. ConnType string //连接类型
  14. Host string //目标
  15. Crypt bool //加密
  16. Compress bool
  17. LocalProxy bool
  18. RemoteAddr string
  19. }
  20. func NewLink(connType string, host string, crypt bool, compress bool, remoteAddr string, localProxy bool) *Link {
  21. return &Link{
  22. RemoteAddr: remoteAddr,
  23. ConnType: connType,
  24. Host: host,
  25. Crypt: crypt,
  26. Compress: compress,
  27. LocalProxy: localProxy,
  28. }
  29. }