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出现的问题的解答 #2852

Closed
KFERMercer opened this issue Jan 24, 2020 · 24 comments
Closed

关于近日V2ray出现的问题的解答 #2852

KFERMercer opened this issue Jan 24, 2020 · 24 comments

Comments

@KFERMercer
Copy link
Contributor

KFERMercer commented Jan 24, 2020

如果需要upx, 请一定确保upx版本在3.95以上

根据大家的反馈主要有两个问题: ①编译失败. ②编译成功后不能运行.

在解答之前, 需要说明的是, upx选项是为了把v2ray放入低内存 (flash) 设备. 如果你的设备内存宽裕, 则无需开启.

  • 关于大家遇到的编译失败:
    近期出现的编译失败是upx版本过低引起的. 自行升级upx到3.95+版本即可.

  • 关于大家遇到的编译成功后不能运行:
    在我的x86_64设备上测试发现, 无论开不开启upx, 编译出的v2ray都可以正常运行.
    !!! 3.95以下的upx压缩会破坏v2ray文件导致不能运行 !!!
    近期功夫网大规模封禁VPS, 请查看自己的在不在此列.

这里有一个用最新代码开启upx编译好的v2ray软件包, 可以正常使用:
v2ray_4.22.1-7_x86_64.ipk.zip

正常运行截图:

image
image

@KFERMercer
Copy link
Contributor Author

KFERMercer commented Jan 24, 2020

另外有人反馈某些配置的v2ray代理只在路由器上运行时无法访问外网, 这个是SSR++的问题, 和v2ray核心无关. @luckyyyyy

@tcsr200722
Copy link

