IDM 平替 Gopeed Flutter 开源免费下载工具

简介: IDM 替代品 Gopeed 是一个开源免费的 Flutter 下载工具,支持 HTTP、BitTorrent、Magnet 等协议。项目采用 getx 进行构建,已获得 13k Star。功能包括多平台下载、自定义下载目录和并发数、代理设置等。它还拥有浏览器扩展和各种下载插件。开发者可以参考代码学习 Flutter 和 getx。项目源码可在 GitHub 上找到,同时提供了编译和配置指南。Gopeed 是一个值得尝试的现代化下载工具,适用于 Flutter 开发者和用户。

IDM 平替 Gopeed Flutter 开源免费下载工具

视频

https://youtu.be/m206G5lVXPM

https://www.bilibili.com/video/BV1Lz421k7Zp/

前言

原文 https://ducafecat.com/blog/flutter-gopeed-downloader-idm-replace

flutter ducafecat gopeed

https://flutter.ducafecat.com/github/repo/GopeedLab/gopeed

出于好奇我把站点排第一位 gopeed 的代码看了下才发现用的 getx ,所以在你质疑 getx 的时候,别人已经项目 star 13k 了。今天会来介绍下这个项目。

Gopeed,一款轻量原生的 Flutter 下载器,支持 HTTP、BitTorrent、Magnet 等协议,提供全平台高速下载体验。

本文将会讲解如何使用 gopeed, 以及项目代码分析讲解。

系统学习 flutter getx 请关注 https://ducafecat.com/course/flutter-woo。

参考

https://flutter.ducafecat.com/github/repo/GopeedLab/gopeed

https://github.com/GopeedLab/gopeed

https://github.com/search?q=topic%3Agopeed-extension&type=repositories

安装

多平台安装

https://github.com/GopeedLab/gopeed/releases/tag/v1.5.6

gopeed/releases/tag/v1.5.6

APP 配置

设置下载目录,并发数量

gopeed 基础设置

可设置代理

proxy

各种下载插件

https://github.com/search?q=topic%3Agopeed-extension&type=repositories

gopeed-extension

gopeed-extension-youtube

浏览器插件

https://chromewebstore.google.com/detail/gopeed/mijpgljlfcapndmchhjffkpckknofcnd

app 设置 API

gopeed api

安全起见可以设置令牌

插件添加服务器设置

gopeed api server

设置完之后,当你页面中点击触发下载后就会启动插件,把任务提交到 gopeed。

gopeed download

代码编译

gopeed 结构

环境

  1. Golang 1.21+
  2. Flutter 3.16+

go server

这里我以 macos 举例

go build -tags nosqlite -ldflags="-w -s" -buildmode=c-shared -o ui/flutter/macos/Frameworks/libgopeed.dylib github.com/GopeedLab/gopeed/bind/desktop

gopeed build

flutter ui

cd ui/flutter
flutter build macos

gopeed flutter build

代码分析

gopeed go server 服务端

go 代码目录

gopeed go

分析包文件 go.mod

module github.com/GopeedLab/gopeed

go 1.21

require (
    github.com/anacrolix/missinggo/v2 v2.7.3
    github.com/anacrolix/torrent v1.53.3
    github.com/armon/go-socks5 v0.0.0-20160902184237-e75332964ef5
    github.com/dop251/goja v0.0.0-20231027120936-b396bb4c349d
    github.com/dop251/goja_nodejs v0.0.0-20231122114759-e84d9a924c5c
    github.com/go-git/go-git/v5 v5.8.1
    github.com/gorilla/handlers v1.5.1
    github.com/gorilla/mux v1.8.0
    github.com/matoous/go-nanoid/v2 v2.0.0
    github.com/pkg/errors v0.9.1
    github.com/rs/zerolog v1.31.0
    github.com/virtuald/go-paniclog v0.0.0-20190812204905-43a7fa316459
    go.etcd.io/bbolt v1.3.8
    golang.org/x/exp v0.0.0-20240119083558-1b970713d09a
    golang.org/x/sync v0.6.0
)

