feat: 完整实现 Shadowsocks 客户端与服务端协议支持 - #50
Merged
Merged
Conversation
Base automatically changed from
codex/protocol-snell-full
to
codex/protocol-ssh-full
July 27, 2026 07:59
MiChongs
force-pushed
the
codex/protocol-ssh-full
branch
from
July 27, 2026 09:24
a052dbe to
9e33989
Compare
MiChongs
force-pushed
the
codex/protocol-shadowsocks-full
branch
from
July 27, 2026 09:34
2365c96 to
e57bfc7
Compare
MiChongs
marked this pull request as ready for review
July 27, 2026 09:35
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.
背景与目标
现有 Shadowsocks 出站仅维护少量自实现加密路径,缺少完整算法覆盖、标准 Shadowsocks 2022 行为、服务端入口、严格配置注册和双向互操作保证。本次变更以官方
shadowsocks-rust为唯一协议与密码学实现来源,完整补齐客户端、服务端、TCP、UDP、SIP003 插件和 SIP022 EIH 多用户能力,避免继续维护不完整的自定义帧与加密实现。依赖与工具链
shadowsocks 1.24.0。rust-version从 1.85 提升到 1.88;现有持续集成和发布流程继续使用满足要求的稳定工具链。客户端实现
ss2022协议标识和既有注册错误契约。服务端实现
配置与注册
listen.shadowsocks和别名listen.ss均支持单对象或数组,并严格注册以下字段:enabledaddress与hostportmethodpasswordmodepluginplugin-opts与plugin_optsplugin-args与plugin_argsplugin-mode与plugin_modeplugin-startup-timeout与plugin_startup_timeoutusershandshake-timeout与handshake_timeoutudp-timeout与udp_timeoutmax-connections与max_connectionsmax-udp-associations与max_udp_associationstag配置编译阶段会拒绝未知字段、不支持的算法、无效或长度错误的 2022 密钥、非 2022 算法上的 EIH 用户、空或重复用户名、非法模式、零超时或零上限、缺失插件主体的插件选项、插件与监听载体不一致、重复标签,以及按传输层区分的监听地址冲突。
运行时与资源管理
文档
验证结果
已执行并通过:
cargo search shadowsocks --limit 1,确认当前最新版本为 1.24.0。cargo info shadowsocks@1.24.0,确认依赖最低 Rust 版本为 1.88。cargo check --workspace --all-targets --locked。cargo test --workspace --all-targets --locked;全部可运行测试通过,依赖外部官方 Xray 二进制的既有测试按原条件忽略。cargo doc --workspace --no-deps --locked。兼容性与审阅说明
codex/protocol-snell-full,用于保持协议实现按独立分支顺序叠加;审阅时可直接查看该基线之后的唯一提交。