ovo/lede/staging_dir/target-x86_64_musl/root-x86/'
touch /home/lenovo/lede/staging_dir/target-x86_64_musl/root-x86/stamp/.trojan_installed
echo "trojan" >> /home/lenovo/lede/staging_dir/target-x86_64_musl/pkginfo/trojan.default.install
make[3]: Leaving directory '/home/lenovo/lede/package/lean/trojan'
time: package/lean/trojan/compile#0.14#0.05#0.23
make[3]: Entering directory '/home/lenovo/lede/package/lean/v2ray'
rm -f /home/lenovo/lede/build_dir/target-x86_64_musl/v2ray-core-4.22.1/.built
touch /home/lenovo/lede/build_dir/target-x86_64_musl/v2ray-core-4.22.1/.built_check
( cd /home/lenovo/lede/build_dir/target-x86_64_musl/v2ray-core-4.22.1/.go_work/build ; export GOPATH=/home/lenovo/lede/build_dir/target-x86_64_musl/v2ray-core-4.22.1/.go_work/build GOCACHE=/home/lenovo/lede/build_dir/target-x86_64_musl/v2ray-core-4.22.1/.go_work/cache GOTMPDIR=/home/lenovo/lede/build_dir/target-x86_64_musl/v2ray-core-4.22.1/.go_work/tmp GOROOT_FINAL=/usr/lib/go-1.13 CC=x86_64-openwrt-linux-musl-gcc CXX=x86_64-openwrt-linux-musl-g++ GOOS=linux GOARCH=amd64 GO386=387 GOARM= GOMIPS= GOMIPS64= CGO_ENABLED=1 CGO_CFLAGS="-Os -pipe -fno-caller-saves -fno-plt -fhonour-copts -Wno-error=unused-but-set-variable -Wno-error=unused-result -iremap/home/lenovo/lede/build_dir/target-x86_64_musl/v2ray-core-4.22.1:v2ray-core-4.22.1 -Wformat -Werror=format-security -fstack-protector -D_FORTIFY_SOURCE=1 -Wl,-z,now -Wl,-z,relro" CGO_CPPFLAGS="-I/home/lenovo/lede/staging_dir/target-x86_64_musl/usr/include -I/home/lenovo/lede/staging_dir/target-x86_64_musl/include -I/home/lenovo/lede/staging_dir/toolchain-x86_64_gcc-7.5.0_musl/usr/include -I/home/lenovo/lede/staging_dir/toolchain-x86_64_gcc-7.5.0_musl/include/fortify -I/home/lenovo/lede/staging_dir/toolchain-x86_64_gcc-7.5.0_musl/include" CGO_CXXFLAGS="-Os -pipe -fno-caller-saves -fno-plt -fhonour-copts -Wno-error=unused-but-set-variable -Wno-error=unused-result -iremap/home/lenovo/lede/build_dir/target-x86_64_musl/v2ray-core-4.22.1:v2ray-core-4.22.1 -Wformat -Werror=format-security -fstack-protector -D_FORTIFY_SOURCE=1 -Wl,-z,now -Wl,-z,relro" ; echo "Finding targets" ; targets=$(go list v2ray.com/core/main) ; for pattern in ; do targets=$(echo "$targets" | grep -v "$pattern") ; done ; echo ; if [ "" = 1 ]; then echo "Calling go generate" ; go generate -v $targets ; echo ; fi ; if [ "" != 1 ]; then echo "Building targets" ; case amd64 in arm) installsuffix="v" ;; mips|mipsle) installsuffix="" ;; mips64|mips64le) installsuffix="" ;; esac ; ldflags="-linkmode external -extldflags '-L/home/lenovo/lede/staging_dir/target-x86_64_musl/usr/lib -L/home/lenovo/lede/staging_dir/target-x86_64_musl/lib -L/home/lenovo/lede/staging_dir/toolchain-x86_64_gcc-7.5.0_musl/usr/lib -L/home/lenovo/lede/staging_dir/toolchain-x86_64_gcc-7.5.0_musl/lib -Wl,-z,now -Wl,-z,relro'" ; pkg_gcflags="" ; pkg_ldflags="-s -w" ; for def in v2ray.com/core.version=4.22.1 v2ray.com/core.build=R5 v2ray.com/core.codename=OpenWrt; do pkg_ldflags="$pkg_ldflags -X $def" ; done ; go install ${installsuffix:+-installsuffix $installsuffix} -trimpath -ldflags "all=$ldflags" -v ${pkg_gcflags:+-gcflags "$pkg_gcflags"} ${pkg_ldflags:+-ldflags "$pkg_ldflags $ldflags"} $targets ; retval=$? ; echo ; if [ "$retval" -eq 0 ] && [ -z "$(find /home/lenovo/lede/build_dir/target-x86_64_musl/v2ray-core-4.22.1/.go_work/build/bin -maxdepth 0 -type d ! -empty 2>/dev/null)" ]; then echo "No binaries were generated, consider adding GO_PKG_SOURCE_ONLY:=1 to Makefile" ; echo ; fi ; echo "Cleaning module download cache (golang/go#27455)" ; go clean -modcache ; echo ; fi ; exit $retval ; )
Finding targets
go: downloading github.com/golang/protobuf v1.3.2
go: downloading golang.org/x/crypto v0.0.0-20190308221718-c2843e01d9a2
go: extracting github.com/golang/protobuf v1.3.2
go: extracting golang.org/x/crypto v0.0.0-20190308221718-c2843e01d9a2
go: downloading go.starlark.net v0.0.0-20190919145610-979af19b165c
go: downloading golang.org/x/net v0.0.0-20190311183353-d8887717615a
go: downloading google.golang.org/grpc v1.24.0
go: extracting go.starlark.net v0.0.0-20190919145610-979af19b165c
go: downloading golang.org/x/sys v0.0.0-20190215142949-d0b11bdaac8a
go: extracting golang.org/x/net v0.0.0-20190311183353-d8887717615a
go: extracting google.golang.org/grpc v1.24.0
go: downloading github.com/gorilla/websocket v1.4.1
go: extracting golang.org/x/sys v0.0.0-20190215142949-d0b11bdaac8a
go: extracting github.com/gorilla/websocket v1.4.1
go: downloading google.golang.org/genproto v0.0.0-20180831171423-11092d34479b
go: downloading golang.org/x/text v0.3.0
go: downloading github.com/refraction-networking/utls v0.0.0-20190909200633-43c36d3c1f57
go: extracting google.golang.org/genproto v0.0.0-20180831171423-11092d34479b
go: extracting github.com/refraction-networking/utls v0.0.0-20190909200633-43c36d3c1f57
go: extracting golang.org/x/text v0.3.0
go: finding github.com/golang/protobuf v1.3.2
go: finding google.golang.org/grpc v1.24.0
go: finding golang.org/x/net v0.0.0-20190311183353-d8887717615a
go: finding golang.org/x/sys v0.0.0-20190215142949-d0b11bdaac8a
go: finding go.starlark.net v0.0.0-20190919145610-979af19b165c
go: finding google.golang.org/genproto v0.0.0-20180831171423-11092d34479b
go: finding github.com/refraction-networking/utls v0.0.0-20190909200633-43c36d3c1f57
go: finding golang.org/x/crypto v0.0.0-20190308221718-c2843e01d9a2
go: finding golang.org/x/text v0.3.0
go: finding github.com/gorilla/websocket v1.4.1

Building targets

