2022-11-03 23:15:35 +08:00
2022-11-02 12:04:01 +08:00
2022-10-27 13:58:43 +08:00
2022-11-03 23:15:35 +08:00
2022-11-01 16:30:15 +08:00
2022-11-01 15:30:45 +08:00
2022-11-01 15:13:59 +08:00
2022-11-01 15:13:59 +08:00
2022-11-02 22:40:35 +08:00
2022-11-01 15:13:59 +08:00
2022-10-28 14:46:16 +08:00
2022-10-27 13:58:43 +08:00
2022-11-02 17:17:54 +08:00
2022-11-02 21:58:49 +08:00

Test Status Codecov Release

介绍

Gopeed 是一款由Golang+Flutter开发的高速下载器,支持(HTTP、BitTorrent、Magnet)协议下载,并且支持全平台使用。

下载

已支持平台

  • windows
  • macos
  • linux
  • android
  • ios
  • web

点击前往

命令行工具

使用go install安装:

go install github.com/monkeyWie/gopeed/cmd/gopeed

界面展示

开发

本项目分为前端和后端两个部分,前端使用flutter,后端使用Golang,两边通过http协议进行通讯,在 unix 系统下,使用的是unix socket,在 windows 系统下,使用的是tcp协议。

前端代码位于ui/flutter目录下。

环境要求

  1. Golang 1.9+
  2. Flutter 3.0+

克隆项目

git clone [email protected]:monkeyWie/gopeed.git

编译

桌面端

首先需要按照flutter desktop 官网文档进行环境配置,然后需要准备好cgo环境,具体可以自行搜索。

构建命令:

  • windows
go build -tags nosqlite -ldflags="-w -s" -buildmode=c-shared -o ui/flutter/windows/libgopeed.dll github.com/monkeyWie/gopeed/bind/desktop
cd ui/flutter
flutter build windows
  • macos
go build -tags nosqlite -ldflags="-w -s" -buildmode=c-shared -o ui/flutter/macos/Frameworks/libgopeed.dylib github.com/monkeyWie/gopeed/bind/desktop
cd ui/flutter
flutter build macos
  • linux
go build -tags nosqlite -ldflags="-w -s" -buildmode=c-shared -o ui/flutter/linux/bundle/lib/libgopeed.so github.com/monkeyWie/gopeed/bind/desktop
cd ui/flutter
flutter build linux

移动端

同样的也是需要准备好cgo环境,接着安装gomobile:

go install golang.org/x/mobile/cmd/gomobile@latest
gomobile init

构建命令:

  • android
gomobile bind -tags nosqlite -ldflags="-w -s" -o ui/flutter/android/app/libs/libgopeed.aar -target=android -androidapi 19 -javapkg=com.gopeed github.com/monkeyWie/gopeed/bind/mobile
cd ui/flutter
flutter build apk

Web 端(推荐本地调试使用)

Web 端直接与后端 http 服务通讯,不需要额外准备环境。

构建命令:

cd ui/flutter
flutter build web
cd ../../
cp -r ui/flutter/build/web cmd/web/dist
go build -tags nosqlite,web -ldflags="-s -w" -o bin/ github.com/monkeyWie/gopeed/cmd/web

开源许可

基于 GPLv3 协议开源。

Languages
Dart 52.9%
Go 41.3%
Swift 1.7%
JavaScript 1.5%
C++ 1.1%
Other 1.4%