让最新版xray-core支持在Windows7下运行的方法,还在用老系统的可以试试。 #3373
Replies: 4 comments 6 replies
-
"Please don't be ambiguous. There are still people using Windows 7. You can refuse feedback about Windows 7, and you don't have to release compatible versions. But please don't prevent other users from finding ways to continue supporting Windows 7." |
Beta Was this translation helpful? Give feedback.
-
Please refer to the update log of the Go programming language for details. Use at your own risk, as this project will not accept issue reports related to compiling using this method. |
Beta Was this translation helpful? Give feedback.
-
//go:build go1.22
package xx
// ... //go:build !go1.22
package xx
// ... How about we use multiple files for different version of golang? |
Beta Was this translation helpful? Give feedback.
-
使用go1.21.4编译,Windows7也可以运行,无需修改代码。
只需修改go.mod,把开头的go 1.22改成go1.21。
然后使用以下命令更新go.mod:
go mod tidy
最后正常编译即可:
go build -o xray.exe -trimpath -ldflags "-s -w -buildid=" ./main
Beta Was this translation helpful? Give feedback.
All reactions