go 有办法调用基础库 golang.org/x/crypto 的私有结构和方法吗?

查看 20|回复 0
作者:LonnyWong   
开源项目 https://github.com/trzsz/trzsz-ssh 想支持 ssh ControlMaster 的功能。
go 基础库 golang.org/x/crypto 有个 PR https://go-review.googlesource.com/c/crypto/+/383374 还没合入。
有办法在不 fork 基础库 golang.org/x/crypto 的情况下,优雅地在自己的项目实现这个 PR 的逻辑吗?
import "golang.org/x/crypto/ssh"
func NewControlClientConn(c net.Conn) (ssh.Conn,
handshakeControlProxy 这个函数很好办,直接从 PR 中复制出来就行了。
问题:上面的 ssh.connection、ssh.sshConn 和 ssh.newMux 依赖很深,发现很难直接 copy 出来。
您需要登录后才可以回帖 登录 | 立即注册

返回顶部