Gopeed (正式名 Go Speed) は Golang + Flutter によって開発された高速ダウンローダーで、(HTTP、BitTorrent、Magnet) プロトコルをサポートし、すべてのプラットフォームをサポートします。
サポートするプラットフォーム
- windows
- macos
- linux
- android
- ios
- web
- docker
ヒント: macos を開くのに失敗した場合は、ターミナルで
xattr -d com.apple.quarantine /Applications/Gopeed.appコマンドを実行してください
go install を使用:
go install github.com/GopeedLab/gopeed/cmd/gopeed@latestdocker run -d -p 9999:9999 -v /path/to/download:/download liwei2633/gopeeddocker-compose up -ddocker コンテナが起動しているときは、http://localhost:9999 からウェブページにアクセスできます。
ヒント: 設定ページでダウンロードパスを
/downloadに変更すると、ホスト上でダウンロードしたファイルにアクセスできます。
もしこのプロジェクトがお気に召しましたら、このプロジェクトの発展を支援するために寄付をご検討ください!
このプロジェクトは二つの部分に分かれており、フロントエンドでは flutter を、バックエンドでは Golang を使用し、両者は http プロトコルで通信する。ユニックスシステムでは unix socket を、ウィンドウズシステムでは tcp プロトコルを使用します。
フロントコードは
ui/flutterディレクトリにあります。
- Go 言語 1.19+
- Flutter 3.7+
git clone git@github.com:GopeedLab/gopeed.gitCONTRIBUTING.md をご参照ください
まず、flutter デスクトップ公式サイトドキュメントに従って環境を設定し、自分で検索できる cgo 環境を用意します。
コマンド:
- windows
go build -tags nosqlite -ldflags="-w -s" -buildmode=c-shared -o ui/flutter/windows/libgopeed.dll github.com/GopeedLab/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/GopeedLab/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/GopeedLab/gopeed/bind/desktop
cd ui/flutter
flutter build linux先ほどと同じように、cgo 環境を準備し、gomobile をインストールする必要があります:
go install golang.org/x/mobile/cmd/gomobile@latest
go get golang.org/x/mobile/bind
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/GopeedLab/gopeed/bind/mobile
cd ui/flutter
flutter build apkコマンド:
cd ui/flutter
flutter build web
cd ../../
rm -rf cmd/web/dist
cp -r ui/flutter/build/web cmd/web/dist
go build -tags nosqlite,web -ldflags="-s -w" -o bin/ github.com/GopeedLab/gopeed/cmd/web
go run cmd/web/main.go