require (
    dario.cat/mergo v1.0.0 // indirect
    github.com/Microsoft/go-winio v0.6.1 // indirect
    github.com/ProtonMail/go-crypto v0.0.0-20230717121422-5aa5874ade95 // indirect
    github.com/RoaringBitmap/roaring v1.7.0 // indirect
    github.com/acomagu/bufpipe v1.0.4 // indirect
    github.com/ajwerner/btree v0.0.0-20211221152037-f427b3e689c0 // indirect
    github.com/alecthomas/atomic v0.1.0-alpha2 // indirect
    github.com/anacrolix/chansync v0.4.0 // indirect
    github.com/anacrolix/dht/v2 v2.21.0 // indirect
    github.com/anacrolix/envpprof v1.3.0 // indirect
    github.com/anacrolix/generics v0.0.0-20230911070922-5dd7545c6b13 // indirect
    github.com/anacrolix/go-libutp v1.3.1 // indirect
    github.com/anacrolix/log v0.14.6-0.20231202035202-ed7a02cad0b4 // indirect
    github.com/anacrolix/missinggo v1.3.0 // indirect
    github.com/anacrolix/missinggo/perf v1.0.0 // indirect
    github.com/anacrolix/mmsg v1.0.0 // indirect
    github.com/anacrolix/multiless v0.3.1-0.20221221005021-2d12701f83f7 // indirect
    github.com/anacrolix/stm v0.5.0 // indirect
    github.com/anacrolix/sync v0.5.1 // indirect
    github.com/anacrolix/upnp v0.1.3 // indirect
    github.com/anacrolix/utp v0.2.0 // indirect
    github.com/bahlo/generic-list-go v0.2.0 // indirect
    github.com/benbjohnson/immutable v0.4.3 // indirect
    github.com/bits-and-blooms/bitset v1.13.0 // indirect
    github.com/bradfitz/iter v0.0.0-20191230175014-e8f45d346db8 // indirect
    github.com/cloudflare/circl v1.3.3 // indirect
    github.com/davecgh/go-spew v1.1.1 // indirect
    github.com/dlclark/regexp2 v1.10.0 // indirect
    github.com/dustin/go-humanize v1.0.1 // indirect
    github.com/edsrzf/mmap-go v1.1.0 // indirect
    github.com/emirpasic/gods v1.18.1 // indirect
    github.com/felixge/httpsnoop v1.0.1 // indirect
    github.com/go-git/gcfg v1.5.1-0.20230307220236-3a3c6141e376 // indirect
    github.com/go-git/go-billy/v5 v5.4.1 // indirect
    github.com/go-llsqlite/adapter v0.1.0 // indirect
    github.com/go-llsqlite/crawshaw v0.5.0 // indirect
    github.com/go-logr/logr v1.4.1 // indirect
    github.com/go-logr/stdr v1.2.2 // indirect
    github.com/go-sourcemap/sourcemap v2.1.3+incompatible // indirect
    github.com/golang/groupcache v0.0.0-20210331224755-41bb18bfe9da // indirect
    github.com/google/btree v1.1.2 // indirect
    github.com/google/pprof v0.0.0-20231101202521-4ca4178f5c7a // indirect
    github.com/google/uuid v1.5.0 // indirect
    github.com/gorilla/websocket v1.5.1 // indirect
    github.com/huandu/xstrings v1.4.0 // indirect
    github.com/jbenet/go-context v0.0.0-20150711004518-d14ea06fba99 // indirect
    github.com/kevinburke/ssh_config v1.2.0 // indirect
    github.com/mattn/go-colorable v0.1.13 // indirect
    github.com/mattn/go-isatty v0.0.20 // indirect
    github.com/mschoch/smat v0.2.0 // indirect
    github.com/pion/datachannel v1.5.5 // indirect
    github.com/pion/dtls/v2 v2.2.9 // indirect
    github.com/pion/ice/v2 v2.3.12 // indirect
    github.com/pion/interceptor v0.1.25 // indirect
    github.com/pion/logging v0.2.2 // indirect
    github.com/pion/mdns v0.0.9 // indirect
    github.com/pion/randutil v0.1.0 // indirect
    github.com/pion/rtcp v1.2.13 // indirect
    github.com/pion/rtp v1.8.3 // indirect
    github.com/pion/sctp v1.8.9 // indirect
    github.com/pion/sdp/v3 v3.0.6 // indirect
    github.com/pion/srtp/v2 v2.0.18 // indirect
    github.com/pion/stun v0.6.1 // indirect
    github.com/pion/transport/v2 v2.2.4 // indirect
    github.com/pion/turn/v2 v2.1.4 // indirect
    github.com/pion/webrtc/v3 v3.2.24 // indirect
    github.com/pjbgf/sha1cd v0.3.0 // indirect
    github.com/pmezard/go-difflib v1.0.0 // indirect
    github.com/remyoudompheng/bigfft v0.0.0-20230129092748-24d4a6f8daec // indirect
    github.com/rs/dnscache v0.0.0-20230804202142-fc85eb664529 // indirect
    github.com/sergi/go-diff v1.1.0 // indirect
    github.com/skeema/knownhosts v1.2.0 // indirect
    github.com/stretchr/testify v1.8.4 // indirect
    github.com/tidwall/btree v1.7.0 // indirect
    github.com/xanzy/ssh-agent v0.3.3 // indirect
    github.com/xiaoqidun/setft v0.0.0-20220310121541-be86327699ad // indirect
    go.opentelemetry.io/otel v1.22.0 // indirect
    go.opentelemetry.io/otel/metric v1.22.0 // indirect
    go.opentelemetry.io/otel/trace v1.22.0 // indirect
    golang.org/x/crypto v0.18.0 // indirect
    golang.org/x/mod v0.14.0 // indirect
    golang.org/x/net v0.20.0 // indirect
    golang.org/x/sys v0.16.0 // indirect
    golang.org/x/text v0.14.0 // indirect
    golang.org/x/time v0.5.0 // indirect
    golang.org/x/tools v0.17.0 // indirect
    gopkg.in/warnings.v0 v0.1.2 // indirect
    gopkg.in/yaml.v3 v3.0.1 // indirect
    modernc.org/libc v1.40.6 // indirect
    modernc.org/mathutil v1.6.0 // indirect
    modernc.org/memory v1.7.2 // indirect
    modernc.org/sqlite v1.28.0 // indirect
    zombiezen.com/go/sqlite v1.1.0 // indirect
)

