Skip to content

[r2cn] 基于 QUIC 协议为 Mega 构建去中心化网络直连 #842

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

Open
genedna opened this issue Feb 10, 2025 · 5 comments
Open

[r2cn] 基于 QUIC 协议为 Mega 构建去中心化网络直连 #842

genedna opened this issue Feb 10, 2025 · 5 comments
Assignees
Labels
decentralized enhancement New feature or request r2cn r2cn-30 rust Pull requests that update Rust code 已认领

Comments

@genedna
Copy link
Member

genedna commented Feb 10, 2025

[任务] 基于 QUIC 协议为 Mega 构建去中心化网络直连

[任务分值] 30 分

[背景描述] 为了减少对中心化 Git 服务的依赖,同时为了提供更加开放自由的开源协作环境,决定使用 QUIC 协议来为 Mega 构建去中心化网络,以支持分布式的仓库分享和消息传递等功能。 QUIC 协议是基于 UDP 的可靠传输协议,具有低延迟和高安全的特点,是 HTTP/3 的底层协议。 Mega 将基于 QUIC 协议,并采用 RelayClient 的模型来构建去中心化网络, Client 就是本地的 Mega 服务,Client 之间可以通过 Relay 进行通信,在条件允许的情况下,实现 Client 直连的功能,以减少 Relay 的网络负担。

[需求描述] 使用 quinn 库来实现 Client 直连的功能:

  1. 判断当前网络环境是否支持直连(可以通过 Relay 帮忙);
  2. 如果条件允许,使用 quinn 库打通双方的网络,并获得到 Connection
  3. 如果直连失败,再切换至 Relay 模式;
  4. 编写测试用例对基本功能进行测试;
  5. 编写文档对架构设计进行说明;
  6. 更新网站的功能模块;

[代码标准]

  1. 所有 PR 提交必须签署 Signed-off-by 和 使用 GPG 签名,即提交代码时(使用 git commit 命令时)至少使用 -s -S 两个参数,参考 Contributing Guide
  2. 所有 PR 提交必须通过 GitHub Actions 自动化测试,提交 PR 后请关注 GitHub Actions 结果;
  3. 代码注释均需要使用英文;

[PR 提交地址] 提交到 mega 仓库的 main 分支 `` 目录;

[开发指导]

  1. 认领任务参考 r2cn 开源实习计划 - 任务认领与确认;

[导师及邮箱] 请申请此题目的同学使用邮件联系导师,或加入到 R2CN Discord 后在 #p-meta 频道和导师交流。

  1. Quanyi Ma [email protected]
  2. Tianxing Ye [email protected]

[备注]

  1. 认领实习任务的同学,必须完成测试任务和注册流程,请参考: r2cn 开源实习计划 - 测试任务r2cn 开源实习计划 - 学生注册与审核
Copy link

r2cn-bot bot commented Feb 10, 2025

任务创建成功。

@genedna genedna added this to Mega and r2cn Feb 10, 2025
@genedna genedna moved this to Backlog in Mega Feb 10, 2025
@genedna genedna moved this to Backlog in r2cn Feb 10, 2025
@genedna genedna added rust Pull requests that update Rust code 未认领 labels Feb 10, 2025
@genedna genedna moved this from Backlog to Ready in Mega Feb 15, 2025
@web3infra-foundation web3infra-foundation deleted a comment from r2cn-bot bot Mar 10, 2025
@web3infra-foundation web3infra-foundation deleted a comment from r2cn-bot bot Mar 10, 2025
@web3infra-foundation web3infra-foundation deleted a comment from r2cn-bot bot Mar 10, 2025
@web3infra-foundation web3infra-foundation deleted a comment from r2cn-bot bot Mar 10, 2025
@web3infra-foundation web3infra-foundation deleted a comment from r2cn-bot bot Mar 10, 2025
@web3infra-foundation web3infra-foundation deleted a comment from r2cn-bot bot Mar 10, 2025
@wujian0327
Copy link
Contributor

/request-assign

Copy link

r2cn-bot bot commented May 7, 2025

认领成功:等待导师审核,请及时联系导师进行审核。

@genedna
Copy link
Member Author

genedna commented May 7, 2025

/intern-approve

Copy link

r2cn-bot bot commented May 7, 2025

认领审核成功:已将该任务分配给学生。

@genedna genedna removed the 未认领 label May 24, 2025
@genedna genedna moved this from Ready to In progress in Mega May 31, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
decentralized enhancement New feature or request r2cn r2cn-30 rust Pull requests that update Rust code 已认领
Projects
Status: In progress
Status: Backlog
Development

No branches or pull requests

2 participants