ginuerzh / gost

GO Simple Tunnel - a simple tunnel written in golang
MIT License
15.57k stars 2.44k forks source link

编译错误 build failed: expects import #754

Closed elliott10 closed 2 years ago

elliott10 commented 2 years ago

最新版本用go编译,出现如下错误:

$ go build
go/src/github.com/ginuerzh/gost/obfs.go:23:2: code in directory go/src/git.torproject.org/pluggable-transports/obfs4.git/transports/base expects import "gitlab.com/yawning/obfs4.git/transports/base"
go/src/github.com/ginuerzh/gost/obfs.go:24:2: code in directory go/src/git.torproject.org/pluggable-transports/obfs4.git/transports/obfs4 expects import "gitlab.com/yawning/obfs4.git/transports/obfs4"
elliott10 commented 2 years ago

And then:

# github.com/ginuerzh/gost
go/src/github.com/ginuerzh/gost/quic.go:24:47: not enough arguments in call to session.session.OpenStreamSync
    have ()
    want (context.Context)
go/src/github.com/ginuerzh/gost/quic.go:36:24: session.session.Close undefined (type quic.Session has no field or method Close)
go/src/github.com/ginuerzh/gost/quic.go:142:3: unknown field 'HandshakeTimeout' in struct literal of type quic.Config
go/src/github.com/ginuerzh/gost/quic.go:144:3: unknown field 'IdleTimeout' in struct literal of type quic.Config
go/src/github.com/ginuerzh/gost/quic.go:146:4: undefined: quic.VersionGQUIC43
go/src/github.com/ginuerzh/gost/quic.go:147:4: undefined: quic.VersionGQUIC39
go/src/github.com/ginuerzh/gost/quic.go:183:3: unknown field 'HandshakeTimeout' in struct literal of type quic.Config
go/src/github.com/ginuerzh/gost/quic.go:185:3: unknown field 'IdleTimeout' in struct literal of type quic.Config
go/src/github.com/ginuerzh/gost/quic.go:226:30: not enough arguments in call to l.ln.Accept
    have ()
    want (context.Context)
go/src/github.com/ginuerzh/gost/quic.go:242:38: not enough arguments in call to session.AcceptStream
    have ()
    want (context.Context)
go/src/github.com/ginuerzh/gost/quic.go:242:38: too many errors
elliott10 commented 2 years ago

通过换更低版本的ubuntu16系统则编译通过了。