HelloZeroNet / HelloZeroNet/ZeroNet

Update ZeroBundle while updating from UI

未关闭
#2,264 14 条评论 0 个 reaction 已指派 0 人 在 GitHub 查看

还没有人认领这个 Issue。

主要语言
JavaScript
星标
18.8k
派生
2.3k
PR 合并指标
30 天内没有已合并 PR

描述

Is your feature request related to a problem? Please describe.

Currently, if you update ZeroNet from UI, the only thing that will change is ZeroNet source code. While this is OK if you use ZeroNet directly from source code, it is not in case if you use ZeroBundle as ZeroBundle files will stay the same.

This creates some problems:

  • One is already my DNS plugin with custom dependencies. In case of such a plugin, all users would have to manually update ZeroBundle with new dependencies to use it. Although I fixed this with bundling dependencies along with plugin's code, this isn't the best solution.

  • Another problem would be in case if there is some critical bug or security issue with distributed Python version or dependencies bundled in ZeroBundle. In case of this, all users would have to manually update ZeroBundle to fix this bug.

  • Additional problem which was already fixed was updating from Python 2. Because ZeroNet 0.7.0 required Python 3, the only way to update it was by manually updating ZeroBundle. If updating would be implemented in a better way, ZeroBundle would change to Python 3 automatically.

Describe the solution you'd like

Instead, you should be also updating ZeroBundle files while updating from UI. You should also change how updates work internally.

  • On the ZeroUpdate site (or whatever it is called), there should be one JSON file which would contain all metadata about the latest release (version, revision, description, changelog, type of changes, type of update...). ZeroNet should use that file to check if an update is available and also display details, description and changelog to users. It would be good to also store details of all previous releases.

  • That site should also host ZIP files which actual update. One of the files should contain classic source code and others should be for ZeroBundle for specific platforms.

  • Before updating, ZeroNet should check if a release you want to install (and any release newer than your current release) contains changes to ZeroBundle. If it doesn't, it should simply download source code ZIP file and install it as currently. But if the release contains changes to ZeroBundle (new dependencies, new Python version...), it should also download and install ZeroBundle ZIP file with updated dependencies/Python.

  • For additional security, all files should be cryptographically signed. By default, it should only trust official ZeroNet key, but it should be possible to also trust different keys or completely disable verification and change ZeroUpdate site address. This would be useful if you want to create custom ZeroNet installation with your own updated.

One of already built Python packages for updating is PyUpdater . I haven't checked it too much but it also provides a plugin for additional storage locations so it should be possible to store updates on ZeroNet site. But I haven't checked it too much so I don't know if it might be easier to just create update system yourself.

贡献指南

这个仓库没有索引到贡献指南

从这里开始

  1. 先读完整个 Issue,再读项目的贡献指南。
  2. 在 Issue 下留言说明你要接手 —— 这能避免两个人做同样的事。
  3. Fork 仓库,在一个分支上完成修改。
  4. 提交 Pull Request,并在描述里引用这个 Issue 编号。

调研方向

该 issue 未指定文件、测试或入口点。首先跟踪当前的 UI 更新路径,并评估提议的 ZeroUpdate 元数据、release ZIP、ZeroBundle 处理方式以及签名要求。要视为完成,需要有一份达成共识的设计,以及能够安全更新 source 和平台特定 bundle 的实现。

由索引模型根据 Issue 内容生成。

评估

技术栈
python
领域
release, security
Issue 类型
功能
难度
5/5
预计耗时
一周以上
活跃度
停滞
描述清晰度
需要澄清
新手友好度
20/100

把新 issue 发到你的邮箱

精选适合新手参与的 GitHub issue 摘要。