Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

v2ray-core build failed with GOPROXY=direct #3187

Open
lindsayzhou opened this issue Oct 12, 2024 · 5 comments
Open

v2ray-core build failed with GOPROXY=direct #3187

lindsayzhou opened this issue Oct 12, 2024 · 5 comments

Comments

@lindsayzhou
Copy link

What version of V2Ray are you using?

v2ray-core 5.20.0
golang 1.23.2 linux/amd64

What problems have you encountered?

As title

Reproduce

# GOMODCACHE=`mktemp -d /tmp/go-XXXX` GOPROXY="direct" go build -o v2ray ./main
go: downloading google.golang.org/grpc v1.67.1
go: downloading google.golang.org/protobuf v1.34.2
go: downloading github.com/vincent-petithory/dataurl v1.0.0
go: downloading github.com/golang/protobuf v1.5.4
go: downloading go.starlark.net v0.0.0-20230612165344-9532f5667272
go: downloading go4.org/netipx v0.0.0-20230303233057-f1b76eb4bb35
go: downloading github.com/v2fly/VSign v0.0.0-20201108000810-e2adc24bf848
go: downloading github.com/pelletier/go-toml v1.9.5
go: downloading gvisor.dev/gvisor v0.0.0-20231020174304-b8a429915ff1
go: downloading github.com/quic-go/quic-go v0.47.0
go: downloading golang.org/x/net v0.29.0
go: downloading golang.org/x/crypto v0.27.0
go: downloading gopkg.in/yaml.v3 v3.0.1
go: downloading github.com/xiaokangwang/struc v0.0.0-20231031203518-0e381172f248
go: downloading github.com/pion/transport/v2 v2.2.10
go: downloading lukechampine.com/blake3 v1.3.0
go: downloading golang.org/x/sys v0.25.0
go: downloading github.com/pion/dtls/v2 v2.2.12
go: downloading github.com/JimmyHuang454/hysteria/core/v2 v2.0.0-20240724161647-b3347cf6334d
go: downloading github.com/apernet/quic-go v0.45.2-0.20240702221538-ed74cfbe8b6e
go: downloading github.com/golang-collections/go-datastructures v0.0.0-20150211160725-59788d5eb259
go: downloading github.com/mustafaturan/bus v1.0.2
go: downloading github.com/xiaokangwang/VLite v0.0.0-20220418190619-cff95160a432
go: downloading github.com/miekg/dns v1.1.62
go: downloading github.com/adrg/xdg v0.5.0
go: downloading github.com/gorilla/websocket v1.5.3
go: downloading github.com/refraction-networking/utls v1.6.7
go: downloading github.com/pires/go-proxyproto v0.7.0
go: downloading google.golang.org/genproto/googleapis/rpc v0.0.0-20240814211410-ddb44dafa142
go: downloading github.com/seiflotfy/cuckoofilter v0.0.0-20220411075957-e3b120b3f5fb
go: downloading github.com/v2fly/ss-bloomring v0.0.0-20210312155135-28617310f63e
go: downloading golang.org/x/exp v0.0.0-20240506185415-9bf2ced13842
go: downloading github.com/pion/logging v0.2.2
go: downloading github.com/stretchr/testify v1.9.0
go: downloading github.com/pion/sctp v1.8.7
go: downloading github.com/xtaci/smux v1.5.24
go: downloading github.com/mustafaturan/monoton v1.0.0
go: downloading golang.org/x/text v0.18.0
go: downloading github.com/google/gopacket v1.1.19
go: downloading github.com/jhump/protoreflect v1.17.0
go: downloading github.com/klauspost/cpuid/v2 v2.2.5
go: downloading github.com/boljen/go-bitmap v0.0.0-20151001105940-23cd2fb0ce7d
go: downloading github.com/patrickmn/go-cache v2.1.0+incompatible
go: downloading github.com/secure-io/siv-go v0.0.0-20180922214919-5ff40651e2c4
go: downloading github.com/andybalholm/brotli v1.0.6
go: downloading github.com/cloudflare/circl v1.3.7
go: downloading github.com/klauspost/compress v1.17.4
go: downloading github.com/riobard/go-bloom v0.0.0-20200614022211-cdc8013cb5b3
go: downloading github.com/dgryski/go-metro v0.0.0-20211217172704-adc40b04c140
go: downloading github.com/ebfe/bcrypt_pbkdf v0.0.0-20140212075826-3c8d2dcb253a
go: downloading github.com/davecgh/go-spew v1.1.1
go: downloading github.com/pmezard/go-difflib v1.0.0
go: downloading github.com/stretchr/objx v0.5.2
go: downloading github.com/v2fly/BrowserBridge v0.0.0-20210430233438-0570fc1d7d08
go: downloading github.com/pion/randutil v0.1.0
go: downloading github.com/klauspost/reedsolomon v1.11.7
go: downloading github.com/quic-go/qpack v0.5.1
go: downloading github.com/bufbuild/protocompile v0.14.1
go: downloading github.com/aead/cmac v0.0.0-20160719120800-7af84192f0b1
app/tun/device/linkWriterToWriter.go:8:2: gvisor.dev/[email protected]: invalid version: unknown revision b8a429915ff1
app/tun/device/device.go:4:2: gvisor.dev/[email protected]: invalid version: unknown revision b8a429915ff1
app/tun/device/gvisor/gvisor_linux.go:16:2: gvisor.dev/[email protected]: invalid version: unknown revision b8a429915ff1
app/tun/device/gvisor/gvisor_linux.go:17:2: gvisor.dev/[email protected]: invalid version: unknown revision b8a429915ff1
app/tun/device/gvisor/gvisor_linux.go:18:2: gvisor.dev/[email protected]: invalid version: unknown revision b8a429915ff1
app/tun/net/net.go:6:2: gvisor.dev/[email protected]: invalid version: unknown revision b8a429915ff1
app/tun/handler_tcp.go:8:2: gvisor.dev/[email protected]: invalid version: unknown revision b8a429915ff1
app/tun/handler_tcp.go:9:2: gvisor.dev/[email protected]: invalid version: unknown revision b8a429915ff1
app/tun/option.go:5:2: gvisor.dev/[email protected]: invalid version: unknown revision b8a429915ff1
app/tun/option.go:6:2: gvisor.dev/[email protected]: invalid version: unknown revision b8a429915ff1
app/tun/stack.go:8:2: gvisor.dev/[email protected]: invalid version: unknown revision b8a429915ff1
app/tun/handler_tcp.go:11:2: gvisor.dev/[email protected]: invalid version: unknown revision b8a429915ff1
app/tun/handler_udp.go:8:2: gvisor.dev/[email protected]: invalid version: unknown revision b8a429915ff1
app/tun/handler_tcp.go:12:2: gvisor.dev/[email protected]: invalid version: unknown revision b8a429915ff1
@clamx4
Copy link

