feat(shadowsocks): Shadowsocks-2022 support via the rust server edition#63
Merged
Conversation
…dition shadowsocks-libev does not implement the SS-2022 (SIP022 AEAD-2022) ciphers. shadowsocks-rust's ssmanager speaks the same UDP multi-user Manager API and does, so SS-2022 is a drop-in server-edition swap at the node plus small portal changes. - ServerEditionList: add RUST edition. - ciphers.py: single source of truth for SS-2022 cipher key sizes, PSK generation (Base64 key of the cipher's key size, == `ssservice genkey`), and PSK validation. - SSManager: list SS-2022 ciphers in encrypt help_text; enable the `list` Manager-API command for the rust edition; clean() requires the rust edition for SS-2022 ciphers. - is_port_created: compare server_port as strings -- libev returns it as a string, rust returns it as an integer (found via e2e against the rust ssmanager). - Account.clean(): for accounts assigned to a SS-2022 node, require a valid Base64 PSK of the right key size (clear error instead of a silent server reject). - AccountAdmin: "Generate Shadowsocks-2022 password (PSK)" action. - tests: CiphersTestCase (unit) + SSManagerRust2022TestCase (e2e against the alexzhangs/shadowsocks-rust image, gated on SSM_TEST_SS_MGR_RUST=1). - tox.ini: launch the rust ssmanager container for the test matrix. - README: document the rust edition / SS-2022 setup and the SSEdition deploy param. Pairs with the new alexzhangs/shadowsocks-rust image and the aws-cfn-vpn SSEdition deployment path. Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
Codecov Report❌ Patch coverage is
Additional details and impacted files@@ Coverage Diff @@
## develop #63 +/- ##
===========================================
+ Coverage 93.51% 93.73% +0.21%
===========================================
Files 53 54 +1
Lines 2854 2969 +115
Branches 239 247 +8
===========================================
+ Hits 2669 2783 +114
Misses 115 115
- Partials 70 71 +1 ☔ View full report in Codecov by Harness. 🚀 New features to boost your workflow:
|
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
Adds Shadowsocks-2022 (SIP022 AEAD-2022) support (e.g.
2022-blake3-aes-256-gcm), which shadowsocks-libev does not implement.shadowsocks-rust's
ssmanagerspeaks the same UDP multi-user Manager API as libev'sss-manager, so SS-2022 is a drop-in server-edition swap at the node plus small portal changes — no rewrite of the Django↔node control plane.Changes
ServerEditionList.RUSTserver edition.shadowsocks/ciphers.py: SS-2022 cipher key sizes, PSK generation (Base64 key ==ssservice genkey) and validation.SSManager: list SS-2022 ciphers in help text; enable thelistManager-API command for rust;clean()requires the rust edition for SS-2022 ciphers.is_port_created: compareserver_portas strings — libev returns a string, rust returns an integer (found via e2e).Account.clean(): require a valid Base64 PSK for accounts on SS-2022 nodes (clear error vs. silent server reject).AccountAdmin: "Generate Shadowsocks-2022 password (PSK)" action.CiphersTestCase(unit) +SSManagerRust2022TestCase(e2e against the new alexzhangs/shadowsocks-rust image);tox.inilaunches the rust container.SSEditiondeploy param.Testing
CiphersTestCase+SSManagerRust2022TestCase+SSManagerTestCase(libev regression) all green against real libev + rust ssmanager containers + memcached.Pairs with alexzhangs/shadowsocks-rust and aws-cfn-vpn
SSEdition=rust.🤖 Generated with Claude Code