shadowsocks / shadowsocks-android

A shadowsocks client for Android
Other
35.06k stars 11.58k forks source link

服务端升级到shadowsocks-rust v1.15.0之后,客户端shadowsocks-android v5.3.1-preview不能使用 #2966

Closed qwerttvv closed 1 year ago

qwerttvv commented 1 year ago

ss用的是chacha20-ietf-poly1305,sip003是cloak,没敢裸连测试。其他不变,之前服务端版本v1.14.3没有使用问题。

另外目前服务端v1.15.0,客户端shadowsocks-rust v1.15.0-alpha.9,其它不变,使用是正常的

madeye commented 1 year ago

It should be a bug in the latest shadowsocks-rust. I saw a segfault of ss-rust on the server after enabling plugin. @zonyitoo

zonyitoo commented 1 year ago

That was strange. How can I reproduce? Could you provide more detail about sslocal? @qwerttvv

I saw a segfault of ss-rust on the server after enabling plugin.

Hmm, please provide more detail about ssserver, too.

v1.15.0 is nearly identical to v1.15.0-alpha.9.

zonyitoo commented 1 year ago

https://github.com/shadowsocks/shadowsocks-rust/actions/runs/3717954160/jobs/6305787076

It probably related to some bugs introduced from the latest nightly Rust. Please change toolchain to stable Rust. shadowsocks-rust is able to be compiled with stable Rust since 1.64.

zonyitoo commented 1 year ago

@dev4u Please remove features armv8 neon and use stable Rust toolchain.

qwerttvv commented 1 year ago

客户端v1.15.0-alpha.9配合服务端v1.14.3或v1.15.0都是可用的…原因未知,我只是编译路由器固件时用了新版客户端……

服务端升级到v1.15.1之后,客户端shadowsocks-android v5.3.1-preview可以使用了

zonyitoo commented 1 year ago

Good. shadowsocks-android should also upgrade the build script. ping @dev4u

Mygod commented 1 year ago

It probably related to some bugs introduced from the latest nightly Rust. Please change toolchain to stable Rust. shadowsocks-rust is able to be compiled with stable Rust since 1.64.

It's about time. 👍

dev4u commented 1 year ago

Good. shadowsocks-android should also upgrade the build script. ping @dev4u

@zonyitoo 不好意思,前几天身体不舒服。我整理一下PR上去。

Mygod commented 1 year ago

@zonyitoo So armv8 neon is removed for now? Do you have a link to the rust stabilization timeline of these features? Not sure why they need to take such a long time to stabilize such a trivial feature.

zonyitoo commented 1 year ago

Tracking Issue: https://github.com/rust-lang/stdarch/pull/1266

Release Note: https://github.com/rust-lang/rust/blob/master/RELEASES.md#version-1590-2022-02-24

Mygod commented 1 year ago

So they would be enabled already? And there had been no reason to build shadowsocks-rust on nightly since this February?

zonyitoo commented 1 year ago

Rust-Crypto's libraries removes armv8 and neon since v0.10: https://github.com/shadowsocks/shadowsocks-crypto/commit/bae4a3701e6110ddf82e77d14142c504f35e982e .

armv8 = ["aes-gcm/armv8", "aes/armv8", "aes-gcm-siv/armv8"]
neon = ["chacha20/neon"]

The ghash crate removes armv8 since this commit: https://github.com/RustCrypto/universal-hashes/commit/636772c754044b6ea02d7874afe304bf86caacf5 .

chacha20 still require neon feature to be set explicitly: https://github.com/RustCrypto/stream-ciphers/commit/6217574ef37fa04fa8b17fb7568ed3d1499b7cee .

aes removes armv8 right after aarch64 intrinsic stablized.

I couldn't remember why we still need nightly after Feb. :(

Mygod commented 1 year ago

Shouldn't the neon flag be kept/enabled then?

zonyitoo commented 1 year ago

Shouldn't the neon flag be kept/enabled then?

Yes, I think we should. NEON is required for standard ARMv8 implementations: https://developer.arm.com/documentation/den0024/a/AArch64-Floating-point-and-NEON .

But why they still kept the neon feature? I should open an issue.

zonyitoo commented 1 year ago

Well, they know: https://github.com/RustCrypto/stream-ciphers/pull/310 . Maybe the only reason is for keeping MSRV unchanged in the current version.

Mygod commented 1 year ago

Great. So let's add it (back) to shadowsocks-crypto?

zonyitoo commented 1 year ago

chacha20 with neon didn't release yet. I will keep my eyes on them.

Mygod commented 1 year ago

Maybe we could send them a friendly reminder. :)

EDIT: Done.