XTLS / Xray-core

Xray, Penetrates Everything. Also the best v2ray-core, with XTLS support. Fully compatible configuration.
https://t.me/projectXray
Mozilla Public License 2.0
25.45k stars 3.93k forks source link

v1.8.24 compile broken on golang-1.23 #3795

Closed samuelhbne closed 1 month ago

samuelhbne commented 1 month ago

Integrity requirements

Description

v1.8.24 compile broken with go-1.23. Same configuration works well with v1.8.23

git clone https://github.com/XTLS/Xray-core.git . && \ git checkout v1.8.24 && \ go build -o xray -trimpath -ldflags "-s -w -buildid=" ./main

46.34 transport/internet/system_listener.go:12:2: github.com/pires/go-proxyproto@v0.7.0: Get "https://proxy.golang.org/github.com/pires/go-proxyproto/@v/v0.7.0.mod": stream error: stream ID 13; PROTOCOL_ERROR 46.34 transport/internet/system_dialer.go:9:2: github.com/sagernet/sing@v0.4.1: Get "https://proxy.golang.org/github.com/sagernet/sing/@v/v0.4.1.mod": stream error: stream ID 15; PROTOCOL_ERROR 46.34 /go/pkg/mod/google.golang.org/grpc@v1.66.0/trace_withtrace.go:26:2: golang.org/x/net@v0.28.0: Get "https://proxy.golang.org/golang.org/x/net/@v/v0.28.0.mod": stream error: stream ID 33; PROTOCOL_ERROR 46.34 /go/pkg/mod/google.golang.org/grpc@v1.66.0/internal/transport/controlbuf.go:31:2: golang.org/x/net@v0.28.0: Get "https://proxy.golang.org/golang.org/x/net/@v/v0.28.0.mod": stream error: stream ID 33; PROTOCOL_ERROR 46.34 /go/pkg/mod/google.golang.org/grpc@v1.66.0/internal/transport/controlbuf.go:32:2: golang.org/x/net@v0.28.0: Get "https://proxy.golang.org/golang.org/x/net/@v/v0.28.0.mod": stream error: stream ID 33; PROTOCOL_ERROR 46.34 /go/pkg/mod/github.com/quic-go/quic-go@v0.46.0/internal/protocol/version.go:10:2: golang.org/x/exp@v0.0.0-20240531132922-fd00a4e0eefc: Get "https://proxy.golang.org/golang.org/x/exp/@v/v0.0.0-20240531132922-fd00a4e0eefc.zip": stream error: stream ID 71; PROTOCOL_ERROR 46.34 /go/pkg/mod/github.com/quic-go/quic-go@v0.46.0/sys_conn_oob.go:18:2: golang.org/x/net@v0.28.0: Get "https://proxy.golang.org/golang.org/x/net/@v/v0.28.0.mod": stream error: stream ID 33; PROTOCOL_ERROR 46.34 /go/pkg/mod/github.com/quic-go/quic-go@v0.46.0/sys_conn_oob.go:19:2: golang.org/x/net@v0.28.0: Get "https://proxy.golang.org/golang.org/x/net/@v/v0.28.0.mod": stream error: stream ID 33; PROTOCOL_ERROR 46.34 common/protocol/dns/io.go:11:2: golang.org/x/net@v0.28.0: Get "https://proxy.golang.org/golang.org/x/net/@v/v0.28.0.mod": stream error: stream ID 33; PROTOCOL_ERROR 46.34 /go/pkg/mod/github.com/refraction-networking/utls@v1.6.7/u_ech.go:11:2: github.com/cloudflare/circl@v1.4.0: Get "https://proxy.golang.org/github.com/cloudflare/circl/@v/v1.4.0.mod": stream error: stream ID 97; PROTOCOL_ERROR 46.34 /go/pkg/mod/github.com/refraction-networking/utls@v1.6.7/cfkem.go:27:2: github.com/cloudflare/circl@v1.4.0: Get "https://proxy.golang.org/github.com/cloudflare/circl/@v/v1.4.0.mod": stream error: stream ID 97; PROTOCOL_ERROR 46.34 /go/pkg/mod/github.com/refraction-networking/utls@v1.6.7/cfkem.go:28:2: github.com/cloudflare/circl@v1.4.0: Get "https://proxy.golang.org/github.com/cloudflare/circl/@v/v1.4.0.mod": stream error: stream ID 97; PROTOCOL_ERROR 46.34 /go/pkg/mod/github.com/refraction-networking/utls@v1.6.7/auth.go:19:2: github.com/cloudflare/circl@v1.4.0: Get "https://proxy.golang.org/github.com/cloudflare/circl/@v/v1.4.0.mod": stream error: stream ID 97; PROTOCOL_ERROR 46.34 /go/pkg/mod/github.com/refraction-networking/utls@v1.6.7/auth.go:20:2: github.com/cloudflare/circl@v1.4.0: Get "https://proxy.golang.org/github.com/cloudflare/circl/@v/v1.4.0.mod": stream error: stream ID 97; PROTOCOL_ERROR 46.34 /go/pkg/mod/github.com/refraction-networking/utls@v1.6.7/tls_cf.go:9:2: github.com/cloudflare/circl@v1.4.0: Get "https://proxy.golang.org/github.com/cloudflare/circl/@v/v1.4.0.mod": stream error: stream ID 97; PROTOCOL_ERROR 46.34 app/proxyman/outbound/uot.go:7:2: github.com/sagernet/sing@v0.4.1: Get "https://proxy.golang.org/github.com/sagernet/sing/@v/v0.4.1.mod": stream error: stream ID 15; PROTOCOL_ERROR 46.34 /go/pkg/mod/github.com/sagernet/sing-shadowsocks@v0.2.7/none.go:8:2: github.com/sagernet/sing@v0.4.1: Get "https://proxy.golang.org/github.com/sagernet/sing/@v/v0.4.1.mod": stream error: stream ID 15; PROTOCOL_ERROR 46.34 /go/pkg/mod/github.com/sagernet/sing-shadowsocks@v0.2.7/none.go:9:2: github.com/sagernet/sing@v0.4.1: Get "https://proxy.golang.org/github.com/sagernet/sing/@v/v0.4.1.mod": stream error: stream ID 15; PROTOCOL_ERROR 46.34 /go/pkg/mod/github.com/sagernet/sing-shadowsocks@v0.2.7/shadowsocks.go:8:2: github.com/sagernet/sing@v0.4.1: Get "https://proxy.golang.org/github.com/sagernet/sing/@v/v0.4.1.mod": stream error: stream ID 15; PROTOCOL_ERROR 46.34 /go/pkg/mod/github.com/sagernet/sing-shadowsocks@v0.2.7/shadowsocks.go:9:2: github.com/sagernet/sing@v0.4.1: Get "https://proxy.golang.org/github.com/sagernet/sing/@v/v0.4.1.mod": stream error: stream ID 15; PROTOCOL_ERROR 46.34 /go/pkg/mod/github.com/sagernet/sing-shadowsocks@v0.2.7/none.go:10:2: github.com/sagernet/sing@v0.4.1: Get "https://proxy.golang.org/github.com/sagernet/sing/@v/v0.4.1.mod": stream error: stream ID 15; PROTOCOL_ERROR 46.34 /go/pkg/mod/github.com/sagernet/sing-shadowsocks@v0.2.7/none.go:11:2: github.com/sagernet/sing@v0.4.1: Get "https://proxy.golang.org/github.com/sagernet/sing/@v/v0.4.1.mod": stream error: stream ID 15; PROTOCOL_ERROR 46.34 /go/pkg/mod/github.com/sagernet/sing-shadowsocks@v0.2.7/none.go:12:2: github.com/sagernet/sing@v0.4.1: Get "https://proxy.golang.org/github.com/sagernet/sing/@v/v0.4.1.mod": stream error: stream ID 15; PROTOCOL_ERROR 46.34 /go/pkg/mod/github.com/sagernet/sing-shadowsocks@v0.2.7/shadowaead/service_multi.go:11:2: github.com/sagernet/sing@v0.4.1: Get "https://proxy.golang.org/github.com/sagernet/sing/@v/v0.4.1.mod": stream error: stream ID 15; PROTOCOL_ERROR 46.34 /go/pkg/mod/github.com/sagernet/sing-shadowsocks@v0.2.7/shadowaead/protocol.go:15:2: github.com/sagernet/sing@v0.4.1: Get "https://proxy.golang.org/github.com/sagernet/sing/@v/v0.4.1.mod": stream error: stream ID 15; PROTOCOL_ERROR 46.34 /go/pkg/mod/github.com/sagernet/sing-shadowsocks@v0.2.7/shadowaead_2022/protocol.go:24:2: github.com/sagernet/sing@v0.4.1: Get "https://proxy.golang.org/github.com/sagernet/sing/@v/v0.4.1.mod": stream error: stream ID 15; PROTOCOL_ERROR 46.34 /go/pkg/mod/github.com/sagernet/sing-shadowsocks@v0.2.7/shadowaead_2022/service.go:23:2: github.com/sagernet/sing@v0.4.1: Get "https://proxy.golang.org/github.com/sagernet/sing/@v/v0.4.1.mod": stream error: stream ID 15; PROTOCOL_ERROR 46.34 /go/pkg/mod/github.com/sagernet/sing-shadowsocks@v0.2.7/shadowaead_2022/protocol.go:28:2: github.com/sagernet/sing@v0.4.1: Get "https://proxy.golang.org/github.com/sagernet/sing/@v/v0.4.1.mod": stream error: stream ID 15; PROTOCOL_ERROR 46.34 /go/pkg/mod/github.com/sagernet/sing-shadowsocks@v0.2.7/shadowaead_2022/service.go:27:2: github.com/sagernet/sing@v0.4.1: Get "https://proxy.golang.org/github.com/sagernet/sing/@v/v0.4.1.mod": stream error: stream ID 15; PROTOCOL_ERROR 46.34 common/antireplay/replayfilter.go:7:2: github.com/seiflotfy/cuckoofilter@v0.0.0-20240715131351-a2f2c23f1771: Get "https://proxy.golang.org/github.com/seiflotfy/cuckoofilter/@v/v0.0.0-20240715131351-a2f2c23f1771.mod": stream error: stream ID 87; PROTOCOL_ERROR 46.34 common/antireplay/bloomring.go:6:2: github.com/v2fly/ss-bloomring@v0.0.0-20210312155135-28617310f63e: Get "https://proxy.golang.org/github.com/v2fly/ss-bloomring/@v/v0.0.0-20210312155135-28617310f63e.zip": stream error: stream ID 85; PROTOCOL_ERROR 46.34 common/singbridge/logger.go:6:2: github.com/sagernet/sing@v0.4.1: Get "https://proxy.golang.org/github.com/sagernet/sing/@v/v0.4.1.mod": stream error: stream ID 15; PROTOCOL_ERROR 46.34 transport/internet/http/hub.go:22:2: golang.org/x/net@v0.28.0: Get "https://proxy.golang.org/golang.org/x/net/@v/v0.28.0.mod": stream error: stream ID 33; PROTOCOL_ERROR 46.34 /go/pkg/mod/github.com/quic-go/quic-go@v0.46.0/http3/headers.go:11:2: golang.org/x/net@v0.28.0: Get "https://proxy.golang.org/golang.org/x/net/@v/v0.28.0.mod": stream error: stream ID 33; PROTOCOL_ERROR 46.34 /go/pkg/mod/github.com/quic-go/quic-go@v0.46.0/http3/request_writer.go:16:2: golang.org/x/net@v0.28.0: Get "https://proxy.golang.org/golang.org/x/net/@v/v0.28.0.mod": stream error: stream ID 33; PROTOCOL_ERROR 46.34 infra/conf/serial/loader.go:9:2: github.com/pelletier/go-toml@v1.9.5: Get "https://proxy.golang.org/github.com/pelletier/go-toml/@v/v1.9.5.mod": stream error: stream ID 93; PROTOCOL_ERROR

Reproduction Method

git clone https://github.com/XTLS/Xray-core.git . && \ git checkout v1.8.24 && \ go build -o xray -trimpath -ldflags "-s -w -buildid=" ./main

Built it on golang:1.23-alpine3.20, non-containerised env can easily reproduce this issue as well.

Client config


N/A

Server config


N/A

Client log


N/A

Server log


N/A
DeShuiYu commented 1 month ago
  1. use golang 1.23

    > go version                                                                        6baad79 [6baad79]
    go version go1.23.0 darwin/arm64
  2. fetch xray v1.8.24

    > git clone https://github.com/XTLS/Xray-core.git --branch v1.8.24 xray      
    Cloning into 'xray'...
  3. run compile

    
    > CGO_ENABLED=0 go build -o xray -trimpath -ldflags "-s -w -buildid=" ./main 
  4. that is success

    image
Fangliding commented 1 month ago

Related to dependent downloads, it should be a network issue

samuelhbne commented 1 month ago

Got it through on Github action filally. Hence I can confirmed it was a env related issue. Great thanks for your awesome help team.