Cleaning module download cache (golang/go#27455)

mv -f /home/lenovo/lede/build_dir/target-x86_64_musl/v2ray-core-4.22.1/.go_work/build/bin/main /home/lenovo/lede/build_dir/target-x86_64_musl/v2ray-core-4.22.1/.go_work/build/bin/v2ray
upx --lzma --best /home/lenovo/lede/build_dir/target-x86_64_musl/v2ray-core-4.22.1/.go_work/build/bin/v2ray
Ultimate Packer for eXecutables
Copyright (C) 1996 - 2013
UPX 3.91 Markus Oberhumer, Laszlo Molnar & John Reiser Sep 30th 2013

    File size         Ratio      Format      Name

v2ray 4/8 [***************************************************.] 28.5% | Makefile:303: recipe for target '/home/lenovo/lede/build_dir/target-x86_64_musl/v2ray-core-4.22.1/.built' failed
make[3]: *** [/home/lenovo/lede/build_dir/target-x86_64_musl/v2ray-core-4.22.1/.built] Segmentation fault
make[3]: Leaving directory '/home/lenovo/lede/package/lean/v2ray'
time: package/lean/v2ray/compile#20.57#2.47#51.62
package/Makefile:107: recipe for target 'package/lean/v2ray/compile' failed
make[2]: *** [package/lean/v2ray/compile] Error 2
make[2]: Leaving directory '/home/lenovo/lede'
package/Makefile:103: recipe for target '/home/lenovo/lede/staging_dir/target-x86_64_musl/stamp/.package_compile' failed
make[1]: *** [/home/lenovo/lede/staging_dir/target-x86_64_musl/stamp/.package_compile] Error 2
make[1]: Leaving directory '/home/lenovo/lede'
/home/lenovo/lede/include/toplevel.mk:216: recipe for target 'world' failed
make: *** [world] Error 2

@blizzardster
Copy link

过了,现在卡这里
go: downloading golang.org/x/sys v0.0.0-20190215142949-d0b11bdaac8a
go: downloading github.com/gorilla/websocket v1.4.1
go: extracting github.com/gorilla/websocket v1.4.1
go: downloading google.golang.org/genproto v0.0.0-20180831171423-11092d34479b
go: downloading golang.org/x/text v0.3.0
go: extracting golang.org/x/sys v0.0.0-20190215142949-d0b11bdaac8a

@coolsnowwolf
Copy link
Owner

问题找到了:

你们的 UPX 版本过低,请升级到 UPX 3.95 以上版本

https://github.com/upx/upx/releases

@ghost
Copy link

ghost commented Jan 24, 2020

整个docker编译环境得了

@coolsnowwolf coolsnowwolf pinned this issue Jan 24, 2020
@coolsnowwolf
Copy link
Owner

image

@blizzardster
Copy link

根据大家的反馈, 现在主要是两个问题: 编译失败和不能运行.

  • 待编辑

最新消息: 梯子塌了, 推迟更新到初一

是的V2RAY,挂了

@hcym
Copy link

hcym commented Jan 24, 2020

幽默,铁拐李自己瘸腿了,哈哈😄,不过我的也是挂了个,还有三个不瘸

@ghost
Copy link

ghost commented Jan 24, 2020

我白嫖的2个 都没有挂。。

@adminidor
Copy link

v2ray挂了,有剩一台小ji活着。

@segadrive
Copy link

本来就是好好的呀

@demo0102
Copy link

同样的问题,升级upx版本重新编译好了

@coolsnowwolf
Copy link
Owner

所以大家明白为什么提供我预编译的 V2Ray 版本更好了吧?

@z826540272
Copy link
Contributor

所以大家明白为什么提供我预编译的 V2Ray 版本更好了吧?

那为啥还改,好用体积小就行.

@KFERMercer
Copy link
Contributor Author

维护是个灾难

@z826540272
Copy link
Contributor

能不能把v2ray的体积再精简一些,去除用不到的功能,比如SS

@KFERMercer KFERMercer reopened this Jan 25, 2020
@KFERMercer KFERMercer changed the title 关于今天V2ray出现的问题的解答 关于近日V2ray出现的问题的解答 Jan 25, 2020
@xiaobaishu1
Copy link
Contributor

同样的问题,升级upx版本重新编译好了

如何更新?

@rampageX
Copy link

rampageX commented Jan 26, 2020

UPX 如果用 --lzma,bug 最少的还是 3.94

@SouHong
Copy link

SouHong commented Jan 28, 2020

ubuntukylin-16.04-desktop-amd64系统中UPX 版本3.91编译的K3固件可以正常运行。
QQ图片

捕获

@KFERMercer
Copy link
Contributor Author

新版本已经默认把upx关掉了.

@lrz2010
Copy link

lrz2010 commented Jan 28, 2020

新版本已经默认把upx关掉了.

问题已解决

@pirately
Copy link

pirately commented Jan 28, 2020

各位大佬,我的v2ray现在是tcp模式可以,但是mKcp+WechatVideo不行

@unifreq
Copy link

unifreq commented Jan 29, 2020

个人认为低容量闪存的路由器也不需要upx, 因为squashfs本身就是带压缩的了,例如在ar7xxx架构的老路由上压缩率也是很高的。

@AmberisMyShiba
Copy link

新版本已经默认把upx关掉了.

怎么把upx支持打开啊?编译的时候加参数还是改配置文件啊?

@coolsnowwolf coolsnowwolf unpinned this issue Jan 31, 2020
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