支持的协议有 BitTorrent、SOCKS5、Http

NodeJS 引擎 ECMAScript、Node.js

gopeed flutter 前端

目录包

ui/flutter/pubspec.yaml

dependencies:
  flutter:
    sdk: flutter
  flutter_localizations:
    sdk: flutter

  # The following adds the Cupertino Icons font to your application.
  # Use with the CupertinoIcons class for iOS style icons.
  cupertino_icons: ^1.0.2
  get: ^4.6.5
  lottie: ^1.4.2
  styled_widget: ^0.4.0+3
  context_menus: ^1.0.2
  json_annotation: ^4.8.1
  dio: ^5.2.1
  path_provider: ^2.1.1
  file_picker: 5.3.1
  macos_secure_bookmarks: ^0.2.1
  rounded_loading_button_plus: ^3.0.1
  url_launcher: ^6.1.6
  logger: ^1.3.0
  desktop_drop: ^0.4.3
  package_info_plus: ^4.0.0
  fluent_ui: ^4.4.0
  path: any
  badges: ^3.0.3
  app_links: ^3.4.2
  uri_to_file: ^0.2.0
  window_manager: ^0.3.4
  autoscale_tabbarview: ^1.0.2
  share_plus: ^7.1.0
  flutter_form_builder: ^9.1.1
  form_builder_validators: ^9.0.0
  flutter_foreground_task: ^6.1.2
  open_filex: ^4.3.4
  tray_manager: ^0.2.1
  lecle_downloads_path_provider: ^0.0.2+8
  hive: ^2.2.3
dev_dependencies:
  flutter_test:
    sdk: flutter

  # The "flutter_lints" package below contains a set of recommended lints to
  # encourage good coding practices. The lint set provided by the package is
  # activated in the `analysis_options.yaml` file located at the root of your
  # package. See that file for information about deactivating specific lint
  # rules and activating additional ones.
  flutter_lints: ^2.0.0
  ffigen: ^8.0.2
  # build json model: dart run build_runner build --delete-conflicting-outputs
  build_runner: ^2.2.1
  json_serializable: ^6.3.2
  flutter_launcher_icons: ^0.13.1

ffigen 方式读取 go 动态库

dio 拉取数据

fluent_ui 组件库

getx 方式管理路由、响应数据

styled_widget 简化前端视图代码

hive 前端本地数据

build_runner、json_serializable 自动化实例 entity 对象

程序启动时开启服务

gopeed start server

代码

https://github.com/GopeedLab/gopeed

小结

Gopeed 是一款基于 Flutter 开发的现代化下载工具,具有轻量、原生、全平台支持以及高速下载的特点。它不仅美观易用,而且开源,并且支持多种下载协议,包括 HTTP、BitTorrent、Magnet 等。无论是对于 Flutter 开发者还是下载工具用户,Gopeed 都是一个值得关注和尝试的项目。

感谢阅读本文

如果有什么建议,请在评论中让我知道。我很乐意改进。


flutter 学习路径


© 猫哥
ducafecat.com

end