clamx4 commented Oct 14, 2024

I'm facing the same issue.

@crazypeace
Copy link

https://zelikk.blogspot.com/2024/10/xray-gvisor-github-codespaces.html

@clamx4
Copy link

clamx4 commented Nov 1, 2024

https://zelikk.blogspot.com/2024/10/xray-gvisor-github-codespaces.html

Thank you crazypeace. With your workaround, I can build v2ray-core with these steps:

  1. find [email protected] at https://github.com/google/gvisor/tree/b8a429915ff1a5747ed6608bd30cd3a734eb6aaf
  2. download gvisor-b8a429915ff1a5747ed6608bd30cd3a734eb6aaf.zip and then extract gvisor-b8a429915ff1a5747ed6608bd30cd3a734eb6aaf directory
    • not sure why git clone and git checkout b8a429915ff1 don't work, with an error error: pathspec 'b8a429915ff1' did not match any file(s) known to git
  3. add this in go.mod: replace gvisor.dev/gvisor v0.0.0-20231020174304-b8a429915ff1 => ${path-to}/gvisor-b8a429915ff1a5747ed6608bd30cd3a734eb6aaf
  4. compile with CGO_ENABLED=0 go build -o $HOME/v2ray -trimpath -ldflags "-s -w -buildid=" ./main

Although we have the workaround, I think the original issue still needs to be solved.

@parsa2000200
Copy link

52c842368489f4e13922af5ac146c2b25f215eef

@parsa2000200
Copy link

b287ade328a3295e93793384a5e10d29ed8b3026

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

4 participants