{"id":15212104,"url":"https://github.com/sumingcheng/ipfs-desktop","last_synced_at":"2026-03-08T18:33:07.149Z","repository":{"id":263223476,"uuid":"832059986","full_name":"sumingcheng/ipfs-desktop","owner":"sumingcheng","description":"IPFS Desktop Enhanced Edition ","archived":false,"fork":false,"pushed_at":"2024-07-24T13:11:32.000Z","size":45674,"stargazers_count":0,"open_issues_count":0,"forks_count":0,"subscribers_count":1,"default_branch":"main","last_synced_at":"2025-01-27T00:33:33.740Z","etag":null,"topics":["desktop","intranet","ipfs"],"latest_commit_sha":null,"homepage":"","language":"TypeScript","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/sumingcheng.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null}},"created_at":"2024-07-22T09:19:15.000Z","updated_at":"2024-11-11T01:32:06.000Z","dependencies_parsed_at":"2024-11-22T08:31:54.904Z","dependency_job_id":null,"html_url":"https://github.com/sumingcheng/ipfs-desktop","commit_stats":{"total_commits":14,"total_committers":1,"mean_commits":14.0,"dds":0.0,"last_synced_commit":"60e3b8aa01a7909c538af13db523f0442d7c503f"},"previous_names":["sumingcheng/ipfs-desktop"],"tags_count":0,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/sumingcheng%2Fipfs-desktop","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/sumingcheng%2Fipfs-desktop/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/sumingcheng%2Fipfs-desktop/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/sumingcheng%2Fipfs-desktop/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/sumingcheng","download_url":"https://codeload.github.com/sumingcheng/ipfs-desktop/tar.gz/refs/heads/main","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":243006822,"owners_count":20220729,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["desktop","intranet","ipfs"],"created_at":"2024-09-28T09:01:05.554Z","updated_at":"2026-03-08T18:33:02.119Z","avatar_url":"https://github.com/sumingcheng.png","language":"TypeScript","funding_links":[],"categories":[],"sub_categories":[],"readme":"# IPFS Desktop Enhanced Edition\n\u003cdiv align=\"center\"\u003e\n  \u003ca href=\"https://github.com/sumingcheng/ipfs-desktop/blob/main/README_EN.md\"\u003e英文文档\u003c/a\u003e | \u003ca href=\"https://github.com/sumingcheng/ipfs-desktop/blob/main/README.md\"\u003e中文文档\u003c/a\u003e\n\u003c/div\u003e\n\n------\n\nIPFS Desktop Enhanced Edition 是对官方 IPFS Desktop 的一个增强版本，重构了之前的客户端，特别添加了内网部署支持、`swarm.key` 配置和自动配置生成功能。此版本旨在提供更加灵活和安全的 IPFS 网络配置选项，适用于需要在私网中运行的场景。\n\n## 主要特性\n\n**内网部署支持**：允许用户在内部网络中独立运行 IPFS，无需连接外部公共 IPFS 网络。\n\n**`swarm.key` 支持**：通过 `swarm.key` 实现网络的私有化，增加数据传输的安全性。\n\n**自动生成配置**：简化用户配置流程，自动创建必需的配置文件，配置文件目录`src/lib/ipfs`。\n\n## 架构图\n\n![image](https://github.com/user-attachments/assets/8685e608-6d9e-4824-ada0-77adcb49bdae)\n\n\n## 系统要求\n\n- **操作系统**：Windows, macOS, Linux\n- **Node.js**：建议使用 v18.16.1 或更高版本，最低支持 v16.20.2\n- **Electron**：v26.2.1\n\n## 本地开发\n\n**克隆仓库**\n\n```bash\ngit clone https://github.com/sumingcheng/ipfs-desktop.git\ncd ipfs-desktop\n```\n\n**安装依赖**\n\n```bash\nyarn\n```\n\n**构建应用**\n\n```bash\nnpm run package\n```\n\n**运行应用**\n\n```bash\nnpm start\n```\n\n## 配置与构建\n\n运行 IPFS Desktop Enhanced Edition 后，应用将自动在指定目录生成 `swarm.key` 和配置文件，并启动一个独立的 IPFS 节点。\n\n### 生成 `swarm.key`\n\n**选择密钥生成工具**\n\n通常使用一个名为 `go-ipfs-swarm-key-gen` 的工具来生成这个文件。这是一个简单的 Go 程序，可以生成适用于 IPFS 私有网络的 `swarm.key` 文件。这里我使用的是`win10`，Linux上基本也是这个流程。\n\n**安装密钥生成工具**\n\n如果您已经安装了 Go 语言环境，可以直接使用 `go get` 命令安装此工具\n\n```\ngo get -u github.com/Kubuxu/go-ipfs-swarm-key-gen/ipfs-swarm-key-gen\n```\n\n**生成 `swarm.key` 文件**\n\n使用 `ipfs-swarm-key-gen` 工具生成 `swarm.key` 文件\n\n```\nipfs-swarm-key-gen \u003e swarm.key\n```\n\n命令会生成一个 `swarm.key` 文件，并将其保存到当前目录下。通过这种方式，您可以创建一个只有知道密钥的节点能够互相通信的 IPFS 私有网络，有效提高网络的安全性和隐私。**生成内容如下**。生成的文件覆盖`src/lib/ipfs/swarm.key`文件\n\n```\n/key/swarm/psk/1.0.0/\n/base16/\na884f23b1b210dbd5d93da695eca9c1b29658c3e199be870feb1e2991cc9306d\n```\n\n### 更新 IPFS 配置文件\n\n进入项目`src/lib/ipfs/afterInstall.ts`找到`updateConfigFile`函数\n\n```js\nfunction updateConfigFile(ipfsPath: string): void {\n  try {\n    const configPath = path.join\n    (ipfsPath, 'config');\n    if (fs.existsSync(configPath)) {\n      const config = JSON.parse(fs.readFileSync(configPath, 'utf8'));\n      // 更新 Bootstrap 节点列表\n      config.Bootstrap = ['修改为你的节点'];\n      config.Routing.Type = 'dhtclient';\n\n      fs.writeFileSync(configPath, JSON.stringify(config, null, 2));\n      successLog('Config file updated successfully');\n    } else {\n      errorLog('Config file not found');\n    }\n  } catch (error) {\n    errorLog(`Error updating config file: ${error}`);\n  }\n}\n```\n\n找到`swarmKeyContent`\n\n```js\n// 主函数\nfunction main(): void {\n  const ipfsPath = getIpfsPath();\n\n// 初始化 IPFS 如果尚未初始化\n  if (!fs.existsSync(ipfsPath)) {\n    initIpfs(ipfsPath);\n  }\n\n  // 创建或更新 swarm.key 文件\n  const swarmKeyContent = '修改为你的 swarm.key';\n  createOrUpdateSwarmKey(ipfsPath, swarmKeyContent);\n\n// 更新 IPFS 配置文件\n  updateConfigFile(ipfsPath);\n}\n```\n\n完成以上操作，重新打包你想要的客户端版本，该版本就可以直接在私网使用了。\n\n## 自定义 UI\n\n你可以通过修改[ipfs-webui](https://github.com/ipfs/ipfs-webui)这个项目，将打包后的产物放入`assets/webui`文件夹内，重新构建既可\n\n## 如何贡献\n\n欢迎所有形式的贡献，包括但不限于新功能开发、bug 修复和文档更新。请遵循以下步骤贡献\n\n1. Fork 仓库并创建您的分支：`git checkout -b my-new-feature`\n2. 提交您的更改：`git commit -am 'Add some feature'`\n3. 推送到分支：`git push origin my-new-feature`\n4. 提交 Pull Request\n\n## 许可证\n\n本项目使用 [MIT 许可证](LICENSE)。使用前请确保您已阅读并接受其条款。\n\n## 支持和问题\n\n如果您在使用过程中遇到问题，欢迎通过 GitHub Issues 提交您的问题。\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fsumingcheng%2Fipfs-desktop","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fsumingcheng%2Fipfs-desktop","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fsumingcheng%2Fipfs-desktop/lists"}