相关文章
|
缓存 Dart JavaScript
flutter版本控制工具 `FVM`
文章目录 FVM 切换VSCode 的Flutter版本 在windows上安装fvm 方法一:先安装 choco 检查安装是否成功 常用指令 接下来安装fvm 方法二:pub方式安装 fvm VSCode配置 安卓studio Flutter版本切换 项目 缓存目录 列出配置 设置缓存路径 配置 常用命令 安装 删除 列出 releases doctor 路由 配置全局版本 项目多个选项 针对不用flavor版本 切换flavor版本 查看flavor 常见问题 运行 FVM 时内核二进制文件无效或 sdk 哈希无效 PATH 中 Windows 的环境变量顺序 找不到命令“pub”
664 1
flutter版本控制工具 `FVM`
|
3天前
|
Dart 前端开发 开发者
【Flutter前端技术开发专栏】Flutter中的性能分析工具Profiler
【4月更文挑战第30天】Flutter Profiler是用于性能优化的关键工具,提供CPU、GPU、内存和网络分析。它帮助开发者识别性能瓶颈,如CPU过度使用、渲染延迟、内存泄漏和网络效率低。通过实时监控和分析,开发者能优化代码、减少内存占用、改善渲染速度和网络请求,从而提升应用性能和用户体验。定期使用并结合实际场景与其它工具进行综合分析,是实现最佳实践的关键。
【Flutter前端技术开发专栏】Flutter中的性能分析工具Profiler
|
3天前
|
前端开发 数据处理 Android开发
【Flutter 前端技术开发专栏】Flutter 中的调试技巧与工具使用
【4月更文挑战第30天】本文探讨了Flutter开发中的调试技巧和工具,强调其在及时发现问题和提高效率上的重要性。介绍了基本的调试方法如打印日志和断点调试,以及Android Studio/VS Code的调试器和Flutter Inspector的使用。文章还涉及调试常见问题的解决、性能和内存分析等高级技巧,并通过实际案例演示调试过程。在团队协作中,有效调试能提升整体开发效率,而随着技术发展,调试工具也将持续进化。
【Flutter 前端技术开发专栏】Flutter 中的调试技巧与工具使用
|
3天前
|
开发框架 前端开发 定位技术
【Flutter 前端技术开发专栏】Flutter 中的插件市场与开源资源利用
【4月更文挑战第30天】Flutter插件市场和开源资源加速开发进程。pub.dev是官方插件库,提供大量第三方插件,节约时间和保证质量。选择插件时关注功能需求、评价及维护状况。开源资源作为学习、解决问题和创新的平台,需注意版权、代码质量和兼容性。案例分析展示插件应用,开源社区促进交流与技术进步,未来市场将持续发展。善用资源,提升开发效率与项目竞争力。
【Flutter 前端技术开发专栏】Flutter 中的插件市场与开源资源利用
|
3天前
|
存储 Dart 数据处理
Flutter是谷歌的开源移动框架,以其高性能和跨平台能力受开发者青睐。
【4月更文挑战第30天】Flutter是谷歌的开源移动框架,以其高性能和跨平台能力受开发者青睐。本文聚焦Flutter开发关键知识点:1) Dart语言和Flutter框架基础,如Widget和State;2) 路由管理,包括基本和命名路由,以及路由传值;3) 使用http、dio等库进行网络请求和数据处理;4) ThemeData定义应用主题,实现样式主题化。掌握这些技能将提升Flutter开发效率和应用质量。
|
8月前
|
Dart 前端开发 API
Flutter笔记:手写一个简单的画板工具
1. 任务介绍Flutter笔记实现一个简单的画板工具作者目 录1. 任务介绍2. 知识点准备3. 代码实现与效果1. 任务介绍在本文中,我们将一起开发一个基本的Flutter画板应用,用户可以在画板上自由绘制,选择不同的颜色来绘制线条。这个画板应用将允许用户通过点击颜色选择按钮来选择画笔的颜色,并提供鼠标光标支持以增强用户体验。
166 0
|
4月前
|
JSON Dart 算法
Dart/Flutter工具模块:the_utils
Dart/Flutter工具模块:the_utils
47 0
|
4月前
|
编解码 搜索推荐 Android开发
Flutter笔记:发布一个模块 scale_design - (移动端)设计师尺寸适配工具
Flutter笔记:发布一个模块 scale_design - (移动端)设计师尺寸适配工具
57 0
|
12月前
|
缓存 Dart iOS开发
|
12月前
|
缓存 Dart 定位技术
闲鱼技术2022年度白皮书-Flutter主题-节日献礼:Flutter 图片库重磅开源!(中)
闲鱼技术2022年度白皮书-Flutter主题-节日献礼:Flutter 图片库重磅开源!
146 0