mirror of
https://github.com/GopeedLab/gopeed.git
synced 2026-11-10 02:20:28 +00:00
Compare commits
16
Commits
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
654e57e946 | ||
|
|
b94b99ae09 | ||
|
|
fba990a056 | ||
|
|
cb07ce58bc | ||
|
|
50beef7b08 | ||
|
|
bd39e4110f | ||
|
|
86efcb98c5 | ||
|
|
f3d9873395 | ||
|
|
ef228c1722 | ||
|
|
6863317e9d | ||
|
|
2b83a735cb | ||
|
|
447f599783 | ||
|
|
f986f6253d | ||
|
|
2e1b621250 | ||
|
|
d50947b2e6 | ||
|
|
520a72415c |
No files matched your search
+97
-67
@@ -38,78 +38,108 @@ version-resolver:
|
||||
default: patch
|
||||
template: |
|
||||
<table>
|
||||
<thead>
|
||||
<tr>
|
||||
<th colspan="2">Windows</th>
|
||||
<th>MacOS</th>
|
||||
<th colspan="4">Linux</th>
|
||||
<th>Android</th>
|
||||
<th>iOS</th>
|
||||
<th>Docker</th>
|
||||
<th colspan="2">Qnap</th>
|
||||
<th colspan="8">Web</th>
|
||||
</tr>
|
||||
<tr>
|
||||
<td><code>EXE</code></td>
|
||||
<td><code>Portable</code></td>
|
||||
<td><code>DMG</code></td>
|
||||
<td><code>Flathub</code></td>
|
||||
<td><code>SNAP</code></td>
|
||||
<td><code>DEB</code></td>
|
||||
<td><code>AppImage</code></td>
|
||||
<td><code>APK</code></td>
|
||||
<td><code>IPA</code></td>
|
||||
<td>-</td>
|
||||
<td colspan="2"><code>QPKG</code></td>
|
||||
<td colspan="3"><code>Windows</code></td>
|
||||
<td colspan="2"><code>MacOS</code></td>
|
||||
<td colspan="3"><code>Linux</code></td>
|
||||
</tr>
|
||||
</thead>
|
||||
<tbody>
|
||||
<tr>
|
||||
<td rowspan="2">🪟 Windows</td>
|
||||
<td><code>EXE</code></td>
|
||||
<td>amd64</td>
|
||||
<td>amd64</td>
|
||||
<td>-</td>
|
||||
<td>amd64</td>
|
||||
<td>amd64</td>
|
||||
<td>amd64</td>
|
||||
<td>amd64</td>
|
||||
<td>-</td>
|
||||
<td>-</td>
|
||||
<td>-</td>
|
||||
<td>amd64</td>
|
||||
<td>arm64</td>
|
||||
<td>amd64</td>
|
||||
<td>amd64</td>
|
||||
<td>386</td>
|
||||
<td>amd64</td>
|
||||
<td>amd64</td>
|
||||
<td>amd64</td>
|
||||
<td>amd64</td>
|
||||
<td>386</td>
|
||||
<td><a href="https://github.com/GopeedLab/gopeed/releases/download/v$NEXT_PATCH_VERSION/Gopeed-v$NEXT_PATCH_VERSION-windows-amd64.zip">📥</a></td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td><a href="https://gopeed.com/api/download?tpl=Gopeed-$version-windows-amd64.zip">Link</a></td>
|
||||
<td><a href="https://gopeed.com/api/download?tpl=Gopeed-$version-windows-amd64-portable.zip">Link</a></td>
|
||||
<td><a href="https://gopeed.com/api/download?tpl=Gopeed-$version-macos.dmg">Link</a></td>
|
||||
<td><a href="https://flathub.org/apps/com.gopeed.Gopeed">Link</a></td>
|
||||
<td><a href="https://snapcraft.io/gopeed">Link</a></td>
|
||||
<td><a href="https://gopeed.com/api/download?tpl=Gopeed-$version-linux-amd64.deb">Link</a></td>
|
||||
<td><a href="https://gopeed.com/api/download?tpl=Gopeed-$version-linux-x86_64.AppImage">Link</a></td>
|
||||
<td><a href="https://gopeed.com/api/download?tpl=Gopeed-$version-android.apk">Link</a></td>
|
||||
<td><a href="https://gopeed.com/api/download?tpl=Gopeed-$version-ios.ipa">Link</a></td>
|
||||
<td><a href="https://hub.docker.com/r/liwei2633/gopeed">Link</a></td>
|
||||
<td><a href="https://gopeed.com/api/download?tpl=gopeed-$version-qnap-amd64.qpkg">Link</a></td>
|
||||
<td><a href="https://gopeed.com/api/download?tpl=gopeed-$version-qnap-arm64.qpkg">Link</a></td>
|
||||
<td><a href="https://gopeed.com/api/download?tpl=gopeed-web-$version-windows-amd64.zip">Link</a></td>
|
||||
<td><a href="https://gopeed.com/api/download?tpl=gopeed-web-$version-windows-arm64.zip">Link</a></td>
|
||||
<td><a href="https://gopeed.com/api/download?tpl=gopeed-web-$version-windows-386.zip">Link</a></td>
|
||||
<td><a href="https://gopeed.com/api/download?tpl=gopeed-web-$version-macos-amd64.zip">Link</a></td>
|
||||
<td><a href="https://gopeed.com/api/download?tpl=gopeed-web-$version-macos-arm64.zip">Link</a></td>
|
||||
<td><a href="https://gopeed.com/api/download?tpl=gopeed-web-$version-linux-amd64.zip">Link</a></td>
|
||||
<td><a href="https://gopeed.com/api/download?tpl=gopeed-web-$version-linux-arm64.zip">Link</a></td>
|
||||
<td><a href="https://gopeed.com/api/download?tpl=gopeed-web-$version-linux-386.zip">Link</a></td>
|
||||
<td><code>Portable</code></td>
|
||||
<td>amd64</td>
|
||||
<td><a href="https://github.com/GopeedLab/gopeed/releases/download/v$NEXT_PATCH_VERSION/Gopeed-v$NEXT_PATCH_VERSION-windows-amd64-portable.zip">📥</a></td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>🍎 MacOS</td>
|
||||
<td><code>DMG</code></td>
|
||||
<td>universal</td>
|
||||
<td><a href="https://github.com/GopeedLab/gopeed/releases/download/v$NEXT_PATCH_VERSION/Gopeed-v$NEXT_PATCH_VERSION-macos.dmg">📥</a></td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td rowspan="4">🐧 Linux</td>
|
||||
<td><code>Flathub</code></td>
|
||||
<td>amd64</td>
|
||||
<td><a href="https://flathub.org/apps/com.gopeed.Gopeed">📥</a></td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td><code>SNAP</code></td>
|
||||
<td>amd64</td>
|
||||
<td><a href="https://snapcraft.io/gopeed">📥</a></td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td><code>DEB</code></td>
|
||||
<td>amd64</td>
|
||||
<td><a href="https://github.com/GopeedLab/gopeed/releases/download/v$NEXT_PATCH_VERSION/Gopeed-v$NEXT_PATCH_VERSION-linux-amd64.deb">📥</a></td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td><code>AppImage</code></td>
|
||||
<td>amd64</td>
|
||||
<td><a href="https://github.com/GopeedLab/gopeed/releases/download/v$NEXT_PATCH_VERSION/Gopeed-v$NEXT_PATCH_VERSION-linux-x86_64.AppImage">📥</a></td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>🤖 Android</td>
|
||||
<td><code>APK</code></td>
|
||||
<td>universal</td>
|
||||
<td><a href="https://github.com/GopeedLab/gopeed/releases/download/v$NEXT_PATCH_VERSION/Gopeed-v$NEXT_PATCH_VERSION-android.apk">📥</a></td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>📱 iOS</td>
|
||||
<td><code>IPA</code></td>
|
||||
<td>universal</td>
|
||||
<td><a href="https://github.com/GopeedLab/gopeed/releases/download/v$NEXT_PATCH_VERSION/Gopeed-v$NEXT_PATCH_VERSION-ios.ipa">📥</a></td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>🐳 Docker</td>
|
||||
<td>-</td>
|
||||
<td>universal</td>
|
||||
<td><a href="https://hub.docker.com/r/liwei2633/gopeed">📥</a></td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td rowspan="2">💾 Qnap</td>
|
||||
<td rowspan="2"><code>QPKG</code></td>
|
||||
<td>amd64</td>
|
||||
<td><a href="https://github.com/GopeedLab/gopeed/releases/download/v$NEXT_PATCH_VERSION/gopeed-v$NEXT_PATCH_VERSION-qnap-amd64.qpkg">📥</a></td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>arm64</td>
|
||||
<td><a href="https://github.com/GopeedLab/gopeed/releases/download/v$NEXT_PATCH_VERSION/gopeed-v$NEXT_PATCH_VERSION-qnap-arm64.qpkg">📥</a></td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td rowspan="8">🌐 Web</td>
|
||||
<td rowspan="3"><code>Windows</code></td>
|
||||
<td>amd64</td>
|
||||
<td><a href="https://github.com/GopeedLab/gopeed/releases/download/v$NEXT_PATCH_VERSION/gopeed-web-v$NEXT_PATCH_VERSION-windows-amd64.zip">📥</a></td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>arm64</td>
|
||||
<td><a href="https://github.com/GopeedLab/gopeed/releases/download/v$NEXT_PATCH_VERSION/gopeed-web-v$NEXT_PATCH_VERSION-windows-arm64.zip">📥</a></td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>386</td>
|
||||
<td><a href="https://github.com/GopeedLab/gopeed/releases/download/v$NEXT_PATCH_VERSION/gopeed-web-v$NEXT_PATCH_VERSION-windows-386.zip">📥</a></td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td rowspan="2"><code>MacOS</code></td>
|
||||
<td>amd64</td>
|
||||
<td><a href="https://github.com/GopeedLab/gopeed/releases/download/v$NEXT_PATCH_VERSION/gopeed-web-v$NEXT_PATCH_VERSION-macos-amd64.zip">📥</a></td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>arm64</td>
|
||||
<td><a href="https://github.com/GopeedLab/gopeed/releases/download/v$NEXT_PATCH_VERSION/gopeed-web-v$NEXT_PATCH_VERSION-macos-arm64.zip">📥</a></td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td rowspan="3"><code>Linux</code></td>
|
||||
<td>amd64</td>
|
||||
<td><a href="https://github.com/GopeedLab/gopeed/releases/download/v$NEXT_PATCH_VERSION/gopeed-web-v$NEXT_PATCH_VERSION-linux-amd64.zip">📥</a></td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>arm64</td>
|
||||
<td><a href="https://github.com/GopeedLab/gopeed/releases/download/v$NEXT_PATCH_VERSION/gopeed-web-v$NEXT_PATCH_VERSION-linux-arm64.zip">📥</a></td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>386</td>
|
||||
<td><a href="https://github.com/GopeedLab/gopeed/releases/download/v$NEXT_PATCH_VERSION/gopeed-web-v$NEXT_PATCH_VERSION-linux-386.zip">📥</a></td>
|
||||
</tr>
|
||||
</tbody>
|
||||
</table>
|
||||
|
||||
+24
-12
@@ -52,6 +52,7 @@ jobs:
|
||||
mv ChineseSimplified.isl "C:\Program Files (x86)\Inno Setup 6\Languages\"
|
||||
|
||||
go build -tags nosqlite -ldflags="-w -s -X github.com/GopeedLab/gopeed/pkg/base.Version=$env:VERSION" -buildmode=c-shared -o ui/flutter/windows/libgopeed.dll github.com/GopeedLab/gopeed/bind/desktop
|
||||
go build -ldflags="-w -s" -o ui/flutter/assets/host/host.exe github.com/GopeedLab/gopeed/cmd/host
|
||||
cd ui/flutter
|
||||
$TAG = "v$env:VERSION"
|
||||
flutter build windows
|
||||
@@ -122,7 +123,7 @@ jobs:
|
||||
[Icons]
|
||||
Name: "{autoprograms}\{#MyAppName}"; Filename: "{app}\{#MyAppExeName}"
|
||||
Name: "{autodesktop}\{#MyAppName}"; Filename: "{app}\{#MyAppExeName}"; Tasks: desktopicon
|
||||
|
||||
|
||||
[Run]
|
||||
Filename: "{app}\{#MyAppExeName}"; Description: "{cm:LaunchProgram,{#StringChange(MyAppName, '&', '&&')}}"; Flags: nowait postinstall skipifsilent
|
||||
"@ > setup.iss
|
||||
@@ -150,10 +151,13 @@ jobs:
|
||||
VERSION: ${{ needs.get-release.outputs.version }}
|
||||
run: |
|
||||
go build -tags nosqlite -ldflags="-w -s -X github.com/GopeedLab/gopeed/pkg/base.Version=$VERSION" -buildmode=c-shared -o libgopeed.dylib github.com/GopeedLab/gopeed/bind/desktop
|
||||
- uses: actions/upload-artifact@v3
|
||||
go build -ldflags="-w -s" github.com/GopeedLab/gopeed/cmd/host
|
||||
- uses: actions/upload-artifact@v4
|
||||
with:
|
||||
name: macos-arm64-lib
|
||||
path: libgopeed.dylib
|
||||
path: |
|
||||
libgopeed.dylib
|
||||
host
|
||||
build-macos:
|
||||
if: ${{ github.event.inputs.platform == 'all' || github.event.inputs.platform == 'macos' }}
|
||||
runs-on: macos-13
|
||||
@@ -173,7 +177,7 @@ jobs:
|
||||
run: |
|
||||
python3 -m pip install setuptools --break-system-packages
|
||||
npm install -g appdmg
|
||||
- uses: actions/download-artifact@v3
|
||||
- uses: actions/download-artifact@v4
|
||||
with:
|
||||
name: macos-arm64-lib
|
||||
path: ui/flutter/lib-arm64
|
||||
@@ -185,12 +189,18 @@ jobs:
|
||||
|
||||
# amd64 lib
|
||||
go build -tags nosqlite -ldflags="-w -s -X github.com/GopeedLab/gopeed/pkg/base.Version=$VERSION" -buildmode=c-shared -o ui/flutter/lib-amd64/libgopeed.dylib github.com/GopeedLab/gopeed/bind/desktop
|
||||
go build -ldflags="-w -s" -o ui/flutter/lib-amd64/host github.com/GopeedLab/gopeed/cmd/host
|
||||
# universal binary
|
||||
mkdir -p ui/flutter/macos/Frameworks
|
||||
cp ui/flutter/lib-amd64/libgopeed.dylib ui/flutter/macos/Frameworks/amd64-lib
|
||||
cp ui/flutter/lib-arm64/libgopeed.dylib ui/flutter/macos/Frameworks/arm64-lib
|
||||
cp ui/flutter/lib-amd64/host ui/flutter/macos/Frameworks/amd64-host
|
||||
cp ui/flutter/lib-arm64/host ui/flutter/macos/Frameworks/arm64-host
|
||||
cd ui/flutter/macos/Frameworks
|
||||
lipo -create -output libgopeed.dylib amd64-lib arm64-lib
|
||||
lipo -create -output host amd64-host arm64-host
|
||||
rm -rf amd64-lib arm64-lib amd64-host arm64-host
|
||||
mv host ../../assets/host/host
|
||||
|
||||
cd $PROJECT_DIR/ui/flutter
|
||||
flutter build macos
|
||||
@@ -239,6 +249,7 @@ jobs:
|
||||
VERSION: ${{ needs.get-release.outputs.version }}
|
||||
run: |
|
||||
go build -tags nosqlite -ldflags="-w -s -X github.com/GopeedLab/gopeed/pkg/base.Version=$VERSION" -buildmode=c-shared -o ui/flutter/linux/bundle/lib/libgopeed.so github.com/GopeedLab/gopeed/bind/desktop
|
||||
go build -ldflags="-w -s" -o ui/flutter/assets/host/host github.com/GopeedLab/gopeed/cmd/host
|
||||
cd ui/flutter
|
||||
dart pub global activate -sgit https://github.com/GopeedLab/flutter_distributor.git --git-path packages/flutter_distributor
|
||||
flutter_distributor package --platform linux --targets appimage,deb
|
||||
@@ -269,6 +280,7 @@ jobs:
|
||||
VERSION: ${{ needs.get-release.outputs.version }}
|
||||
run: |
|
||||
go build -tags nosqlite -ldflags="-w -s -X github.com/GopeedLab/gopeed/pkg/base.Version=$VERSION" -buildmode=c-shared -o ui/flutter/linux/bundle/lib/libgopeed.so github.com/GopeedLab/gopeed/bind/desktop
|
||||
go build -ldflags="-w -s" -o ui/flutter/assets/host/host github.com/GopeedLab/gopeed/cmd/host
|
||||
cd ui/flutter
|
||||
|
||||
sudo snap install snapcraft --classic
|
||||
@@ -357,13 +369,13 @@ jobs:
|
||||
\${CRAFT_PART_SRC}/bin/gpu-2404-cleanup mesa-2404
|
||||
prime:
|
||||
- bin/gpu-2404-wrapper
|
||||
|
||||
|
||||
plugs:
|
||||
gpu-2404:
|
||||
interface: content
|
||||
target: \$SNAP/gpu-2404
|
||||
default-provider: mesa-2404
|
||||
|
||||
|
||||
layout:
|
||||
/usr/share/libdrm:
|
||||
bind: \$SNAP/gpu-2404/libdrm
|
||||
@@ -496,7 +508,7 @@ jobs:
|
||||
|| true
|
||||
done
|
||||
done
|
||||
- uses: actions/upload-artifact@v3
|
||||
- uses: actions/upload-artifact@v4
|
||||
with:
|
||||
name: web-dist
|
||||
path: dist/zip/
|
||||
@@ -513,8 +525,8 @@ jobs:
|
||||
steps:
|
||||
- uses: actions/setup-python@v5
|
||||
with:
|
||||
python-version: '3.8.18'
|
||||
- uses: actions/download-artifact@v3
|
||||
python-version: "3.8.18"
|
||||
- uses: actions/download-artifact@v4
|
||||
with:
|
||||
name: web-dist
|
||||
path: dist/zip/
|
||||
@@ -527,12 +539,12 @@ jobs:
|
||||
wget -O qdk2_0.32.bionic_amd64.deb "https://github.com/qnap-dev/qdk2/releases/download/v0.32/qdk2_0.32.bionic_amd64.deb"
|
||||
dpkg -X qdk2_0.32.bionic_amd64.deb qdk2 # Direct installs will fail due to missing dependencies!
|
||||
[[ -d qdk2 ]] || exit 1
|
||||
|
||||
|
||||
export PATH=$(pwd)/qdk2/usr/bin:$(pwd)/qdk2/usr/share/qdk2/QDK/bin:${PATH}
|
||||
wget -O Gopeed.template.tar.gz "https://github.com/GopeedLab/QpkgBuild/raw/refs/heads/master/template/Gopeed.template.tar.gz"
|
||||
tar -zxf Gopeed.template.tar.gz
|
||||
[[ -d Gopeed ]] || exit 1
|
||||
|
||||
|
||||
goos=linux
|
||||
goarch_arr=(amd64 arm64)
|
||||
for goarch in "${goarch_arr[@]}"; do
|
||||
@@ -545,7 +557,7 @@ jobs:
|
||||
cd Gopeed
|
||||
sed -i -e 's/__QPKG_VER__/${VERSION}/g' qpkg.cfg
|
||||
qbuild || exit 1
|
||||
|
||||
|
||||
mkdir -p ../dist/qnap
|
||||
goos=qnap
|
||||
for goarch in "${goarch_arr[@]}"; do
|
||||
|
||||
@@ -13,94 +13,124 @@
|
||||
|
||||
[English](/README.md) | [中文](/README_zh-CN.md) | [日本語](/README_ja-JP.md) | [正體中文](/README_zh-TW.md) | [Tiếng Việt](/README_vi-VN.md)
|
||||
|
||||
## Introduction
|
||||
## 🚀 Introduction
|
||||
|
||||
Gopeed (full name Go Speed), a high-speed downloader developed by `Golang` + `Flutter`, supports (HTTP, BitTorrent, Magnet) protocol, and supports all platforms. In addition to basic download functions, Gopeed is also a highly customizable downloader that supports implementing more features through integration with [APIs](https://docs.gopeed.com/dev-api.html) or installation and development of [extensions](https://docs.gopeed.com/dev-extension.html).
|
||||
|
||||
Visit ✈ [Official Website](https://gopeed.com) | 📖 [Official Docs](https://docs.gopeed.com)
|
||||
|
||||
## Download
|
||||
## ⬇️ Download
|
||||
|
||||
<table>
|
||||
<thead>
|
||||
<tr>
|
||||
<th colspan="2">Windows</th>
|
||||
<th>MacOS</th>
|
||||
<th colspan="4">Linux</th>
|
||||
<th>Android</th>
|
||||
<th>iOS</th>
|
||||
<th>Docker</th>
|
||||
<th colspan="2">Qnap</th>
|
||||
<th colspan="8">Web</th>
|
||||
</tr>
|
||||
<tr>
|
||||
<td><code>EXE</code></td>
|
||||
<td><code>Portable</code></td>
|
||||
<td><code>DMG</code></td>
|
||||
<td><code>Flathub</code></td>
|
||||
<td><code>SNAP</code></td>
|
||||
<td><code>DEB</code></td>
|
||||
<td><code>AppImage</code></td>
|
||||
<td><code>APK</code></td>
|
||||
<td><code>IPA</code></td>
|
||||
<td>-</td>
|
||||
<td colspan="2"><code>QPKG</code></td>
|
||||
<td colspan="3"><code>Windows</code></td>
|
||||
<td colspan="2"><code>MacOS</code></td>
|
||||
<td colspan="3"><code>Linux</code></td>
|
||||
</tr>
|
||||
</thead>
|
||||
<tbody>
|
||||
<tr>
|
||||
<td rowspan="2">🪟 Windows</td>
|
||||
<td><code>EXE</code></td>
|
||||
<td>amd64</td>
|
||||
<td>amd64</td>
|
||||
<td>-</td>
|
||||
<td>amd64</td>
|
||||
<td>amd64</td>
|
||||
<td>amd64</td>
|
||||
<td>amd64</td>
|
||||
<td>-</td>
|
||||
<td>-</td>
|
||||
<td>-</td>
|
||||
<td>amd64</td>
|
||||
<td>arm64</td>
|
||||
<td>amd64</td>
|
||||
<td>amd64</td>
|
||||
<td>386</td>
|
||||
<td>amd64</td>
|
||||
<td>amd64</td>
|
||||
<td>amd64</td>
|
||||
<td>amd64</td>
|
||||
<td>386</td>
|
||||
<td><a href="https://gopeed.com/api/download?tpl=Gopeed-$version-windows-amd64.zip">📥</a></td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td><a href="https://gopeed.com/api/download?tpl=Gopeed-$version-windows-amd64.zip">Link</a></td>
|
||||
<td><a href="https://gopeed.com/api/download?tpl=Gopeed-$version-windows-amd64-portable.zip">Link</a></td>
|
||||
<td><a href="https://gopeed.com/api/download?tpl=Gopeed-$version-macos.dmg">Link</a></td>
|
||||
<td><a href="https://flathub.org/apps/com.gopeed.Gopeed">Link</a></td>
|
||||
<td><a href="https://snapcraft.io/gopeed">Link</a></td>
|
||||
<td><a href="https://gopeed.com/api/download?tpl=Gopeed-$version-linux-amd64.deb">Link</a></td>
|
||||
<td><a href="https://gopeed.com/api/download?tpl=Gopeed-$version-linux-x86_64.AppImage">Link</a></td>
|
||||
<td><a href="https://gopeed.com/api/download?tpl=Gopeed-$version-android.apk">Link</a></td>
|
||||
<td><a href="https://gopeed.com/api/download?tpl=Gopeed-$version-ios.ipa">Link</a></td>
|
||||
<td><a href="https://hub.docker.com/r/liwei2633/gopeed">Link</a></td>
|
||||
<td><a href="https://gopeed.com/api/download?tpl=gopeed-$version-qnap-amd64.qpkg">Link</a></td>
|
||||
<td><a href="https://gopeed.com/api/download?tpl=gopeed-$version-qnap-arm64.qpkg">Link</a></td>
|
||||
<td><a href="https://gopeed.com/api/download?tpl=gopeed-web-$version-windows-amd64.zip">Link</a></td>
|
||||
<td><a href="https://gopeed.com/api/download?tpl=gopeed-web-$version-windows-arm64.zip">Link</a></td>
|
||||
<td><a href="https://gopeed.com/api/download?tpl=gopeed-web-$version-windows-386.zip">Link</a></td>
|
||||
<td><a href="https://gopeed.com/api/download?tpl=gopeed-web-$version-macos-amd64.zip">Link</a></td>
|
||||
<td><a href="https://gopeed.com/api/download?tpl=gopeed-web-$version-macos-arm64.zip">Link</a></td>
|
||||
<td><a href="https://gopeed.com/api/download?tpl=gopeed-web-$version-linux-amd64.zip">Link</a></td>
|
||||
<td><a href="https://gopeed.com/api/download?tpl=gopeed-web-$version-linux-arm64.zip">Link</a></td>
|
||||
<td><a href="https://gopeed.com/api/download?tpl=gopeed-web-$version-linux-386.zip">Link</a></td>
|
||||
<td><code>Portable</code></td>
|
||||
<td>amd64</td>
|
||||
<td><a href="https://gopeed.com/api/download?tpl=Gopeed-$version-windows-amd64-portable.zip">📥</a></td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>🍎 MacOS</td>
|
||||
<td><code>DMG</code></td>
|
||||
<td>universal</td>
|
||||
<td><a href="https://gopeed.com/api/download?tpl=Gopeed-$version-macos.dmg">📥</a></td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td rowspan="4">🐧 Linux</td>
|
||||
<td><code>Flathub</code></td>
|
||||
<td>amd64</td>
|
||||
<td><a href="https://flathub.org/apps/com.gopeed.Gopeed">📥</a></td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td><code>SNAP</code></td>
|
||||
<td>amd64</td>
|
||||
<td><a href="https://snapcraft.io/gopeed">📥</a></td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td><code>DEB</code></td>
|
||||
<td>amd64</td>
|
||||
<td><a href="https://gopeed.com/api/download?tpl=Gopeed-$version-linux-amd64.deb">📥</a></td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td><code>AppImage</code></td>
|
||||
<td>amd64</td>
|
||||
<td><a href="https://gopeed.com/api/download?tpl=Gopeed-$version-linux-x86_64.AppImage">📥</a></td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>🤖 Android</td>
|
||||
<td><code>APK</code></td>
|
||||
<td>universal</td>
|
||||
<td><a href="https://gopeed.com/api/download?tpl=Gopeed-$version-android.apk">📥</a></td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>📱 iOS</td>
|
||||
<td><code>IPA</code></td>
|
||||
<td>universal</td>
|
||||
<td><a href="https://gopeed.com/api/download?tpl=Gopeed-$version-ios.ipa">📥</a></td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>🐳 Docker</td>
|
||||
<td>-</td>
|
||||
<td>universal</td>
|
||||
<td><a href="https://hub.docker.com/r/liwei2633/gopeed">📥</a></td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td rowspan="2">💾 Qnap</td>
|
||||
<td rowspan="2"><code>QPKG</code></td>
|
||||
<td>amd64</td>
|
||||
<td><a href="https://gopeed.com/api/download?tpl=gopeed-$version-qnap-amd64.qpkg">📥</a></td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>arm64</td>
|
||||
<td><a href="https://gopeed.com/api/download?tpl=gopeed-$version-qnap-arm64.qpkg">📥</a></td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td rowspan="8">🌐 Web</td>
|
||||
<td rowspan="3"><code>Windows</code></td>
|
||||
<td>amd64</td>
|
||||
<td><a href="https://gopeed.com/api/download?tpl=gopeed-web-$version-windows-amd64.zip">📥</a></td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>arm64</td>
|
||||
<td><a href="https://gopeed.com/api/download?tpl=gopeed-web-$version-windows-arm64.zip">📥</a></td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>386</td>
|
||||
<td><a href="https://gopeed.com/api/download?tpl=gopeed-web-$version-windows-386.zip">📥</a></td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td rowspan="2"><code>MacOS</code></td>
|
||||
<td>amd64</td>
|
||||
<td><a href="https://gopeed.com/api/download?tpl=gopeed-web-$version-macos-amd64.zip">📥</a></td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>arm64</td>
|
||||
<td><a href="https://gopeed.com/api/download?tpl=gopeed-web-$version-macos-arm64.zip">📥</a></td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td rowspan="3"><code>Linux</code></td>
|
||||
<td>amd64</td>
|
||||
<td><a href="https://gopeed.com/api/download?tpl=gopeed-web-$version-linux-amd64.zip">📥</a></td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>arm64</td>
|
||||
<td><a href="https://gopeed.com/api/download?tpl=gopeed-web-$version-linux-arm64.zip">📥</a></td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>386</td>
|
||||
<td><a href="https://gopeed.com/api/download?tpl=gopeed-web-$version-linux-386.zip">📥</a></td>
|
||||
</tr>
|
||||
</tbody>
|
||||
</table>
|
||||
|
||||
More about installation, please refer to [Installation](https://docs.gopeed.com/install.html)
|
||||
|
||||
### Command tool
|
||||
### 🛠️ Command tool
|
||||
|
||||
use `go install`:
|
||||
|
||||
@@ -108,40 +138,40 @@ use `go install`:
|
||||
go install github.com/GopeedLab/gopeed/cmd/gopeed@latest
|
||||
```
|
||||
|
||||
## Browser Extension
|
||||
## 🔌 Browser Extension
|
||||
|
||||
Gopeed also provides a browser extension to take over browser downloads, supporting browsers such as Chrome, Edge, Firefox, etc., please refer to: [https://github.com/GopeedLab/browser-extension](https://github.com/GopeedLab/browser-extension)
|
||||
|
||||
## Donate
|
||||
## 💝 Donate
|
||||
|
||||
If you like this project, please consider [donating](https://docs.gopeed.com/donate.html) to support the development of this project, thank you!
|
||||
|
||||
## Showcase
|
||||
## 🖼️ Showcase
|
||||
|
||||

|
||||
|
||||
## Development
|
||||
## 👨💻 Development
|
||||
|
||||
This project is divided into two parts, the front end uses `flutter`, the back end uses `Golang`, and the two sides communicate through the `http` protocol. On the unix system, `unix socket` is used, and on the windows system, `tcp` protocol is used.
|
||||
|
||||
> The front code is located in the `ui/flutter` directory.
|
||||
|
||||
### Environment
|
||||
### 🌍 Environment
|
||||
|
||||
1. Golang 1.23+
|
||||
2. Flutter 3.24+
|
||||
|
||||
### Clone
|
||||
### 📋 Clone
|
||||
|
||||
```bash
|
||||
git clone [email protected]:GopeedLab/gopeed.git
|
||||
```
|
||||
|
||||
### Contributing
|
||||
### 🤝 Contributing
|
||||
|
||||
Please refer to [CONTRIBUTING.md](/CONTRIBUTING.md)
|
||||
|
||||
### Build
|
||||
### 🏗️ Build
|
||||
|
||||
#### Desktop
|
||||
|
||||
@@ -214,18 +244,18 @@ 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
|
||||
```
|
||||
|
||||
## Credits
|
||||
## ❤️ Credits
|
||||
|
||||
### Contributors
|
||||
### 👥 Contributors
|
||||
|
||||
<a href="https://github.com/GopeedLab/gopeed/graphs/contributors">
|
||||
<img src="https://contrib.rocks/image?repo=GopeedLab/gopeed" />
|
||||
</a>
|
||||
|
||||
### JetBrains
|
||||
### 🏢 JetBrains
|
||||
|
||||
[](https://www.jetbrains.com/?from=gopeed)
|
||||
|
||||
## License
|
||||
## 📄 License
|
||||
|
||||
[GPLv3](LICENSE)
|
||||
+109
-77
@@ -13,123 +13,155 @@
|
||||
|
||||
[English](/README.md) | [中文](/README_zh-CN.md) | [日本語](/README_ja-JP.md) | [正體中文](/README_zh-TW.md) | [Tiếng Việt](/README_vi-VN.md)
|
||||
|
||||
## はじめに
|
||||
## 🚀 はじめに
|
||||
|
||||
Gopeed (正式名 Go Speed) は `Golang` + `Flutter` によって開発された高速ダウンローダーで、(HTTP、BitTorrent、Magnet) プロトコルをサポートし、すべてのプラットフォームをサポートします。基本的なダウンロード機能に加え、[APIs](https://docs.gopeed.com/dev-api.html)との連動や[拡張機能](https://docs.gopeed.com/dev-extension.html)のインストール・開発による追加機能にも対応した、カスタマイズ性の高いダウンローダーです。
|
||||
|
||||
見て下さい ✈ [公式ウェブサイト](https://gopeed.com) | 📖 [開発ドキュメント](https://docs.gopeed.com)
|
||||
|
||||
## インストール
|
||||
## ⬇️ インストール
|
||||
|
||||
<table>
|
||||
<thead>
|
||||
<tr>
|
||||
<th colspan="2">Windows</th>
|
||||
<th>MacOS</th>
|
||||
<th colspan="4">Linux</th>
|
||||
<th>Android</th>
|
||||
<th>iOS</th>
|
||||
<th>Docker</th>
|
||||
<th colspan="2">Qnap</th>
|
||||
<th colspan="8">Web</th>
|
||||
</tr>
|
||||
<tr>
|
||||
<td><code>EXE</code></td>
|
||||
<td><code>Portable</code></td>
|
||||
<td><code>DMG</code></td>
|
||||
<td><code>Flathub</code></td>
|
||||
<td><code>SNAP</code></td>
|
||||
<td><code>DEB</code></td>
|
||||
<td><code>AppImage</code></td>
|
||||
<td><code>APK</code></td>
|
||||
<td><code>IPA</code></td>
|
||||
<td>-</td>
|
||||
<td colspan="2"><code>QPKG</code></td>
|
||||
<td colspan="3"><code>Windows</code></td>
|
||||
<td colspan="2"><code>MacOS</code></td>
|
||||
<td colspan="3"><code>Linux</code></td>
|
||||
</tr>
|
||||
</thead>
|
||||
<tbody>
|
||||
<tr>
|
||||
<td rowspan="2">🪟 Windows</td>
|
||||
<td><code>EXE</code></td>
|
||||
<td>amd64</td>
|
||||
<td>amd64</td>
|
||||
<td>-</td>
|
||||
<td>amd64</td>
|
||||
<td>amd64</td>
|
||||
<td>amd64</td>
|
||||
<td>amd64</td>
|
||||
<td>-</td>
|
||||
<td>-</td>
|
||||
<td>-</td>
|
||||
<td>amd64</td>
|
||||
<td>arm64</td>
|
||||
<td>amd64</td>
|
||||
<td>amd64</td>
|
||||
<td>386</td>
|
||||
<td>amd64</td>
|
||||
<td>amd64</td>
|
||||
<td>amd64</td>
|
||||
<td>amd64</td>
|
||||
<td>386</td>
|
||||
<td><a href="https://gopeed.com/api/download?tpl=Gopeed-$version-windows-amd64.zip">📥</a></td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td><a href="https://gopeed.com/api/download?tpl=Gopeed-$version-windows-amd64.zip">Link</a></td>
|
||||
<td><a href="https://gopeed.com/api/download?tpl=Gopeed-$version-windows-amd64-portable.zip">Link</a></td>
|
||||
<td><a href="https://gopeed.com/api/download?tpl=Gopeed-$version-macos.dmg">Link</a></td>
|
||||
<td><a href="https://flathub.org/apps/com.gopeed.Gopeed">Link</a></td>
|
||||
<td><a href="https://snapcraft.io/gopeed">Link</a></td>
|
||||
<td><a href="https://gopeed.com/api/download?tpl=Gopeed-$version-linux-amd64.deb">Link</a></td>
|
||||
<td><a href="https://gopeed.com/api/download?tpl=Gopeed-$version-linux-x86_64.AppImage">Link</a></td>
|
||||
<td><a href="https://gopeed.com/api/download?tpl=Gopeed-$version-android.apk">Link</a></td>
|
||||
<td><a href="https://gopeed.com/api/download?tpl=Gopeed-$version-ios.ipa">Link</a></td>
|
||||
<td><a href="https://hub.docker.com/r/liwei2633/gopeed">Link</a></td>
|
||||
<td><a href="https://gopeed.com/api/download?tpl=gopeed-$version-qnap-amd64.qpkg">Link</a></td>
|
||||
<td><a href="https://gopeed.com/api/download?tpl=gopeed-$version-qnap-arm64.qpkg">Link</a></td>
|
||||
<td><a href="https://gopeed.com/api/download?tpl=gopeed-web-$version-windows-amd64.zip">Link</a></td>
|
||||
<td><a href="https://gopeed.com/api/download?tpl=gopeed-web-$version-windows-arm64.zip">Link</a></td>
|
||||
<td><a href="https://gopeed.com/api/download?tpl=gopeed-web-$version-windows-386.zip">Link</a></td>
|
||||
<td><a href="https://gopeed.com/api/download?tpl=gopeed-web-$version-macos-amd64.zip">Link</a></td>
|
||||
<td><a href="https://gopeed.com/api/download?tpl=gopeed-web-$version-macos-arm64.zip">Link</a></td>
|
||||
<td><a href="https://gopeed.com/api/download?tpl=gopeed-web-$version-linux-amd64.zip">Link</a></td>
|
||||
<td><a href="https://gopeed.com/api/download?tpl=gopeed-web-$version-linux-arm64.zip">Link</a></td>
|
||||
<td><a href="https://gopeed.com/api/download?tpl=gopeed-web-$version-linux-386.zip">Link</a></td>
|
||||
<td><code>Portable</code></td>
|
||||
<td>amd64</td>
|
||||
<td><a href="https://gopeed.com/api/download?tpl=Gopeed-$version-windows-amd64-portable.zip">📥</a></td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>🍎 MacOS</td>
|
||||
<td><code>DMG</code></td>
|
||||
<td>universal</td>
|
||||
<td><a href="https://gopeed.com/api/download?tpl=Gopeed-$version-macos.dmg">📥</a></td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td rowspan="4">🐧 Linux</td>
|
||||
<td><code>Flathub</code></td>
|
||||
<td>amd64</td>
|
||||
<td><a href="https://flathub.org/apps/com.gopeed.Gopeed">📥</a></td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td><code>SNAP</code></td>
|
||||
<td>amd64</td>
|
||||
<td><a href="https://snapcraft.io/gopeed">📥</a></td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td><code>DEB</code></td>
|
||||
<td>amd64</td>
|
||||
<td><a href="https://gopeed.com/api/download?tpl=Gopeed-$version-linux-amd64.deb">📥</a></td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td><code>AppImage</code></td>
|
||||
<td>amd64</td>
|
||||
<td><a href="https://gopeed.com/api/download?tpl=Gopeed-$version-linux-x86_64.AppImage">📥</a></td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>🤖 Android</td>
|
||||
<td><code>APK</code></td>
|
||||
<td>universal</td>
|
||||
<td><a href="https://gopeed.com/api/download?tpl=Gopeed-$version-android.apk">📥</a></td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>📱 iOS</td>
|
||||
<td><code>IPA</code></td>
|
||||
<td>universal</td>
|
||||
<td><a href="https://gopeed.com/api/download?tpl=Gopeed-$version-ios.ipa">📥</a></td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>🐳 Docker</td>
|
||||
<td>-</td>
|
||||
<td>universal</td>
|
||||
<td><a href="https://hub.docker.com/r/liwei2633/gopeed">📥</a></td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td rowspan="2">💾 Qnap</td>
|
||||
<td rowspan="2"><code>QPKG</code></td>
|
||||
<td>amd64</td>
|
||||
<td><a href="https://gopeed.com/api/download?tpl=gopeed-$version-qnap-amd64.qpkg">📥</a></td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>arm64</td>
|
||||
<td><a href="https://gopeed.com/api/download?tpl=gopeed-$version-qnap-arm64.qpkg">📥</a></td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td rowspan="8">🌐 Web</td>
|
||||
<td rowspan="3"><code>Windows</code></td>
|
||||
<td>amd64</td>
|
||||
<td><a href="https://gopeed.com/api/download?tpl=gopeed-web-$version-windows-amd64.zip">📥</a></td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>arm64</td>
|
||||
<td><a href="https://gopeed.com/api/download?tpl=gopeed-web-$version-windows-arm64.zip">📥</a></td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>386</td>
|
||||
<td><a href="https://gopeed.com/api/download?tpl=gopeed-web-$version-windows-386.zip">📥</a></td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td rowspan="2"><code>MacOS</code></td>
|
||||
<td>amd64</td>
|
||||
<td><a href="https://gopeed.com/api/download?tpl=gopeed-web-$version-macos-amd64.zip">📥</a></td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>arm64</td>
|
||||
<td><a href="https://gopeed.com/api/download?tpl=gopeed-web-$version-macos-arm64.zip">📥</a></td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td rowspan="3"><code>Linux</code></td>
|
||||
<td>amd64</td>
|
||||
<td><a href="https://gopeed.com/api/download?tpl=gopeed-web-$version-linux-amd64.zip">📥</a></td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>arm64</td>
|
||||
<td><a href="https://gopeed.com/api/download?tpl=gopeed-web-$version-linux-arm64.zip">📥</a></td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>386</td>
|
||||
<td><a href="https://gopeed.com/api/download?tpl=gopeed-web-$version-linux-386.zip">📥</a></td>
|
||||
</tr>
|
||||
</tbody>
|
||||
</table>
|
||||
|
||||
インストールについての詳細は、[インストール](https://docs.gopeed.com/install.html)を参照してください。
|
||||
|
||||
## 寄付
|
||||
### 🛠️ コマンドツール
|
||||
|
||||
## 💝 寄付
|
||||
|
||||
もしこのプロジェクトがお気に召しましたら、このプロジェクトの発展を支援するために[寄付](https://docs.gopeed.com/donate.html)をご検討ください!
|
||||
|
||||
## ショーケース
|
||||
## 🖼️ ショーケース
|
||||
|
||||

|
||||
|
||||
## 開発
|
||||
## 👨💻 開発
|
||||
|
||||
このプロジェクトは二つの部分に分かれており、フロントエンドでは `flutter` を、バックエンドでは `Golang` を使用し、両者は `http` プロトコルで通信する。ユニックスシステムでは `unix socket` を、ウィンドウズシステムでは `tcp` プロトコルを使用します。
|
||||
|
||||
> フロントコードは `ui/flutter` ディレクトリにあります。
|
||||
|
||||
### 環境
|
||||
### 🌍 環境
|
||||
|
||||
1. Go 言語 1.23+
|
||||
2. Flutter 3.24+
|
||||
|
||||
### クローン
|
||||
### 📋 クローン
|
||||
|
||||
```bash
|
||||
git clone [email protected]:GopeedLab/gopeed.git
|
||||
```
|
||||
|
||||
### コントリビュート
|
||||
### 🤝 コントリビュート
|
||||
|
||||
[CONTRIBUTING.md](/CONTRIBUTING_ja-JP.md) をご参照ください
|
||||
|
||||
### ビルド
|
||||
### 🏗️ ビルド
|
||||
|
||||
#### デスクトップ
|
||||
|
||||
@@ -202,7 +234,7 @@ 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
|
||||
```
|
||||
|
||||
## 感謝
|
||||
## ❤️ 感謝
|
||||
|
||||
### コントリビューター
|
||||
|
||||
|
||||
+108
-78
@@ -13,94 +13,124 @@
|
||||
|
||||
[English](/README.md) | [中文](/README_zh-CN.md) | [日本語](/README_ja-JP.md) | [正體中文](/README_zh-TW.md) | [Tiếng Việt](/README_vi-VN.md)
|
||||
|
||||
## Giới thiệu
|
||||
## 🚀 Giới thiệu
|
||||
|
||||
Gopeed (tên đầy đủ Go Speed), một công cụ tải xuống tốc độ cao được phát triển bởi `Golang` + `Flutter`, hỗ trợ giao thức (HTTP, BitTorrent, Magnet) và hỗ trợ tất cả các nền tảng. Ngoài các chức năng tải xuống cơ bản, Gopeed còn là một công cụ tải xuống có thể tùy chỉnh cao cho phép triển khai thêm tính năng thông qua việc tích hợp với [APIs](https://docs.gopeed.com/dev-api.html) hoặc cài đặt và phát triển các [tiện ích mở rộng](https://docs.gopeed.com/dev-extension.html).
|
||||
|
||||
Truy cập ✈ [Trang web chính thức](https://gopeed.com) | 📖 [Tài liệu chính thức](https://docs.gopeed.com)
|
||||
|
||||
## Tải về
|
||||
## ⬇️ Tải về
|
||||
|
||||
<table>
|
||||
<thead>
|
||||
<tr>
|
||||
<th colspan="2">Windows</th>
|
||||
<th>MacOS</th>
|
||||
<th colspan="4">Linux</th>
|
||||
<th>Android</th>
|
||||
<th>iOS</th>
|
||||
<th>Docker</th>
|
||||
<th colspan="2">Qnap</th>
|
||||
<th colspan="8">Web</th>
|
||||
</tr>
|
||||
<tr>
|
||||
<td><code>EXE</code></td>
|
||||
<td><code>Portable</code></td>
|
||||
<td><code>DMG</code></td>
|
||||
<td><code>Flathub</code></td>
|
||||
<td><code>SNAP</code></td>
|
||||
<td><code>DEB</code></td>
|
||||
<td><code>AppImage</code></td>
|
||||
<td><code>APK</code></td>
|
||||
<td><code>IPA</code></td>
|
||||
<td>-</td>
|
||||
<td colspan="2"><code>QPKG</code></td>
|
||||
<td colspan="3"><code>Windows</code></td>
|
||||
<td colspan="2"><code>MacOS</code></td>
|
||||
<td colspan="3"><code>Linux</code></td>
|
||||
</tr>
|
||||
</thead>
|
||||
<tbody>
|
||||
<tr>
|
||||
<td rowspan="2">🪟 Windows</td>
|
||||
<td><code>EXE</code></td>
|
||||
<td>amd64</td>
|
||||
<td>amd64</td>
|
||||
<td>-</td>
|
||||
<td>amd64</td>
|
||||
<td>amd64</td>
|
||||
<td>amd64</td>
|
||||
<td>amd64</td>
|
||||
<td>-</td>
|
||||
<td>-</td>
|
||||
<td>-</td>
|
||||
<td>amd64</td>
|
||||
<td>arm64</td>
|
||||
<td>amd64</td>
|
||||
<td>amd64</td>
|
||||
<td>386</td>
|
||||
<td>amd64</td>
|
||||
<td>amd64</td>
|
||||
<td>amd64</td>
|
||||
<td>amd64</td>
|
||||
<td>386</td>
|
||||
<td><a href="https://gopeed.com/api/download?tpl=Gopeed-$version-windows-amd64.zip">📥</a></td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td><a href="https://gopeed.com/api/download?tpl=Gopeed-$version-windows-amd64.zip">Liên kết</a></td>
|
||||
<td><a href="https://gopeed.com/api/download?tpl=Gopeed-$version-windows-amd64-portable.zip">Liên kết</a></td>
|
||||
<td><a href="https://gopeed.com/api/download?tpl=Gopeed-$version-macos.dmg">Liên kết</a></td>
|
||||
<td><a href="https://flathub.org/apps/com.gopeed.Gopeed">Liên kết</a></td>
|
||||
<td><a href="https://snapcraft.io/gopeed">Liên kết</a></td>
|
||||
<td><a href="https://gopeed.com/api/download?tpl=Gopeed-$version-linux-amd64.deb">Liên kết</a></td>
|
||||
<td><a href="https://gopeed.com/api/download?tpl=Gopeed-$version-linux-x86_64.AppImage">Liên kết</a></td>
|
||||
<td><a href="https://gopeed.com/api/download?tpl=Gopeed-$version-android.apk">Liên kết</a></td>
|
||||
<td><a href="https://gopeed.com/api/download?tpl=Gopeed-$version-ios.ipa">Liên kết</a></td>
|
||||
<td><a href="https://hub.docker.com/r/liwei2633/gopeed">Liên kết</a></td>
|
||||
<td><a href="https://gopeed.com/api/download?tpl=gopeed-$version-qnap-amd64.qpkg">Liên kết</a></td>
|
||||
<td><a href="https://gopeed.com/api/download?tpl=gopeed-$version-qnap-arm64.qpkg">Liên kết</a></td>
|
||||
<td><a href="https://gopeed.com/api/download?tpl=gopeed-web-$version-windows-amd64.zip">Liên kết</a></td>
|
||||
<td><a href="https://gopeed.com/api/download?tpl=gopeed-web-$version-windows-arm64.zip">Liên kết</a></td>
|
||||
<td><a href="https://gopeed.com/api/download?tpl=gopeed-web-$version-windows-386.zip">Liên kết</a></td>
|
||||
<td><a href="https://gopeed.com/api/download?tpl=gopeed-web-$version-macos-amd64.zip">Liên kết</a></td>
|
||||
<td><a href="https://gopeed.com/api/download?tpl=gopeed-web-$version-macos-arm64.zip">Liên kết</a></td>
|
||||
<td><a href="https://gopeed.com/api/download?tpl=gopeed-web-$version-linux-amd64.zip">Liên kết</a></td>
|
||||
<td><a href="https://gopeed.com/api/download?tpl=gopeed-web-$version-linux-arm64.zip">Liên kết</a></td>
|
||||
<td><a href="https://gopeed.com/api/download?tpl=gopeed-web-$version-linux-386.zip">Liên kết</a></td>
|
||||
<td><code>Portable</code></td>
|
||||
<td>amd64</td>
|
||||
<td><a href="https://gopeed.com/api/download?tpl=Gopeed-$version-windows-amd64-portable.zip">📥</a></td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>🍎 MacOS</td>
|
||||
<td><code>DMG</code></td>
|
||||
<td>universal</td>
|
||||
<td><a href="https://gopeed.com/api/download?tpl=Gopeed-$version-macos.dmg">📥</a></td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td rowspan="4">🐧 Linux</td>
|
||||
<td><code>Flathub</code></td>
|
||||
<td>amd64</td>
|
||||
<td><a href="https://flathub.org/apps/com.gopeed.Gopeed">📥</a></td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td><code>SNAP</code></td>
|
||||
<td>amd64</td>
|
||||
<td><a href="https://snapcraft.io/gopeed">📥</a></td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td><code>DEB</code></td>
|
||||
<td>amd64</td>
|
||||
<td><a href="https://gopeed.com/api/download?tpl=Gopeed-$version-linux-amd64.deb">📥</a></td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td><code>AppImage</code></td>
|
||||
<td>amd64</td>
|
||||
<td><a href="https://gopeed.com/api/download?tpl=Gopeed-$version-linux-x86_64.AppImage">📥</a></td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>🤖 Android</td>
|
||||
<td><code>APK</code></td>
|
||||
<td>universal</td>
|
||||
<td><a href="https://gopeed.com/api/download?tpl=Gopeed-$version-android.apk">📥</a></td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>📱 iOS</td>
|
||||
<td><code>IPA</code></td>
|
||||
<td>universal</td>
|
||||
<td><a href="https://gopeed.com/api/download?tpl=Gopeed-$version-ios.ipa">📥</a></td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>🐳 Docker</td>
|
||||
<td>-</td>
|
||||
<td>universal</td>
|
||||
<td><a href="https://hub.docker.com/r/liwei2633/gopeed">📥</a></td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td rowspan="2">💾 Qnap</td>
|
||||
<td rowspan="2"><code>QPKG</code></td>
|
||||
<td>amd64</td>
|
||||
<td><a href="https://gopeed.com/api/download?tpl=gopeed-$version-qnap-amd64.qpkg">📥</a></td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>arm64</td>
|
||||
<td><a href="https://gopeed.com/api/download?tpl=gopeed-$version-qnap-arm64.qpkg">📥</a></td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td rowspan="8">🌐 Web</td>
|
||||
<td rowspan="3"><code>Windows</code></td>
|
||||
<td>amd64</td>
|
||||
<td><a href="https://gopeed.com/api/download?tpl=gopeed-web-$version-windows-amd64.zip">📥</a></td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>arm64</td>
|
||||
<td><a href="https://gopeed.com/api/download?tpl=gopeed-web-$version-windows-arm64.zip">📥</a></td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>386</td>
|
||||
<td><a href="https://gopeed.com/api/download?tpl=gopeed-web-$version-windows-386.zip">📥</a></td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td rowspan="2"><code>MacOS</code></td>
|
||||
<td>amd64</td>
|
||||
<td><a href="https://gopeed.com/api/download?tpl=gopeed-web-$version-macos-amd64.zip">📥</a></td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>arm64</td>
|
||||
<td><a href="https://gopeed.com/api/download?tpl=gopeed-web-$version-macos-arm64.zip">📥</a></td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td rowspan="3"><code>Linux</code></td>
|
||||
<td>amd64</td>
|
||||
<td><a href="https://gopeed.com/api/download?tpl=gopeed-web-$version-linux-amd64.zip">📥</a></td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>arm64</td>
|
||||
<td><a href="https://gopeed.com/api/download?tpl=gopeed-web-$version-linux-arm64.zip">📥</a></td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>386</td>
|
||||
<td><a href="https://gopeed.com/api/download?tpl=gopeed-web-$version-linux-386.zip">📥</a></td>
|
||||
</tr>
|
||||
</tbody>
|
||||
</table>
|
||||
|
||||
Thêm thông tin về cài đặt, vui lòng tham khảo [Cài đặt](https://docs.gopeed.com/install.html)
|
||||
|
||||
### Command tool
|
||||
### 🛠️ Công cụ lệnh
|
||||
|
||||
Sử dụng `go install`:
|
||||
|
||||
@@ -108,36 +138,36 @@ Sử dụng `go install`:
|
||||
go install github.com/GopeedLab/gopeed/cmd/gopeed@latest
|
||||
```
|
||||
|
||||
## Quyên góp
|
||||
## 💝 Quyên góp
|
||||
|
||||
Nếu bạn thích dự án này, xin vui lòng xem xét [quyên góp](https://docs.gopeed.com/donate.html) để hỗ trợ phát triển dự án này, cảm ơn bạn!
|
||||
|
||||
## Trưng bày
|
||||
## 🖼️ Trưng bày
|
||||
|
||||

|
||||
|
||||
## Development
|
||||
## 👨💻 Development
|
||||
|
||||
Dự án này được chia thành hai phần, phần giao diện sử dụng `flutter`, phần backend sử dụng `Golang`, và hai phía giao tiếp thông qua giao thức `http`. Trên hệ thống unix, sử dụng `unix socket`, và trên hệ thống windows, sử dụng giao thức `tcp`.
|
||||
|
||||
> Mã giao diện nằm trong thư mục `ui/flutter`.
|
||||
|
||||
### Environment
|
||||
### 🌍 Environment
|
||||
|
||||
1. Golang 1.23+
|
||||
2. Flutter 3.24+
|
||||
|
||||
### Clone
|
||||
### 📋 Clone
|
||||
|
||||
```bash
|
||||
git clone [email protected]:GopeedLab/gopeed.git
|
||||
```
|
||||
|
||||
### Đóng góp
|
||||
### 🤝 Đóng góp
|
||||
|
||||
Vui lòng tham khảo [CONTRIBUTING_vi-VN.md](/CONTRIBUTING_vi-VN.md)
|
||||
|
||||
### Xây dựng
|
||||
### 🏗️ Xây dựng
|
||||
|
||||
#### Desktop
|
||||
|
||||
@@ -210,7 +240,7 @@ 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
|
||||
```
|
||||
|
||||
## Tín dụng
|
||||
## ❤️ Tín dụng
|
||||
|
||||
### Người đóng góp
|
||||
|
||||
|
||||
+109
-79
@@ -13,94 +13,124 @@
|
||||
|
||||
[English](/README.md) | [中文](/README_zh-CN.md) | [日本語](/README_ja-JP.md) | [正體中文](/README_zh-TW.md) | [Tiếng Việt](/README_vi-VN.md)
|
||||
|
||||
## 介绍
|
||||
## 🚀 介绍
|
||||
|
||||
Gopeed(全称 Go Speed),直译过来中文名叫做`够快下载器`(不是狗屁下载器!),是一款由`Golang`+`Flutter`开发的高速下载器,支持(HTTP、BitTorrent、Magnet)协议下载,并且支持全平台使用。除了基本的下载功能外,Gopeed 还是一款高度可定制化的下载器,支持通过对接[APIs](https://docs.gopeed.com/zh/dev-api.html)或者安装和开发[扩展](https://docs.gopeed.com/zh/dev-extension.html)来实现更多的功能。
|
||||
|
||||
访问 ✈ [官方网站](https://gopeed.com/zh-CN) | 📖 [官方文档](https://docs.gopeed.com/zh/)
|
||||
|
||||
## 下载
|
||||
## ⬇️ 下载
|
||||
|
||||
<table>
|
||||
<thead>
|
||||
<tr>
|
||||
<th colspan="2">Windows</th>
|
||||
<th>MacOS</th>
|
||||
<th colspan="4">Linux</th>
|
||||
<th>Android</th>
|
||||
<th>iOS</th>
|
||||
<th>Docker</th>
|
||||
<th colspan="2">Qnap</th>
|
||||
<th colspan="8">Web</th>
|
||||
</tr>
|
||||
<tr>
|
||||
<td><code>EXE</code></td>
|
||||
<td><code>Portable</code></td>
|
||||
<td><code>DMG</code></td>
|
||||
<td><code>Flathub</code></td>
|
||||
<td><code>SNAP</code></td>
|
||||
<td><code>DEB</code></td>
|
||||
<td><code>AppImage</code></td>
|
||||
<td><code>APK</code></td>
|
||||
<td><code>IPA</code></td>
|
||||
<td>-</td>
|
||||
<td colspan="2"><code>QPKG</code></td>
|
||||
<td colspan="3"><code>Windows</code></td>
|
||||
<td colspan="2"><code>MacOS</code></td>
|
||||
<td colspan="3"><code>Linux</code></td>
|
||||
</tr>
|
||||
</thead>
|
||||
<tbody>
|
||||
<tr>
|
||||
<td rowspan="2">🪟 Windows</td>
|
||||
<td><code>EXE</code></td>
|
||||
<td>amd64</td>
|
||||
<td>amd64</td>
|
||||
<td>-</td>
|
||||
<td>amd64</td>
|
||||
<td>amd64</td>
|
||||
<td>amd64</td>
|
||||
<td>amd64</td>
|
||||
<td>-</td>
|
||||
<td>-</td>
|
||||
<td>-</td>
|
||||
<td>amd64</td>
|
||||
<td>arm64</td>
|
||||
<td>amd64</td>
|
||||
<td>amd64</td>
|
||||
<td>386</td>
|
||||
<td>amd64</td>
|
||||
<td>amd64</td>
|
||||
<td>amd64</td>
|
||||
<td>amd64</td>
|
||||
<td>386</td>
|
||||
<td><a href="https://gopeed.com/api/download?tpl=Gopeed-$version-windows-amd64.zip">📥</a></td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td><a href="https://gopeed.com/api/download?tpl=Gopeed-$version-windows-amd64.zip">前往</a></td>
|
||||
<td><a href="https://gopeed.com/api/download?tpl=Gopeed-$version-windows-amd64-portable.zip">前往</a></td>
|
||||
<td><a href="https://gopeed.com/api/download?tpl=Gopeed-$version-macos.dmg">前往</a></td>
|
||||
<td><a href="https://flathub.org/apps/com.gopeed.Gopeed">前往</a></td>
|
||||
<td><a href="https://snapcraft.io/gopeed">前往</a></td>
|
||||
<td><a href="https://gopeed.com/api/download?tpl=Gopeed-$version-linux-amd64.deb">前往</a></td>
|
||||
<td><a href="https://gopeed.com/api/download?tpl=Gopeed-$version-linux-x86_64.AppImage">前往</a></td>
|
||||
<td><a href="https://gopeed.com/api/download?tpl=Gopeed-$version-android.apk">前往</a></td>
|
||||
<td><a href="https://gopeed.com/api/download?tpl=Gopeed-$version-ios.ipa">前往</a></td>
|
||||
<td><a href="https://hub.docker.com/r/liwei2633/gopeed">前往</a></td>
|
||||
<td><a href="https://gopeed.com/api/download?tpl=gopeed-$version-qnap-amd64.qpkg">前往</a></td>
|
||||
<td><a href="https://gopeed.com/api/download?tpl=gopeed-$version-qnap-arm64.qpkg">前往</a></td>
|
||||
<td><a href="https://gopeed.com/api/download?tpl=gopeed-web-$version-windows-amd64.zip">前往</a></td>
|
||||
<td><a href="https://gopeed.com/api/download?tpl=gopeed-web-$version-windows-arm64.zip">前往</a></td>
|
||||
<td><a href="https://gopeed.com/api/download?tpl=gopeed-web-$version-windows-386.zip">前往</a></td>
|
||||
<td><a href="https://gopeed.com/api/download?tpl=gopeed-web-$version-macos-amd64.zip">前往</a></td>
|
||||
<td><a href="https://gopeed.com/api/download?tpl=gopeed-web-$version-macos-arm64.zip">前往</a></td>
|
||||
<td><a href="https://gopeed.com/api/download?tpl=gopeed-web-$version-linux-amd64.zip">前往</a></td>
|
||||
<td><a href="https://gopeed.com/api/download?tpl=gopeed-web-$version-linux-arm64.zip">前往</a></td>
|
||||
<td><a href="https://gopeed.com/api/download?tpl=gopeed-web-$version-linux-386.zip">前往</a></td>
|
||||
<td><code>Portable</code></td>
|
||||
<td>amd64</td>
|
||||
<td><a href="https://gopeed.com/api/download?tpl=Gopeed-$version-windows-amd64-portable.zip">📥</a></td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>🍎 MacOS</td>
|
||||
<td><code>DMG</code></td>
|
||||
<td>universal</td>
|
||||
<td><a href="https://gopeed.com/api/download?tpl=Gopeed-$version-macos.dmg">📥</a></td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td rowspan="4">🐧 Linux</td>
|
||||
<td><code>Flathub</code></td>
|
||||
<td>amd64</td>
|
||||
<td><a href="https://flathub.org/apps/com.gopeed.Gopeed">📥</a></td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td><code>SNAP</code></td>
|
||||
<td>amd64</td>
|
||||
<td><a href="https://snapcraft.io/gopeed">📥</a></td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td><code>DEB</code></td>
|
||||
<td>amd64</td>
|
||||
<td><a href="https://gopeed.com/api/download?tpl=Gopeed-$version-linux-amd64.deb">📥</a></td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td><code>AppImage</code></td>
|
||||
<td>amd64</td>
|
||||
<td><a href="https://gopeed.com/api/download?tpl=Gopeed-$version-linux-x86_64.AppImage">📥</a></td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>🤖 Android</td>
|
||||
<td><code>APK</code></td>
|
||||
<td>universal</td>
|
||||
<td><a href="https://gopeed.com/api/download?tpl=Gopeed-$version-android.apk">📥</a></td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>📱 iOS</td>
|
||||
<td><code>IPA</code></td>
|
||||
<td>universal</td>
|
||||
<td><a href="https://gopeed.com/api/download?tpl=Gopeed-$version-ios.ipa">📥</a></td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>🐳 Docker</td>
|
||||
<td>-</td>
|
||||
<td>universal</td>
|
||||
<td><a href="https://hub.docker.com/r/liwei2633/gopeed">📥</a></td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td rowspan="2">💾 Qnap</td>
|
||||
<td rowspan="2"><code>QPKG</code></td>
|
||||
<td>amd64</td>
|
||||
<td><a href="https://gopeed.com/api/download?tpl=gopeed-$version-qnap-amd64.qpkg">📥</a></td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>arm64</td>
|
||||
<td><a href="https://gopeed.com/api/download?tpl=gopeed-$version-qnap-arm64.qpkg">📥</a></td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td rowspan="8">🌐 Web</td>
|
||||
<td rowspan="3"><code>Windows</code></td>
|
||||
<td>amd64</td>
|
||||
<td><a href="https://gopeed.com/api/download?tpl=gopeed-web-$version-windows-amd64.zip">📥</a></td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>arm64</td>
|
||||
<td><a href="https://gopeed.com/api/download?tpl=gopeed-web-$version-windows-arm64.zip">📥</a></td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>386</td>
|
||||
<td><a href="https://gopeed.com/api/download?tpl=gopeed-web-$version-windows-386.zip">📥</a></td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td rowspan="2"><code>MacOS</code></td>
|
||||
<td>amd64</td>
|
||||
<td><a href="https://gopeed.com/api/download?tpl=gopeed-web-$version-macos-amd64.zip">📥</a></td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>arm64</td>
|
||||
<td><a href="https://gopeed.com/api/download?tpl=gopeed-web-$version-macos-arm64.zip">📥</a></td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td rowspan="3"><code>Linux</code></td>
|
||||
<td>amd64</td>
|
||||
<td><a href="https://gopeed.com/api/download?tpl=gopeed-web-$version-linux-amd64.zip">📥</a></td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>arm64</td>
|
||||
<td><a href="https://gopeed.com/api/download?tpl=gopeed-web-$version-linux-arm64.zip">📥</a></td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>386</td>
|
||||
<td><a href="https://gopeed.com/api/download?tpl=gopeed-web-$version-linux-386.zip">📥</a></td>
|
||||
</tr>
|
||||
</tbody>
|
||||
</table>
|
||||
|
||||
更多关于安装的内容请参考[安装文档](https://docs.gopeed.com/zh/install.html)
|
||||
|
||||
### 命令行工具
|
||||
### 🛠️ 命令行工具
|
||||
|
||||
使用`go install`安装:
|
||||
|
||||
@@ -108,40 +138,40 @@ Gopeed(全称 Go Speed),直译过来中文名叫做`够快下载器`(不
|
||||
go install github.com/GopeedLab/gopeed/cmd/gopeed@latest
|
||||
```
|
||||
|
||||
## 浏览器扩展
|
||||
## 🔌 浏览器扩展
|
||||
|
||||
Gopeed 还提供了浏览器扩展用于接管浏览器下载,支持 Chrome、Edge、Firefox 等浏览器,具体请参考:[https://github.com/GopeedLab/browser-extension](https://github.com/GopeedLab/browser-extension)
|
||||
|
||||
## 赞助
|
||||
## 💝 赞助
|
||||
|
||||
如果觉得项目对你有帮助,请考虑[赞助](https://docs.gopeed.com/zh/donate)以支持这个项目的发展,非常感谢!
|
||||
|
||||
## 界面展示
|
||||
## 🖼️ 界面展示
|
||||
|
||||

|
||||
|
||||
## 开发
|
||||
## 👨💻 开发
|
||||
|
||||
本项目分为前端和后端两个部分,前端使用`flutter`,后端使用`Golang`,两边通过`http`协议进行通讯,在 unix 系统下,使用的是`unix socket`,在 windows 系统下,使用的是`tcp`协议。
|
||||
|
||||
> 前端代码位于`ui/flutter`目录下。
|
||||
|
||||
### 环境要求
|
||||
### 🌍 环境要求
|
||||
|
||||
1. Golang 1.23+
|
||||
2. Flutter 3.24+
|
||||
|
||||
### 克隆项目
|
||||
### 📋 克隆项目
|
||||
|
||||
```bash
|
||||
git clone [email protected]:GopeedLab/gopeed.git
|
||||
```
|
||||
|
||||
### 贡献代码
|
||||
### 🤝 贡献代码
|
||||
|
||||
请参考[贡献指南](CONTRIBUTING_zh-CN.md)
|
||||
|
||||
### 编译
|
||||
### 🏗️ 编译
|
||||
|
||||
#### 桌面端
|
||||
|
||||
@@ -214,7 +244,7 @@ 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
|
||||
```
|
||||
|
||||
## 感谢
|
||||
## ❤️ 感谢
|
||||
|
||||
### 贡献者
|
||||
|
||||
|
||||
+108
-78
@@ -13,94 +13,124 @@
|
||||
|
||||
[English](/README.md) | [中文](/README_zh-CN.md) | [日本語](/README_ja-JP.md) | [正體中文](/README_zh-TW.md) | [Tiếng Việt](/README_vi-VN.md)
|
||||
|
||||
## 簡介
|
||||
## 🚀 簡介
|
||||
|
||||
Gopeed(全稱 Go Speed),是一款使用`Golang`+`Flutter`編寫的高速下載軟體,支援(HTTP、BitTorrent、Magnet)協定,同時支援所有的平台。
|
||||
|
||||
前往 ✈ [主頁](https://gopeed.com/zh-CN) | 📖 [文檔](https://docs.gopeed.com/zh/)
|
||||
|
||||
## 下載
|
||||
## ⬇️ 下載
|
||||
|
||||
<table>
|
||||
<thead>
|
||||
<tr>
|
||||
<th colspan="2">Windows</th>
|
||||
<th>MacOS</th>
|
||||
<th colspan="4">Linux</th>
|
||||
<th>Android</th>
|
||||
<th>iOS</th>
|
||||
<th>Docker</th>
|
||||
<th colspan="2">Qnap</th>
|
||||
<th colspan="8">Web</th>
|
||||
</tr>
|
||||
<tr>
|
||||
<td><code>EXE</code></td>
|
||||
<td><code>Portable</code></td>
|
||||
<td><code>DMG</code></td>
|
||||
<td><code>Flathub</code></td>
|
||||
<td><code>SNAP</code></td>
|
||||
<td><code>DEB</code></td>
|
||||
<td><code>AppImage</code></td>
|
||||
<td><code>APK</code></td>
|
||||
<td><code>IPA</code></td>
|
||||
<td>-</td>
|
||||
<td colspan="2"><code>QPKG</code></td>
|
||||
<td colspan="3"><code>Windows</code></td>
|
||||
<td colspan="2"><code>MacOS</code></td>
|
||||
<td colspan="3"><code>Linux</code></td>
|
||||
</tr>
|
||||
</thead>
|
||||
<tbody>
|
||||
<tr>
|
||||
<td rowspan="2">🪟 Windows</td>
|
||||
<td><code>EXE</code></td>
|
||||
<td>amd64</td>
|
||||
<td>amd64</td>
|
||||
<td>-</td>
|
||||
<td>amd64</td>
|
||||
<td>amd64</td>
|
||||
<td>amd64</td>
|
||||
<td>amd64</td>
|
||||
<td>-</td>
|
||||
<td>-</td>
|
||||
<td>-</td>
|
||||
<td>amd64</td>
|
||||
<td>arm64</td>
|
||||
<td>amd64</td>
|
||||
<td>amd64</td>
|
||||
<td>386</td>
|
||||
<td>amd64</td>
|
||||
<td>amd64</td>
|
||||
<td>amd64</td>
|
||||
<td>amd64</td>
|
||||
<td>386</td>
|
||||
<td><a href="https://gopeed.com/api/download?tpl=Gopeed-$version-windows-amd64.zip">📥</a></td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td><a href="https://gopeed.com/api/download?tpl=Gopeed-$version-windows-amd64.zip">前往</a></td>
|
||||
<td><a href="https://gopeed.com/api/download?tpl=Gopeed-$version-windows-amd64-portable.zip">前往</a></td>
|
||||
<td><a href="https://gopeed.com/api/download?tpl=Gopeed-$version-macos.dmg">前往</a></td>
|
||||
<td><a href="https://flathub.org/apps/com.gopeed.Gopeed">前往</a></td>
|
||||
<td><a href="https://snapcraft.io/gopeed">前往</a></td>
|
||||
<td><a href="https://gopeed.com/api/download?tpl=Gopeed-$version-linux-amd64.deb">前往</a></td>
|
||||
<td><a href="https://gopeed.com/api/download?tpl=Gopeed-$version-linux-x86_64.AppImage">前往</a></td>
|
||||
<td><a href="https://gopeed.com/api/download?tpl=Gopeed-$version-android.apk">前往</a></td>
|
||||
<td><a href="https://gopeed.com/api/download?tpl=Gopeed-$version-ios.ipa">前往</a></td>
|
||||
<td><a href="https://hub.docker.com/r/liwei2633/gopeed">前往</a></td>
|
||||
<td><a href="https://gopeed.com/api/download?tpl=gopeed-$version-qnap-amd64.qpkg">前往</a></td>
|
||||
<td><a href="https://gopeed.com/api/download?tpl=gopeed-$version-qnap-arm64.qpkg">前往</a></td>
|
||||
<td><a href="https://gopeed.com/api/download?tpl=gopeed-web-$version-windows-amd64.zip">前往</a></td>
|
||||
<td><a href="https://gopeed.com/api/download?tpl=gopeed-web-$version-windows-arm64.zip">前往</a></td>
|
||||
<td><a href="https://gopeed.com/api/download?tpl=gopeed-web-$version-windows-386.zip">前往</a></td>
|
||||
<td><a href="https://gopeed.com/api/download?tpl=gopeed-web-$version-macos-amd64.zip">前往</a></td>
|
||||
<td><a href="https://gopeed.com/api/download?tpl=gopeed-web-$version-macos-arm64.zip">前往</a></td>
|
||||
<td><a href="https://gopeed.com/api/download?tpl=gopeed-web-$version-linux-amd64.zip">前往</a></td>
|
||||
<td><a href="https://gopeed.com/api/download?tpl=gopeed-web-$version-linux-arm64.zip">前往</a></td>
|
||||
<td><a href="https://gopeed.com/api/download?tpl=gopeed-web-$version-linux-386.zip">前往</a></td>
|
||||
<td><code>Portable</code></td>
|
||||
<td>amd64</td>
|
||||
<td><a href="https://gopeed.com/api/download?tpl=Gopeed-$version-windows-amd64-portable.zip">📥</a></td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>🍎 MacOS</td>
|
||||
<td><code>DMG</code></td>
|
||||
<td>universal</td>
|
||||
<td><a href="https://gopeed.com/api/download?tpl=Gopeed-$version-macos.dmg">📥</a></td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td rowspan="4">🐧 Linux</td>
|
||||
<td><code>Flathub</code></td>
|
||||
<td>amd64</td>
|
||||
<td><a href="https://flathub.org/apps/com.gopeed.Gopeed">📥</a></td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td><code>SNAP</code></td>
|
||||
<td>amd64</td>
|
||||
<td><a href="https://snapcraft.io/gopeed">📥</a></td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td><code>DEB</code></td>
|
||||
<td>amd64</td>
|
||||
<td><a href="https://gopeed.com/api/download?tpl=Gopeed-$version-linux-amd64.deb">📥</a></td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td><code>AppImage</code></td>
|
||||
<td>amd64</td>
|
||||
<td><a href="https://gopeed.com/api/download?tpl=Gopeed-$version-linux-x86_64.AppImage">📥</a></td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>🤖 Android</td>
|
||||
<td><code>APK</code></td>
|
||||
<td>universal</td>
|
||||
<td><a href="https://gopeed.com/api/download?tpl=Gopeed-$version-android.apk">📥</a></td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>📱 iOS</td>
|
||||
<td><code>IPA</code></td>
|
||||
<td>universal</td>
|
||||
<td><a href="https://gopeed.com/api/download?tpl=Gopeed-$version-ios.ipa">📥</a></td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>🐳 Docker</td>
|
||||
<td>-</td>
|
||||
<td>universal</td>
|
||||
<td><a href="https://hub.docker.com/r/liwei2633/gopeed">📥</a></td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td rowspan="2">💾 Qnap</td>
|
||||
<td rowspan="2"><code>QPKG</code></td>
|
||||
<td>amd64</td>
|
||||
<td><a href="https://gopeed.com/api/download?tpl=gopeed-$version-qnap-amd64.qpkg">📥</a></td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>arm64</td>
|
||||
<td><a href="https://gopeed.com/api/download?tpl=gopeed-$version-qnap-arm64.qpkg">📥</a></td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td rowspan="8">🌐 Web</td>
|
||||
<td rowspan="3"><code>Windows</code></td>
|
||||
<td>amd64</td>
|
||||
<td><a href="https://gopeed.com/api/download?tpl=gopeed-web-$version-windows-amd64.zip">📥</a></td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>arm64</td>
|
||||
<td><a href="https://gopeed.com/api/download?tpl=gopeed-web-$version-windows-arm64.zip">📥</a></td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>386</td>
|
||||
<td><a href="https://gopeed.com/api/download?tpl=gopeed-web-$version-windows-386.zip">📥</a></td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td rowspan="2"><code>MacOS</code></td>
|
||||
<td>amd64</td>
|
||||
<td><a href="https://gopeed.com/api/download?tpl=gopeed-web-$version-macos-amd64.zip">📥</a></td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>arm64</td>
|
||||
<td><a href="https://gopeed.com/api/download?tpl=gopeed-web-$version-macos-arm64.zip">📥</a></td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td rowspan="3"><code>Linux</code></td>
|
||||
<td>amd64</td>
|
||||
<td><a href="https://gopeed.com/api/download?tpl=gopeed-web-$version-linux-amd64.zip">📥</a></td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>arm64</td>
|
||||
<td><a href="https://gopeed.com/api/download?tpl=gopeed-web-$version-linux-arm64.zip">📥</a></td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>386</td>
|
||||
<td><a href="https://gopeed.com/api/download?tpl=gopeed-web-$version-linux-386.zip">📥</a></td>
|
||||
</tr>
|
||||
</tbody>
|
||||
</table>
|
||||
|
||||
更多關於安裝的內容請參考[安裝文檔](https://docs.gopeed.com/zh/install.html)
|
||||
|
||||
### 使用 CLI 安裝
|
||||
### 🛠️ 使用 CLI 安裝
|
||||
|
||||
使用`go install`安裝:
|
||||
|
||||
@@ -108,36 +138,36 @@ Gopeed(全稱 Go Speed),是一款使用`Golang`+`Flutter`編寫的高速
|
||||
go install github.com/GopeedLab/gopeed/cmd/gopeed@latest
|
||||
```
|
||||
|
||||
## 贊助
|
||||
## 💝 贊助
|
||||
|
||||
如果你認為該項目對你有所幫助,請考慮[贊助](https://docs.gopeed.com/zh/donate)以支持該項目的持續發展,謝謝!
|
||||
|
||||
## 軟體介面
|
||||
## 🖼️ 軟體介面
|
||||
|
||||

|
||||
|
||||
## 開發
|
||||
## 👨💻 開發
|
||||
|
||||
該項目分為前端與後端,前端使用`flutter`編寫,後端使用`Golang`編寫,兩邊通過`http`協定進行通訊,在 unix 系統下,則使用`unix socket`,在 windows 系統下,則使用`tcp`協定。
|
||||
|
||||
> 前端代碼位於`ui/flutter`目錄內。
|
||||
|
||||
### 開發環境
|
||||
### 🌍 開發環境
|
||||
|
||||
1. Golang 1.23+
|
||||
2. Flutter 3.24+
|
||||
|
||||
### 克隆項目
|
||||
### 📋 克隆項目
|
||||
|
||||
```bash
|
||||
git clone [email protected]:GopeedLab/gopeed.git
|
||||
```
|
||||
|
||||
### 協助開發
|
||||
### 🤝 協助開發
|
||||
|
||||
請參考[協助指南](CONTRIBUTING_zh-TW.md)
|
||||
|
||||
### 編譯
|
||||
### 🏗️ 編譯
|
||||
|
||||
#### 桌面端
|
||||
|
||||
@@ -210,7 +240,7 @@ 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
|
||||
```
|
||||
|
||||
## 感謝
|
||||
## ❤️ 感謝
|
||||
|
||||
### 貢獻者
|
||||
|
||||
|
||||
@@ -0,0 +1,123 @@
|
||||
package main
|
||||
|
||||
import (
|
||||
"encoding/binary"
|
||||
"encoding/json"
|
||||
"errors"
|
||||
"fmt"
|
||||
"io"
|
||||
"os"
|
||||
"strings"
|
||||
|
||||
"github.com/pkg/browser"
|
||||
"github.com/shirou/gopsutil/v4/process"
|
||||
)
|
||||
|
||||
const identifier = "gopeed"
|
||||
|
||||
type Message struct {
|
||||
Method string `json:"method"`
|
||||
Params json.RawMessage `json:"params"`
|
||||
}
|
||||
|
||||
type Response struct {
|
||||
Code int `json:"code"`
|
||||
Data any `json:"data,omitempty"`
|
||||
Message string `json:"message,omitempty"`
|
||||
}
|
||||
|
||||
var apiMap = map[string]func(params json.RawMessage) (data any, err error){
|
||||
"ping": func(params json.RawMessage) (data any, err error) {
|
||||
processes, err := process.Processes()
|
||||
if err != nil {
|
||||
return false, err
|
||||
}
|
||||
|
||||
for _, p := range processes {
|
||||
name, err := p.Name()
|
||||
if err != nil {
|
||||
continue
|
||||
}
|
||||
|
||||
if strings.Contains(strings.ToLower(name), strings.ToLower(identifier)) {
|
||||
return true, nil
|
||||
}
|
||||
}
|
||||
return false, nil
|
||||
},
|
||||
"create": func(params json.RawMessage) (data any, err error) {
|
||||
var strParams string
|
||||
if err = json.Unmarshal(params, &strParams); err != nil {
|
||||
return
|
||||
}
|
||||
err = browser.OpenURL(fmt.Sprintf("%s:///create?params=%s", identifier, strParams))
|
||||
return
|
||||
},
|
||||
}
|
||||
|
||||
func main() {
|
||||
for {
|
||||
// Read message length (first 4 bytes)
|
||||
var length uint32
|
||||
if err := binary.Read(os.Stdin, binary.NativeEndian, &length); err != nil {
|
||||
if err == io.EOF {
|
||||
// Connection closed by Chrome
|
||||
return
|
||||
}
|
||||
sendError("Failed to read message length: " + err.Error())
|
||||
return
|
||||
}
|
||||
|
||||
// Read the message
|
||||
input := make([]byte, length)
|
||||
if _, err := io.ReadFull(os.Stdin, input); err != nil {
|
||||
sendError("Failed to read message: " + err.Error())
|
||||
return
|
||||
}
|
||||
|
||||
// Parse message
|
||||
var message Message
|
||||
if err := json.Unmarshal(input, &message); err != nil {
|
||||
sendError("Failed to parse message: " + err.Error())
|
||||
return
|
||||
}
|
||||
|
||||
// Handle request
|
||||
var data any
|
||||
var err error
|
||||
if handler, ok := apiMap[message.Method]; ok {
|
||||
data, err = handler(message.Params)
|
||||
} else {
|
||||
err = errors.New("Unknown method: " + message.Method)
|
||||
}
|
||||
if err != nil {
|
||||
sendError(err.Error())
|
||||
continue
|
||||
}
|
||||
sendResponse(0, data, "")
|
||||
}
|
||||
}
|
||||
|
||||
func sendResponse(code int, data interface{}, message string) {
|
||||
response := Response{
|
||||
Code: code,
|
||||
Data: data,
|
||||
Message: message,
|
||||
}
|
||||
|
||||
// Encode response
|
||||
responseBytes, err := json.Marshal(response)
|
||||
if err != nil {
|
||||
sendError("Failed to encode response: " + err.Error())
|
||||
return
|
||||
}
|
||||
|
||||
// Write message length
|
||||
binary.Write(os.Stdout, binary.NativeEndian, uint32(len(responseBytes)))
|
||||
// Write message
|
||||
os.Stdout.Write(responseBytes)
|
||||
}
|
||||
|
||||
func sendError(msg string) {
|
||||
sendResponse(1, nil, msg)
|
||||
}
|
||||
@@ -24,6 +24,16 @@ require (
|
||||
golang.org/x/sync v0.9.0
|
||||
)
|
||||
|
||||
require (
|
||||
github.com/ebitengine/purego v0.8.1 // indirect
|
||||
github.com/go-ole/go-ole v1.2.6 // indirect
|
||||
github.com/lufia/plan9stats v0.0.0-20220913051719-115f729f3c8c // indirect
|
||||
github.com/power-devops/perfstat v0.0.0-20220216144756-c35f1ee13d7c // indirect
|
||||
github.com/tklauser/go-sysconf v0.3.12 // indirect
|
||||
github.com/tklauser/numcpus v0.6.1 // indirect
|
||||
github.com/yusufpapurcu/wmi v1.2.4 // indirect
|
||||
)
|
||||
|
||||
require (
|
||||
dario.cat/mergo v1.0.0 // indirect
|
||||
github.com/Microsoft/go-winio v0.6.1 // indirect
|
||||
@@ -99,9 +109,11 @@ require (
|
||||
github.com/pion/turn/v4 v4.0.0 // indirect
|
||||
github.com/pion/webrtc/v4 v4.0.2 // indirect
|
||||
github.com/pjbgf/sha1cd v0.3.0 // indirect
|
||||
github.com/pkg/browser v0.0.0-20240102092130-5ac0b6a4141c
|
||||
github.com/protolambda/ctxlock v0.1.0 // indirect
|
||||
github.com/remyoudompheng/bigfft v0.0.0-20230129092748-24d4a6f8daec // indirect
|
||||
github.com/sergi/go-diff v1.1.0 // indirect
|
||||
github.com/shirou/gopsutil/v4 v4.24.12
|
||||
github.com/skeema/knownhosts v1.2.0 // indirect
|
||||
github.com/spaolacci/murmur3 v1.1.0 // indirect
|
||||
github.com/tidwall/btree v1.7.0 // indirect
|
||||
@@ -113,7 +125,7 @@ require (
|
||||
golang.org/x/crypto v0.29.0 // indirect
|
||||
golang.org/x/mod v0.22.0 // indirect
|
||||
golang.org/x/net v0.31.0 // indirect
|
||||
golang.org/x/sys v0.27.0 // indirect
|
||||
golang.org/x/sys v0.28.0 // indirect
|
||||
golang.org/x/text v0.20.0 // indirect
|
||||
golang.org/x/time v0.8.0 // indirect
|
||||
golang.org/x/tools v0.27.0 // indirect
|
||||
|
||||
@@ -143,6 +143,8 @@ github.com/dustin/go-humanize v1.0.1/go.mod h1:Mu1zIs6XwVuF/gI1OepvI0qD18qycQx+m
|
||||
github.com/eapache/go-resiliency v1.1.0/go.mod h1:kFI+JgMyC7bLPUVY133qvEBtVayf5mFgVsvEsIPBvNs=
|
||||
github.com/eapache/go-xerial-snappy v0.0.0-20180814174437-776d5712da21/go.mod h1:+020luEh2TKB4/GOp8oxxtq0Daoen/Cii55CzbTV6DU=
|
||||
github.com/eapache/queue v1.1.0/go.mod h1:6eCeP0CKFpHLu8blIFXhExK/dRa7WDZfr6jVFPTqq+I=
|
||||
github.com/ebitengine/purego v0.8.1 h1:sdRKd6plj7KYW33EH5As6YKfe8m9zbN9JMrOjNVF/BE=
|
||||
github.com/ebitengine/purego v0.8.1/go.mod h1:iIjxzd6CiRiOG0UyXP+V1+jWqUXVjPKLAI0mRfJZTmQ=
|
||||
github.com/edsrzf/mmap-go v1.2.0 h1:hXLYlkbaPzt1SaQk+anYwKSRNhufIDCchSPkUD6dD84=
|
||||
github.com/edsrzf/mmap-go v1.2.0/go.mod h1:19H/e8pUPLicwkyNgOykDXkJ9F0MHE+Z52B8EIth78Q=
|
||||
github.com/elazarl/goproxy v0.0.0-20221015165544-a0805db90819 h1:RIB4cRk+lBqKK3Oy0r2gRX4ui7tuhiZq2SuTtTCi0/0=
|
||||
@@ -187,6 +189,8 @@ github.com/go-logr/logr v1.4.2 h1:6pFjapn8bFcIbiKo3XT4j/BhANplGihG6tvd+8rYgrY=
|
||||
github.com/go-logr/logr v1.4.2/go.mod h1:9T104GzyrTigFIr8wt5mBrctHMim0Nb2HLGrmQ40KvY=
|
||||
github.com/go-logr/stdr v1.2.2 h1:hSWxHoqTgW2S2qGc0LTAI563KZ5YKYRhT3MFKZMbjag=
|
||||
github.com/go-logr/stdr v1.2.2/go.mod h1:mMo/vtBO5dYbehREoey6XUKy/eSumjCCveDpRre4VKE=
|
||||
github.com/go-ole/go-ole v1.2.6 h1:/Fpf6oFPoeFik9ty7siob0G6Ke8QvQEuVcuChpwXzpY=
|
||||
github.com/go-ole/go-ole v1.2.6/go.mod h1:pprOEPIfldk/42T2oK7lQ4v4JSDwmV0As9GaiUsvbm0=
|
||||
github.com/go-quicktest/qt v1.101.0 h1:O1K29Txy5P2OK0dGo59b7b0LR6wKfIhttaAhHUyn7eI=
|
||||
github.com/go-quicktest/qt v1.101.0/go.mod h1:14Bz/f7NwaXPtdYEgzsx46kqSxVwTbzVZsDC26tQJow=
|
||||
github.com/go-sourcemap/sourcemap v2.1.4+incompatible h1:a+iTbH5auLKxaNwQFg0B+TCYl6lbukKPc7b5x0n1s6Q=
|
||||
@@ -288,6 +292,8 @@ github.com/kr/pty v1.1.1/go.mod h1:pFQYn66WHrOpPYNljwOMqo10TkYh1fy3cYio2l3bCsQ=
|
||||
github.com/kr/text v0.1.0/go.mod h1:4Jbv+DJW3UT/LiOwJeYQe1efqtUx/iVham/4vfdArNI=
|
||||
github.com/kr/text v0.2.0 h1:5Nx0Ya0ZqY2ygV366QzturHI13Jq95ApcVaJBhpS+AY=
|
||||
github.com/kr/text v0.2.0/go.mod h1:eLer722TekiGuMkidMxC/pM04lWEeraHUUmBw8l2grE=
|
||||
github.com/lufia/plan9stats v0.0.0-20220913051719-115f729f3c8c h1:VtwQ41oftZwlMnOEbMWQtSEUgU64U4s+GHk7hZK+jtY=
|
||||
github.com/lufia/plan9stats v0.0.0-20220913051719-115f729f3c8c/go.mod h1:JKx41uQRwqlTZabZc+kILPrO/3jlKnQ2Z8b7YiVw5cE=
|
||||
github.com/matoous/go-nanoid v1.5.0/go.mod h1:zyD2a71IubI24efhpvkJz+ZwfwagzgSO6UNiFsZKN7U=
|
||||
github.com/matoous/go-nanoid/v2 v2.0.0 h1:d19kur2QuLeHmJBkvYkFdhFBzLoo1XVm2GgTpL+9Tj0=
|
||||
github.com/matoous/go-nanoid/v2 v2.0.0/go.mod h1:FtS4aGPVfEkxKxhdWPAspZpZSh1cOjtM7Ej/So3hR0g=
|
||||
@@ -363,6 +369,8 @@ github.com/pion/webrtc/v4 v4.0.2 h1:fBwm5/hqSUybrCWl0DDBSTDrpbkcgkqpeLmXw9CsBQA=
|
||||
github.com/pion/webrtc/v4 v4.0.2/go.mod h1:moylBT2A4dNoEaYBCdV1nThM3TLwRHzWszIG+eSPaqQ=
|
||||
github.com/pjbgf/sha1cd v0.3.0 h1:4D5XXmUUBUl/xQ6IjCkEAbqXskkq/4O7LmGn0AqMDs4=
|
||||
github.com/pjbgf/sha1cd v0.3.0/go.mod h1:nZ1rrWOcGJ5uZgEEVL1VUM9iRQiZvWdbZjkKyFzPPsI=
|
||||
github.com/pkg/browser v0.0.0-20240102092130-5ac0b6a4141c h1:+mdjkGKdHQG3305AYmdv1U2eRNDiU2ErMBj1gwrq8eQ=
|
||||
github.com/pkg/browser v0.0.0-20240102092130-5ac0b6a4141c/go.mod h1:7rwL4CYBLnjLxUqIJNnCWiEdr3bn6IUYi15bNlnbCCU=
|
||||
github.com/pkg/diff v0.0.0-20210226163009-20ebb0f2a09e/go.mod h1:pJLUxLENpZxwdsKMEsNbx1VGcRFpLqf3715MtcvvzbA=
|
||||
github.com/pkg/errors v0.8.0/go.mod h1:bwawxfHBFNV+L2hUp1rHADufV3IMtnDRdf1r5NINEl0=
|
||||
github.com/pkg/errors v0.8.1/go.mod h1:bwawxfHBFNV+L2hUp1rHADufV3IMtnDRdf1r5NINEl0=
|
||||
@@ -370,6 +378,8 @@ github.com/pkg/errors v0.9.1 h1:FEBLx1zS214owpjy7qsBeixbURkuhQAwrK5UwLGTwt4=
|
||||
github.com/pkg/errors v0.9.1/go.mod h1:bwawxfHBFNV+L2hUp1rHADufV3IMtnDRdf1r5NINEl0=
|
||||
github.com/pmezard/go-difflib v1.0.0 h1:4DBwDE0NGyQoBHbLQYPwSUPoCMWR5BEzIk/f1lZbAQM=
|
||||
github.com/pmezard/go-difflib v1.0.0/go.mod h1:iKH77koFhYxTK1pcRnkKkqfTogsbg7gZNVY4sRDYZ/4=
|
||||
github.com/power-devops/perfstat v0.0.0-20220216144756-c35f1ee13d7c h1:NRoLoZvkBTKvR5gQLgA3e0hqjkY9u1wm+iOL45VN/qI=
|
||||
github.com/power-devops/perfstat v0.0.0-20220216144756-c35f1ee13d7c/go.mod h1:OmDBASR4679mdNQnz2pUhc2G8CO2JrUAVFDRBDP/hJE=
|
||||
github.com/prometheus/client_golang v0.9.1/go.mod h1:7SWBe2y4D6OKWSNQJUaRYU/AaXPKyh/dDVn+NZz0KFw=
|
||||
github.com/prometheus/client_golang v0.9.3-0.20190127221311-3c4408c8b829/go.mod h1:p2iRAGwDERtqlqzRXnrOVns+ignqQo//hLXqYxZYVNs=
|
||||
github.com/prometheus/client_golang v1.0.0/go.mod h1:db9x61etRT2tGnBNRi70OPL5FsnadC4Ky3P0J6CfImo=
|
||||
@@ -412,6 +422,8 @@ github.com/ryszard/goskiplist v0.0.0-20150312221310-2dfbae5fcf46 h1:GHRpF1pTW19a
|
||||
github.com/ryszard/goskiplist v0.0.0-20150312221310-2dfbae5fcf46/go.mod h1:uAQ5PCi+MFsC7HjREoAz1BU+Mq60+05gifQSsHSDG/8=
|
||||
github.com/sergi/go-diff v1.1.0 h1:we8PVUC3FE2uYfodKH/nBHMSetSfHDR6scGdBi+erh0=
|
||||
github.com/sergi/go-diff v1.1.0/go.mod h1:STckp+ISIX8hZLjrqAeVduY0gWCT9IjLuqbuNXdaHfM=
|
||||
github.com/shirou/gopsutil/v4 v4.24.12 h1:qvePBOk20e0IKA1QXrIIU+jmk+zEiYVVx06WjBRlZo4=
|
||||
github.com/shirou/gopsutil/v4 v4.24.12/go.mod h1:DCtMPAad2XceTeIAbGyVfycbYQNBGk2P8cvDi7/VN9o=
|
||||
github.com/sirupsen/logrus v1.2.0/go.mod h1:LxeOpSwHxABJmUn/MG1IvRgCAasNZTLOkJPxbbu5VWo=
|
||||
github.com/sirupsen/logrus v1.4.2/go.mod h1:tLMulIdttU9McNUspp0xgXVQah82FyeX6MwdIuYE2rE=
|
||||
github.com/sirupsen/logrus v1.6.0/go.mod h1:7uNnSEd1DgxDLC74fIahvMZmmYsHGZGEOFrfsX/uA88=
|
||||
@@ -447,6 +459,10 @@ github.com/tidwall/btree v1.7.0/go.mod h1:twD9XRA5jj9VUQGELzDO4HPQTNJsoWWfYEL+EU
|
||||
github.com/tinylib/msgp v1.0.2/go.mod h1:+d+yLhGm8mzTaHzB+wgMYrodPfmZrzkirds8fDWklFE=
|
||||
github.com/tinylib/msgp v1.1.0/go.mod h1:+d+yLhGm8mzTaHzB+wgMYrodPfmZrzkirds8fDWklFE=
|
||||
github.com/tinylib/msgp v1.1.2/go.mod h1:+d+yLhGm8mzTaHzB+wgMYrodPfmZrzkirds8fDWklFE=
|
||||
github.com/tklauser/go-sysconf v0.3.12 h1:0QaGUFOdQaIVdPgfITYzaTegZvdCjmYO52cSFAEVmqU=
|
||||
github.com/tklauser/go-sysconf v0.3.12/go.mod h1:Ho14jnntGE1fpdOqQEEaiKRpvIavV0hSfmBq8nJbHYI=
|
||||
github.com/tklauser/numcpus v0.6.1 h1:ng9scYS7az0Bk4OZLvrNXNSAO2Pxr1XXRAPyjhIx+Fk=
|
||||
github.com/tklauser/numcpus v0.6.1/go.mod h1:1XfjsgE2zo8GVw7POkMbHENHzVg3GzmoZ9fESEdAacY=
|
||||
github.com/willf/bitset v1.1.9/go.mod h1:RjeCKbqT1RxIR/KWY6phxZiaY1IyutSBfGjNPySAYV4=
|
||||
github.com/willf/bitset v1.1.10/go.mod h1:RjeCKbqT1RxIR/KWY6phxZiaY1IyutSBfGjNPySAYV4=
|
||||
github.com/wlynxg/anet v0.0.5 h1:J3VJGi1gvo0JwZ/P1/Yc/8p63SoW98B5dHkYDmpgvvU=
|
||||
@@ -458,6 +474,8 @@ github.com/xiaoqidun/setft v0.0.0-20220310121541-be86327699ad/go.mod h1:Jj8p9bgK
|
||||
github.com/yuin/goldmark v1.2.1/go.mod h1:3hX8gzYuyVAZsxl0MRgGTJEmQBFcNTphYh9decYSb74=
|
||||
github.com/yuin/goldmark v1.4.1/go.mod h1:mwnBkeHKe2W/ZEtQ+71ViKU8L12m81fl3OWwC1Zlc8k=
|
||||
github.com/yuin/goldmark v1.4.13/go.mod h1:6yULJ656Px+3vBD8DxQVa3kxgyrAnzto9xy5taEt/CY=
|
||||
github.com/yusufpapurcu/wmi v1.2.4 h1:zFUKzehAFReQwLys1b/iSMl+JQGSCSjtVqQn9bBrPo0=
|
||||
github.com/yusufpapurcu/wmi v1.2.4/go.mod h1:SBZ9tNy3G9/m5Oi98Zks0QjeHVDvuK0qfxQmPyzfmi0=
|
||||
go.etcd.io/bbolt v1.3.11 h1:yGEzV1wPz2yVCLsD8ZAiGHhHVlczyC9d1rP43/VCRJ0=
|
||||
go.etcd.io/bbolt v1.3.11/go.mod h1:dksAq7YMXoljX0xu6VF5DMZGbhYYoLUalEiSySYAS4I=
|
||||
go.opencensus.io v0.20.1/go.mod h1:6WKK9ahsWS3RSO+PY9ZHZUfv2irvY6gN279GOPZjmmk=
|
||||
@@ -543,6 +561,7 @@ golang.org/x/sys v0.0.0-20190215142949-d0b11bdaac8a/go.mod h1:STP8DvDyc/dI5b8T5h
|
||||
golang.org/x/sys v0.0.0-20190412213103-97732733099d/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs=
|
||||
golang.org/x/sys v0.0.0-20190422165155-953cdadca894/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs=
|
||||
golang.org/x/sys v0.0.0-20190502145724-3ef323f4f1fd/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs=
|
||||
golang.org/x/sys v0.0.0-20190916202348-b4ddaad3f8a3/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs=
|
||||
golang.org/x/sys v0.0.0-20191026070338-33540a1f6037/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs=
|
||||
golang.org/x/sys v0.0.0-20200106162015-b016eb3dc98e/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs=
|
||||
golang.org/x/sys v0.0.0-20200122134326-e047566fdf82/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs=
|
||||
@@ -552,6 +571,7 @@ golang.org/x/sys v0.0.0-20200615200032-f1bc736245b1/go.mod h1:h1NjWce9XRLGQEsW7w
|
||||
golang.org/x/sys v0.0.0-20200625212154-ddb9806d33ae/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs=
|
||||
golang.org/x/sys v0.0.0-20200930185726-fdedc70b468f/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs=
|
||||
golang.org/x/sys v0.0.0-20201119102817-f84b799fce68/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs=
|
||||
golang.org/x/sys v0.0.0-20201204225414-ed752295db88/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs=
|
||||
golang.org/x/sys v0.0.0-20210124154548-22da62e12c0c/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs=
|
||||
golang.org/x/sys v0.0.0-20210423082822-04245dca01da/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs=
|
||||
golang.org/x/sys v0.0.0-20210603081109-ebe580a85c40/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg=
|
||||
@@ -562,13 +582,18 @@ golang.org/x/sys v0.0.0-20220520151302-bc2c85ada10a/go.mod h1:oPkhp1MJrh7nUepCBc
|
||||
golang.org/x/sys v0.0.0-20220715151400-c0bba94af5f8/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg=
|
||||
golang.org/x/sys v0.0.0-20220722155257-8c9f86f7a55f/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg=
|
||||
golang.org/x/sys v0.0.0-20220811171246-fbc7d0a398ab/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg=
|
||||
golang.org/x/sys v0.1.0/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg=
|
||||
golang.org/x/sys v0.2.0/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg=
|
||||
golang.org/x/sys v0.3.0/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg=
|
||||
golang.org/x/sys v0.5.0/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg=
|
||||
golang.org/x/sys v0.6.0/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg=
|
||||
golang.org/x/sys v0.8.0/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg=
|
||||
golang.org/x/sys v0.11.0/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg=
|
||||
golang.org/x/sys v0.12.0/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg=
|
||||
golang.org/x/sys v0.27.0 h1:wBqf8DvsY9Y/2P8gAfPDEYNuS30J4lPHJxXSb/nJZ+s=
|
||||
golang.org/x/sys v0.27.0/go.mod h1:/VUhepiaJMQUp4+oa/7Zr1D23ma6VTLIYjOOTFZPUcA=
|
||||
golang.org/x/sys v0.28.0 h1:Fksou7UEQUWlKvIdsqzJmUmCX3cZuD2+P3XyyzwMhlA=
|
||||
golang.org/x/sys v0.28.0/go.mod h1:/VUhepiaJMQUp4+oa/7Zr1D23ma6VTLIYjOOTFZPUcA=
|
||||
golang.org/x/term v0.0.0-20201126162022-7de9c90e9dd1/go.mod h1:bj7SfCRtBDWHUb9snDiAeCFNEtKQo2Wmx5Cou7ajbmo=
|
||||
golang.org/x/term v0.0.0-20210927222741-03fcf44c2211/go.mod h1:jbD1KX2456YbFQfuXm/mYQcufACuNUgVhRMnK/tPxf8=
|
||||
golang.org/x/term v0.2.0/go.mod h1:TVmDHMZPmdnySmBfhjOoOdhjzdE1h4u1VwSiw2l1Nuc=
|
||||
|
||||
@@ -147,7 +147,14 @@ func (f *Fetcher) Resolve(req *base.Request) error {
|
||||
_, params, _ := mime.ParseMediaType(contentDisposition)
|
||||
filename := params["filename"]
|
||||
if filename != "" {
|
||||
file.Name = filename
|
||||
// Check if the filename is MIME encoded-word
|
||||
if strings.HasPrefix(filename, "=?") {
|
||||
decoder := new(mime.WordDecoder)
|
||||
filename = strings.Replace(filename, "UTF8", "UTF-8", 1)
|
||||
file.Name, _ = decoder.Decode(filename)
|
||||
} else {
|
||||
file.Name = filename
|
||||
}
|
||||
}
|
||||
}
|
||||
// get file filePath by URL
|
||||
|
||||
@@ -37,6 +37,16 @@ func TestFetcher_Resolve(t *testing.T) {
|
||||
},
|
||||
},
|
||||
}, t)
|
||||
testResolve(test.StartTestCustomServer, "encoded-word", &base.Resource{
|
||||
Size: test.BuildSize,
|
||||
Range: false,
|
||||
Files: []*base.FileInfo{
|
||||
{
|
||||
Name: "测试.zip",
|
||||
Size: test.BuildSize,
|
||||
},
|
||||
},
|
||||
}, t)
|
||||
testResolve(test.StartTestCustomServer, test.BuildName, &base.Resource{
|
||||
Size: 0,
|
||||
Range: false,
|
||||
|
||||
@@ -83,6 +83,17 @@ func StartTestCustomServer() net.Listener {
|
||||
defer file.Close()
|
||||
io.Copy(writer, file)
|
||||
})
|
||||
mux.HandleFunc("/encoded-word", func(writer http.ResponseWriter, request *http.Request) {
|
||||
writer.Header().Set("Content-Disposition", "attachment; filename=\"=?UTF8?B?5rWL6K+VLnppcA==?=\"")
|
||||
writer.Header().Set("Content-Type", "application/octet-stream")
|
||||
writer.Header().Set("Content-Length", fmt.Sprintf("%d", BuildSize))
|
||||
file, err := os.Open(BuildFile)
|
||||
if err != nil {
|
||||
panic(err)
|
||||
}
|
||||
defer file.Close()
|
||||
io.Copy(writer, file)
|
||||
})
|
||||
return mux
|
||||
})
|
||||
}
|
||||
|
||||
@@ -67,4 +67,7 @@ windows/flutter/generated_plugins.cmake
|
||||
|
||||
# Hive database files
|
||||
database.hive
|
||||
database.lock
|
||||
database.lock
|
||||
|
||||
assets/host/host
|
||||
assets/host/host.exe
|
||||
@@ -44,11 +44,11 @@ android {
|
||||
|
||||
defaultConfig {
|
||||
// TODO: Specify your own unique Application ID (https://developer.android.com/studio/build/application-id.html).
|
||||
applicationId "com.gopeed"
|
||||
applicationId "com.gopeed.gopeed"
|
||||
// You can update the following values to match your application needs.
|
||||
// For more information, see: https://docs.flutter.dev/deployment/android#reviewing-the-build-configuration.
|
||||
minSdkVersion 21
|
||||
targetSdkVersion 29
|
||||
targetSdkVersion 34
|
||||
versionCode flutterVersionCode.toInteger()
|
||||
versionName flutterVersionName
|
||||
}
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
<manifest xmlns:android="http://schemas.android.com/apk/res/android"
|
||||
package="com.gopeed">
|
||||
package="com.gopeed.gopeed">
|
||||
<!-- The INTERNET permission is required for development. Specifically,
|
||||
the Flutter tool needs it to communicate with the running application
|
||||
to allow setting breakpoints, to provide hot reload, etc.
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
<manifest xmlns:android="http://schemas.android.com/apk/res/android"
|
||||
package="com.gopeed">
|
||||
package="com.gopeed.gopeed">
|
||||
|
||||
<uses-permission android:name="android.permission.INTERNET" />
|
||||
<uses-permission android:name="android.permission.READ_MEDIA_IMAGES" />
|
||||
@@ -7,6 +7,8 @@
|
||||
<uses-permission android:name="android.permission.READ_MEDIA_VIDEO" />
|
||||
<uses-permission android:name="android.permission.READ_EXTERNAL_STORAGE" android:maxSdkVersion="32" />
|
||||
<uses-permission android:name="android.permission.WRITE_EXTERNAL_STORAGE" android:maxSdkVersion="32" />
|
||||
<uses-permission android:name="android.permission.FOREGROUND_SERVICE" />
|
||||
<uses-permission android:name="android.permission.FOREGROUND_SERVICE_DATA_SYNC" />
|
||||
<uses-permission android:name="android.permission.REQUEST_INSTALL_PACKAGES" />
|
||||
|
||||
<application
|
||||
@@ -91,7 +93,8 @@
|
||||
<!-- Add android:stopWithTask option only when necessary. -->
|
||||
<service
|
||||
android:name="com.pravera.flutter_foreground_task.service.ForegroundService"
|
||||
android:stopWithTask="true" />
|
||||
android:foregroundServiceType="dataSync"
|
||||
android:exported="false" />
|
||||
|
||||
<!-- Don't delete the meta-data below.
|
||||
This is used by the Flutter tool to generate GeneratedPluginRegistrant.java -->
|
||||
|
||||
+1
-1
@@ -1,4 +1,4 @@
|
||||
package com.gopeed
|
||||
package com.gopeed.gopeed
|
||||
|
||||
import androidx.annotation.NonNull
|
||||
import com.gopeed.libgopeed.Libgopeed
|
||||
@@ -1,5 +1,5 @@
|
||||
<manifest xmlns:android="http://schemas.android.com/apk/res/android"
|
||||
package="com.gopeed">
|
||||
package="com.gopeed.gopeed">
|
||||
<!-- The INTERNET permission is required for development. Specifically,
|
||||
the Flutter tool needs it to communicate with the running application
|
||||
to allow setting breakpoints, to provide hot reload, etc.
|
||||
|
||||
Whitespace-only changes.
@@ -452,7 +452,7 @@
|
||||
MARKETING_VERSION = 1.0;
|
||||
MTL_ENABLE_DEBUG_INFO = INCLUDE_SOURCE;
|
||||
MTL_FAST_MATH = YES;
|
||||
PRODUCT_BUNDLE_IDENTIFIER = com.gopeed.ShareExtension;
|
||||
PRODUCT_BUNDLE_IDENTIFIER = com.gopeed.gopeed.ShareExtension;
|
||||
PRODUCT_NAME = "$(TARGET_NAME)";
|
||||
SKIP_INSTALL = YES;
|
||||
SWIFT_ACTIVE_COMPILATION_CONDITIONS = "DEBUG $(inherited)";
|
||||
@@ -492,7 +492,7 @@
|
||||
LOCALIZATION_PREFERS_STRING_CATALOGS = YES;
|
||||
MARKETING_VERSION = 1.0;
|
||||
MTL_FAST_MATH = YES;
|
||||
PRODUCT_BUNDLE_IDENTIFIER = com.gopeed.ShareExtension;
|
||||
PRODUCT_BUNDLE_IDENTIFIER = com.gopeed.gopeed.ShareExtension;
|
||||
PRODUCT_NAME = "$(TARGET_NAME)";
|
||||
SKIP_INSTALL = YES;
|
||||
SWIFT_EMIT_LOC_STRINGS = YES;
|
||||
@@ -530,7 +530,7 @@
|
||||
LOCALIZATION_PREFERS_STRING_CATALOGS = YES;
|
||||
MARKETING_VERSION = 1.0;
|
||||
MTL_FAST_MATH = YES;
|
||||
PRODUCT_BUNDLE_IDENTIFIER = com.gopeed.ShareExtension;
|
||||
PRODUCT_BUNDLE_IDENTIFIER = com.gopeed.gopeed.ShareExtension;
|
||||
PRODUCT_NAME = "$(TARGET_NAME)";
|
||||
SKIP_INSTALL = YES;
|
||||
SWIFT_EMIT_LOC_STRINGS = YES;
|
||||
@@ -605,7 +605,7 @@
|
||||
"$(inherited)",
|
||||
"@executable_path/Frameworks",
|
||||
);
|
||||
PRODUCT_BUNDLE_IDENTIFIER = com.gopeed;
|
||||
PRODUCT_BUNDLE_IDENTIFIER = com.gopeed.gopeed;
|
||||
PRODUCT_NAME = "$(TARGET_NAME)";
|
||||
SWIFT_OBJC_BRIDGING_HEADER = "Runner/Runner-Bridging-Header.h";
|
||||
SWIFT_VERSION = 5.0;
|
||||
@@ -736,7 +736,7 @@
|
||||
"$(inherited)",
|
||||
"@executable_path/Frameworks",
|
||||
);
|
||||
PRODUCT_BUNDLE_IDENTIFIER = com.gopeed;
|
||||
PRODUCT_BUNDLE_IDENTIFIER = com.gopeed.gopeed;
|
||||
PRODUCT_NAME = "$(TARGET_NAME)";
|
||||
SWIFT_OBJC_BRIDGING_HEADER = "Runner/Runner-Bridging-Header.h";
|
||||
SWIFT_OPTIMIZATION_LEVEL = "-Onone";
|
||||
@@ -761,7 +761,7 @@
|
||||
"$(inherited)",
|
||||
"@executable_path/Frameworks",
|
||||
);
|
||||
PRODUCT_BUNDLE_IDENTIFIER = com.gopeed;
|
||||
PRODUCT_BUNDLE_IDENTIFIER = com.gopeed.gopeed;
|
||||
PRODUCT_NAME = "$(TARGET_NAME)";
|
||||
SWIFT_OBJC_BRIDGING_HEADER = "Runner/Runner-Bridging-Header.h";
|
||||
SWIFT_VERSION = 5.0;
|
||||
|
||||
@@ -4,7 +4,7 @@
|
||||
<dict>
|
||||
<key>com.apple.security.application-groups</key>
|
||||
<array>
|
||||
<string>group.com.gopeed</string>
|
||||
<string>group.com.gopeed.gopeed</string>
|
||||
</array>
|
||||
</dict>
|
||||
</plist>
|
||||
@@ -4,7 +4,7 @@
|
||||
<dict>
|
||||
<key>com.apple.security.application-groups</key>
|
||||
<array>
|
||||
<string>group.com.gopeed</string>
|
||||
<string>group.com.gopeed.gopeed</string>
|
||||
</array>
|
||||
</dict>
|
||||
</plist>
|
||||
@@ -337,7 +337,9 @@ class AppController extends GetxController with WindowListener, TrayListener {
|
||||
if (uri.path == "/create") {
|
||||
final params = uri.queryParameters["params"];
|
||||
if (params?.isNotEmpty == true) {
|
||||
final paramsJson = String.fromCharCodes(base64Decode(params!));
|
||||
final safeParams = params!.replaceAll(" ", "+");
|
||||
final paramsJson =
|
||||
String.fromCharCodes(base64Decode(base64.normalize(safeParams)));
|
||||
Get.rootDelegate.offAndToNamed(Routes.REDIRECT,
|
||||
arguments: RedirectArgs(Routes.CREATE,
|
||||
arguments:
|
||||
|
||||
@@ -82,16 +82,7 @@ class CreateView extends GetView<CreateController> {
|
||||
_urlController.text = url;
|
||||
_urlController.selection = TextSelection.fromPosition(
|
||||
TextPosition(offset: _urlController.text.length));
|
||||
final uppercaseUrl = url.toUpperCase();
|
||||
Protocol? protocol;
|
||||
if (uppercaseUrl.startsWith("HTTP:") ||
|
||||
uppercaseUrl.startsWith("HTTPS:")) {
|
||||
protocol = Protocol.http;
|
||||
}
|
||||
if (uppercaseUrl.startsWith("MAGNET:") ||
|
||||
uppercaseUrl.endsWith(".TORRENT")) {
|
||||
protocol = Protocol.bt;
|
||||
}
|
||||
final protocol = parseProtocol(url);
|
||||
if (protocol != null) {
|
||||
final extraHandlers = {
|
||||
Protocol.http: () {
|
||||
@@ -672,6 +663,20 @@ class CreateView extends GetView<CreateController> {
|
||||
);
|
||||
}
|
||||
|
||||
// parse protocol from url
|
||||
parseProtocol(String url) {
|
||||
final uppercaseUrl = url.toUpperCase();
|
||||
Protocol? protocol;
|
||||
if (uppercaseUrl.startsWith("HTTP:") || uppercaseUrl.startsWith("HTTPS:")) {
|
||||
protocol = Protocol.http;
|
||||
}
|
||||
if (uppercaseUrl.startsWith("MAGNET:") ||
|
||||
uppercaseUrl.endsWith(".TORRENT")) {
|
||||
protocol = Protocol.bt;
|
||||
}
|
||||
return protocol;
|
||||
}
|
||||
|
||||
// recognize magnet uri, if length == 40, auto add magnet prefix
|
||||
recognizeMagnetUri(String text) {
|
||||
if (text.length != 40) {
|
||||
@@ -764,24 +769,23 @@ class CreateView extends GetView<CreateController> {
|
||||
|
||||
Object? parseReqExtra(String url) {
|
||||
Object? reqExtra;
|
||||
if (controller.showAdvanced.value) {
|
||||
switch (controller.advancedTabController.index) {
|
||||
case 0:
|
||||
final header = Map<String, String>.fromEntries(_httpHeaderControllers
|
||||
.map((e) => MapEntry(e.name.text, e.value.text)));
|
||||
header.removeWhere(
|
||||
(key, value) => key.trim().isEmpty || value.trim().isEmpty);
|
||||
if (header.isNotEmpty) {
|
||||
reqExtra = ReqExtraHttp()..header = header;
|
||||
}
|
||||
break;
|
||||
case 1:
|
||||
if (_btTrackerController.text.trim().isNotEmpty) {
|
||||
reqExtra = ReqExtraBt()
|
||||
..trackers = Util.textToLines(_btTrackerController.text);
|
||||
}
|
||||
break;
|
||||
}
|
||||
final protocol = parseProtocol(url);
|
||||
switch (protocol) {
|
||||
case Protocol.http:
|
||||
final header = Map<String, String>.fromEntries(_httpHeaderControllers
|
||||
.map((e) => MapEntry(e.name.text, e.value.text)));
|
||||
header.removeWhere(
|
||||
(key, value) => key.trim().isEmpty || value.trim().isEmpty);
|
||||
if (header.isNotEmpty) {
|
||||
reqExtra = ReqExtraHttp()..header = header;
|
||||
}
|
||||
break;
|
||||
case Protocol.bt:
|
||||
if (_btTrackerController.text.trim().isNotEmpty) {
|
||||
reqExtra = ReqExtraBt()
|
||||
..trackers = Util.textToLines(_btTrackerController.text);
|
||||
}
|
||||
break;
|
||||
}
|
||||
return reqExtra;
|
||||
}
|
||||
|
||||
@@ -16,7 +16,6 @@ import '../../../../api/model/extension.dart';
|
||||
import '../../../../api/model/install_extension.dart';
|
||||
import '../../../../api/model/switch_extension.dart';
|
||||
import '../../../../api/model/update_extension_settings.dart';
|
||||
import '../../../../util/mac_secure_util.dart';
|
||||
import '../../../../util/message.dart';
|
||||
import '../../../../util/util.dart';
|
||||
import '../../../views/icon_button_loading.dart';
|
||||
@@ -96,7 +95,6 @@ class ExtensionView extends GetView<ExtensionController> {
|
||||
var dir =
|
||||
await FilePicker.platform.getDirectoryPath();
|
||||
if (dir != null) {
|
||||
MacSecureUtil.saveBookmark(dir);
|
||||
try {
|
||||
await installExtension(
|
||||
InstallExtension(devMode: true, url: dir));
|
||||
|
||||
@@ -762,7 +762,7 @@ class SettingView extends GetView<SettingController> {
|
||||
width: 80,
|
||||
child: DropdownButtonFormField<String>(
|
||||
value: startCfg.value.network,
|
||||
onChanged: Util.isDesktop()
|
||||
onChanged: Util.isDesktop() || Util.isAndroid()
|
||||
? (value) async {
|
||||
startCfg.update((val) {
|
||||
val!.network = value!;
|
||||
@@ -786,7 +786,8 @@ class SettingView extends GetView<SettingController> {
|
||||
),
|
||||
)
|
||||
];
|
||||
if (Util.isDesktop() && startCfg.value.network == 'tcp') {
|
||||
if ((Util.isDesktop() || Util.isAndroid()) &&
|
||||
startCfg.value.network == 'tcp') {
|
||||
final arr = startCfg.value.address.split(':');
|
||||
var ip = '127.0.0.1';
|
||||
var port = '0';
|
||||
|
||||
@@ -9,7 +9,6 @@ import 'package:path_provider/path_provider.dart';
|
||||
import 'package:permission_handler/permission_handler.dart';
|
||||
import 'package:toggle_switch/toggle_switch.dart';
|
||||
|
||||
import '../../util/mac_secure_util.dart';
|
||||
import '../../util/message.dart';
|
||||
import '../../util/util.dart';
|
||||
|
||||
@@ -42,7 +41,6 @@ class _DirectorySelectorState extends State<DirectorySelector> {
|
||||
var dir = await FilePicker.platform.getDirectoryPath();
|
||||
if (dir != null) {
|
||||
widget.controller.text = dir;
|
||||
MacSecureUtil.saveBookmark(dir);
|
||||
}
|
||||
});
|
||||
}
|
||||
|
||||
@@ -7,43 +7,44 @@ const trTR = {
|
||||
'cancel': 'İptal',
|
||||
'on': 'Açık',
|
||||
'off': 'Kapalı',
|
||||
'selectAll': 'Hepsini seç',
|
||||
'selectAll': 'Tümünü Seç',
|
||||
'select': 'Seç',
|
||||
'task': 'Görevler',
|
||||
'downloading': 'indiriliyor',
|
||||
'downloaded': 'indirildi',
|
||||
'downloading': 'İndiriliyor',
|
||||
'downloaded': 'İndirildi',
|
||||
'setting': 'Ayarlar',
|
||||
'donate': 'Bağış',
|
||||
'exit': 'Çık',
|
||||
'create': 'Görev oluştur',
|
||||
'directDownload': 'Doğrudan indir',
|
||||
'advancedOptions': 'Gelişmiş ayarlar',
|
||||
'followSettings': 'Ayarları takip et',
|
||||
'downloadLink': 'İndirme bağlantısı',
|
||||
'donate': 'Bağış Yap',
|
||||
'exit': 'Çıkış',
|
||||
'create': 'Görev Oluştur',
|
||||
'directDownload': 'Doğrudan İndirme',
|
||||
'advancedOptions': 'Gelişmiş Seçenekler',
|
||||
'followSettings': 'Ayarları Takip Et',
|
||||
'downloadLink': 'İndirme Bağlantısı',
|
||||
'downloadLinkValid': 'Lütfen indirme bağlantısını girin',
|
||||
'downloadLinkHit': 'Lütfen indirme bağlantısını girin, HTTP/HTTPS/MAGNET desteklenir@append',
|
||||
'downloadLinkHitDesktop': ', veya torrent dosyasını doğrudan buraya sürükleyin',
|
||||
'downloadLinkHit': 'Lütfen her satıra bir indirme bağlantısı girin@append',
|
||||
'downloadLinkHitDesktop': ', veya doğrudan torrent dosyasını buraya sürükleyin',
|
||||
'download': 'İndir',
|
||||
'noFileSelected': 'Devam etmek için lütfen en az bir dosya seçin.',
|
||||
'noFileSelected': 'Devam etmek için en az bir dosya seçin.',
|
||||
'noStoragePermission': 'Depolama izni gerekli',
|
||||
'selectFile': 'Dosya seç',
|
||||
'rename': 'Yeniden adlandır',
|
||||
'selectFile': 'Dosya Seç',
|
||||
'rename': 'Yeniden Adlandır',
|
||||
'basic': 'Temel',
|
||||
'advanced': 'Gelişmiş',
|
||||
'general': 'Genel',
|
||||
'downloadDir': 'İndirme dizini',
|
||||
'downloadDirValid': 'Lütfen indirme dizinini seçin',
|
||||
'downloadDir': 'İndirme Dizini',
|
||||
'downloadDirValid': 'Lütfen bir indirme dizini seçin',
|
||||
'connections': 'Bağlantılar',
|
||||
'useServerCtime': 'Dosya oluşturma için sunucu saatini kullan',
|
||||
'maxRunning': 'Maksimum çalışan görev sayısı',
|
||||
'defaultDirectDownload': 'Doğrudan indir seçili olsun',
|
||||
'items': '@count tane',
|
||||
'subscribeTracker': 'İzleyiciye abone ol',
|
||||
'subscribeFail': 'Abone olunamadı, lütfen ağı kontrol edin veya daha sonra tekrar deneyin',
|
||||
'useServerCtime': 'Dosya oluşturma için sunucu zamanını kullan',
|
||||
'maxRunning': 'Maksimum Çalışan Görev',
|
||||
'defaultDirectDownload': 'Varsayılan olarak doğrudan indirmeyi seç',
|
||||
'items': '@count öğe',
|
||||
'subscribeTracker': 'Tracker Aboneliği',
|
||||
'subscribeFail': 'Abonelik başarısız oldu, lütfen ağı kontrol edin veya daha sonra tekrar deneyin',
|
||||
'update': 'Güncelle',
|
||||
'updateDaily': 'Günlük olarak güncelle',
|
||||
'lastUpdate': 'Son güncellenme tarihi: @time',
|
||||
'addTracker': 'İzleyici ekle',
|
||||
'addTrackerHit': 'Lütfen her satıra bir tane olmak üzere izleyici sunucusu bağlantısını girin',
|
||||
'updateDaily': 'Günlük güncelle',
|
||||
'lastUpdate': 'Son güncelleme: @time',
|
||||
'addTracker': 'Tracker Ekle',
|
||||
'addTrackerHit': 'Lütfen tracker sunucu URL’sini girin, her satıra bir tane',
|
||||
'ui': 'Arayüz',
|
||||
'theme': 'Tema',
|
||||
'themeSystem': 'Sistem',
|
||||
@@ -51,59 +52,70 @@ const trTR = {
|
||||
'themeDark': 'Koyu',
|
||||
'locale': 'Dil',
|
||||
'about': 'Hakkında',
|
||||
'homepage': 'Anasayfa',
|
||||
'homepage': 'Ana Sayfa',
|
||||
'version': 'Sürüm',
|
||||
'protocol': 'Protokol',
|
||||
'port': 'Bağlantı noktası',
|
||||
'apiToken': 'API anahtarı',
|
||||
'notSet': 'AYARLI DEĞİL',
|
||||
'set': 'AYARLI',
|
||||
'portInUse': 'Bağlantı noktası [@port] kullanımda, lütfen bağlantı noktasını değiştirin',
|
||||
'effectAfterRestart': 'Yeniden başlatma sonrası etki edecektir',
|
||||
'port': 'Bağlantı Noktası',
|
||||
'apiToken': 'API Anahtarı',
|
||||
'notSet': 'AYARLANMADI',
|
||||
'set': 'AYARLA',
|
||||
'portInUse': 'Bağlantı noktası [@port] kullanımda, lütfen değiştirin',
|
||||
'effectAfterRestart': 'Yeniden başlatmadan sonra etkili olacak',
|
||||
'developer': 'Geliştirici',
|
||||
'logDirectory': 'Kayıt dizini',
|
||||
'logDirectory': 'Günlük Dizini',
|
||||
'show': 'Göster',
|
||||
'startAll': 'Hepsini başlat',
|
||||
'pauseAll': 'Hepsini durdur',
|
||||
'continue': 'Devam Et',
|
||||
'pause': 'Duraklat',
|
||||
'startAll': 'Tümünü Başlat',
|
||||
'pauseAll': 'Tümünü Duraklat',
|
||||
'deleteTask': '@count görevi sil',
|
||||
'deleteTaskTip': 'İndirilen dosyaları sakla',
|
||||
'delete': 'Sil',
|
||||
'newVersionTitle': 'Yeni sürümü keşfet @version',
|
||||
'newVersionUpdate': 'Şimdi güncelle',
|
||||
'newVersionLater': 'Sonra',
|
||||
'extensions': 'Uzantılar',
|
||||
'extensionInstallUrl': 'İndirme bağlantısı',
|
||||
'extensionInstallSuccess': 'Başarıyla indirildi',
|
||||
'newVersionTitle': 'Yeni sürüm bulundu @version',
|
||||
'newVersionUpdate': 'Şimdi Güncelle',
|
||||
'newVersionLater': 'Daha Sonra',
|
||||
'extensions': 'Eklentiler',
|
||||
'extensionInstallUrl': 'Kurulum URL’si',
|
||||
'extensionInstallSuccess': 'Başarıyla yüklendi',
|
||||
'extensionUpdateSuccess': 'Başarıyla güncellendi',
|
||||
'extensionDelete': 'Uzantıyı sil',
|
||||
'extensionAlreadyLatest': 'Bu zaten en son sürüm',
|
||||
'extensionFind': 'Uzantı ara',
|
||||
'extensionDevelop': 'Uzantı geliştir',
|
||||
'extensionDelete': 'Eklentiyi Sil',
|
||||
'extensionAlreadyLatest': 'Zaten en son sürüm',
|
||||
'extensionFind': 'Eklentileri Bul',
|
||||
'extensionDevelop': 'Eklenti Geliştir',
|
||||
'history': 'Geçmiş',
|
||||
'clearHistory': 'Geçmişi temizle',
|
||||
'noHistoryFound': 'Geçmiş bulunamadı',
|
||||
'serviceTitle': 'Hizmet indir',
|
||||
'clearHistory': 'Geçmişi Temizle',
|
||||
'noHistoryFound': 'Geçmiş Bulunamadı',
|
||||
'serviceTitle': 'İndirme Servisi',
|
||||
'serviceText': 'Çalışıyor',
|
||||
'network': 'Ağ',
|
||||
'proxy': 'Vekil',
|
||||
'noProxy': 'Vekil yok',
|
||||
'systemProxy': 'Sistem vekili',
|
||||
'customProxy': 'Özel vekil',
|
||||
'proxy': 'Vekil Sunucu',
|
||||
'noProxy': 'Vekil Sunucu Yok',
|
||||
'systemProxy': 'Sistem Vekil Sunucusu',
|
||||
'customProxy': 'Özel Vekil Sunucu',
|
||||
'server': 'Sunucu',
|
||||
'username': 'Kullanıcı adı',
|
||||
'username': 'Kullanıcı Adı',
|
||||
'password': 'Şifre',
|
||||
'thanks': 'Teşekkürler',
|
||||
'thanksDesc': 'Gopeed topluluğunun oluşmasına ve gelişmesine yardımcı olan tüm katılımcılara teşekkürler!',
|
||||
'browserExtension': 'Tarayıcı uzantısı',
|
||||
'launchAtStartup': 'Başlangıçta başlat',
|
||||
'seedConfig': 'Seed ayarları',
|
||||
'seedKeep': 'Manuel durdurulana kadar seed etmeye devam et',
|
||||
'thanksDesc':
|
||||
'Gopeed topluluğunun inşasında ve geliştirilmesinde katkıda bulunan herkese teşekkürler!',
|
||||
'browserExtension': 'Tarayıcı Eklentisi',
|
||||
'launchAtStartup': 'Başlangıçta Çalıştır',
|
||||
'seedConfig': 'Seed Ayarları',
|
||||
'seedKeep': 'Manuel olarak durdurulana kadar seed etmeye devam et',
|
||||
'seedRatio': 'Seed oranı',
|
||||
'seedTime': 'Seed süresi (dakika)',
|
||||
'taskDetail': 'Görev detayı',
|
||||
'taskName': 'Görev adı',
|
||||
'taskUrl': 'Görev URL',
|
||||
'downloadPath': 'İndirme yolu',
|
||||
'skipVerifyCert': 'Sertifika doğrulamasını atla',
|
||||
'setAsDefaultBtClient': 'Varsayılan BT istemcisi olarak ayarla',
|
||||
'taskDetail': 'Görev Detayı',
|
||||
'taskName': 'Görev Adı',
|
||||
'taskUrl': 'Görev URL’si',
|
||||
'downloadPath': 'İndirme Yolu',
|
||||
'skipVerifyCert': 'Sertifika Doğrulamayı Atla',
|
||||
'name': 'Ad',
|
||||
'size': 'Boyut',
|
||||
'unknown': 'Bilinmeyen',
|
||||
'fileSelectedCount': 'Dosya: ',
|
||||
'fileSelectedSize': 'Boyut: ',
|
||||
'httpHeaderName': 'Başlık Adı',
|
||||
'httpHeaderValue': 'Başlık Değeri',
|
||||
},
|
||||
};
|
||||
@@ -0,0 +1,123 @@
|
||||
const ukUA = {
|
||||
'uk_UA': {
|
||||
'label': 'Мова',
|
||||
'error': 'Помилка',
|
||||
'tip': 'Підказка',
|
||||
'confirm': 'Підтвердити',
|
||||
'cancel': 'Скасувати',
|
||||
'on': 'Увімк.',
|
||||
'off': 'Вимк.',
|
||||
'selectAll': 'Вибрати все',
|
||||
'select': 'Вибрати',
|
||||
'task': 'Завдання',
|
||||
'downloading': 'завантажується',
|
||||
'downloaded': 'завантажено',
|
||||
'setting': 'Налаштування',
|
||||
'donate': 'Підтримати',
|
||||
'exit': 'Вихід',
|
||||
'create': 'Створити завдання',
|
||||
'directDownload': 'Пряме завантаження',
|
||||
'advancedOptions': 'Додаткові параметри',
|
||||
'followSettings': 'За замовчуванням',
|
||||
'downloadLink': 'Посилання на завантаження',
|
||||
'downloadLinkValid': 'Будь ласка, введіть посилання на завантаження',
|
||||
'downloadLinkHit':
|
||||
'Будь ласка, введіть посилання на завантаження, одне на рядок@Append',
|
||||
'downloadLinkHitDesktop': ', або перетягніть сюди файл торенту',
|
||||
'download': 'Завантажити',
|
||||
'noFileSelected': 'Будь ласка, виберіть хоча б один файл для продовження.',
|
||||
'noStoragePermission': 'Потрібен дозвіл на зберігання',
|
||||
'selectFile': 'Вибрати файл',
|
||||
'rename': 'Перейменувати',
|
||||
'basic': 'Основні',
|
||||
'advanced': 'Розширені',
|
||||
'general': 'Загальні',
|
||||
'downloadDir': 'Каталог завантажень',
|
||||
'downloadDirValid': 'Будь ласка, виберіть каталог завантажень',
|
||||
'connections': 'З’єднання',
|
||||
'useServerCtime': 'Використовувати час сервера для створення файлу',
|
||||
'maxRunning': 'Макс. завдань у черзі',
|
||||
'defaultDirectDownload': 'Пряме завантаження за замовчуванням',
|
||||
'items': '@count елементів',
|
||||
'subscribeTracker': 'Підписатися на трекер',
|
||||
'subscribeFail':
|
||||
'Не вдалося підписатися, перевірте мережу або спробуйте пізніше',
|
||||
'update': 'Оновити',
|
||||
'updateDaily': 'Оновлювати щодня',
|
||||
'lastUpdate': 'Останнє оновлення: @time',
|
||||
'addTracker': 'Додати трекер',
|
||||
'addTrackerHit': 'Будь ласка, введіть URL-адресу трекера, одну на рядок',
|
||||
'ui': 'Інтерфейс',
|
||||
'theme': 'Тема',
|
||||
'themeSystem': 'Системна',
|
||||
'themeLight': 'Світла',
|
||||
'themeDark': 'Темна',
|
||||
'locale': 'Мова',
|
||||
'about': 'Про програму',
|
||||
'homepage': 'Домашня сторінка',
|
||||
'version': 'Версія',
|
||||
'protocol': 'Протокол',
|
||||
'port': 'Порт',
|
||||
'apiToken': 'API Токен',
|
||||
'notSet': 'Не задано',
|
||||
'set': 'Задати',
|
||||
'portInUse': 'Порт [@PORT] вже використовується, будь ласка, змініть порт',
|
||||
'effectAfterRestart': 'Ефект після перезапуску',
|
||||
'developer': 'Розробник',
|
||||
'logDirectory': 'Каталог журналів',
|
||||
'show': 'Показати',
|
||||
'continue': 'Продовжити',
|
||||
'pause': 'Пауза',
|
||||
'startAll': 'Запустити все',
|
||||
'pauseAll': 'Зупинити все',
|
||||
'deleteTask': 'Видалити @count завдань',
|
||||
'deleteTaskTip': 'Зберегти завантажені файли',
|
||||
'delete': 'Видалити',
|
||||
'newVersionTitle': 'Доступна нова версія @Version',
|
||||
'newVersionUpdate': 'Оновити зараз',
|
||||
'newVersionLater': 'Пізніше',
|
||||
'extensions': 'Розширення',
|
||||
'extensionInstallUrl': 'URL для встановлення',
|
||||
'extensionInstallSuccess': 'Встановлено успішно',
|
||||
'extensionUpdateSuccess': 'Оновлено успішно',
|
||||
'extensionDelete': 'Видалити розширення',
|
||||
'extensionAlreadyLatest': 'Вже остання версія',
|
||||
'extensionFind': 'Знайти розширення',
|
||||
'extensionDevelop': 'Розробка розширень',
|
||||
'history': 'Історія',
|
||||
'clearHistory': 'Очистити історію',
|
||||
'noHistoryFound': 'Історію не знайдено',
|
||||
'serviceTitle': 'Служба завантаження',
|
||||
'serviceText': 'Працює',
|
||||
'network': 'Мережа',
|
||||
'proxy': 'Проксі',
|
||||
'noProxy': 'Без проксі',
|
||||
'systemProxy': 'Системний проксі',
|
||||
'customProxy': 'Користувацький проксі',
|
||||
'server': 'Сервер',
|
||||
'username': 'Ім’я користувача',
|
||||
'password': 'Пароль',
|
||||
'thanks': 'Подяки',
|
||||
'thanksDesc':
|
||||
'Дякуємо всім учасникам, які допомогли створити та розвивати спільноту Gopeed!',
|
||||
'browserExtension': 'Розширення для браузера',
|
||||
'launchAtStartup': 'Запускати під час завантаження системи',
|
||||
'seedConfig': 'Налаштування роздачі',
|
||||
'seedKeep': 'Роздавати доки не зупиню вручну',
|
||||
'seedRatio': 'Коефіцієнт роздачі',
|
||||
'seedTime': 'Час роздачі (хвилини)',
|
||||
'setAsDefaultBtClient': 'Встановити як клієнт BT за замовчуванням',
|
||||
'taskDetail': 'Деталі завдання',
|
||||
'taskName': 'Назва завдання',
|
||||
'taskUrl': 'URL завдання',
|
||||
'downloadPath': 'Шлях завантаження',
|
||||
'skipVerifyCert': 'Пропустити перевірку сертифіката',
|
||||
'name': 'Назва',
|
||||
'size': 'Розмір',
|
||||
'unknown': 'Невідомо',
|
||||
'fileSelectedCount': 'Файлів: ',
|
||||
'fileSelectedSize': 'Розмір: ',
|
||||
'httpHeaderName': 'Назва заголовка HTTP',
|
||||
'httpHeaderValue': 'Значення заголовка HTTP',
|
||||
},
|
||||
};
|
||||
@@ -14,6 +14,7 @@ import 'langs/vi_vn.dart';
|
||||
import 'langs/zh_cn.dart';
|
||||
import 'langs/zh_tw.dart';
|
||||
import 'langs/es_es.dart';
|
||||
import 'langs/uk_ua.dart';
|
||||
|
||||
final messages = _Messages();
|
||||
|
||||
@@ -35,5 +36,6 @@ class _Messages extends Translations {
|
||||
...idID,
|
||||
...frFR,
|
||||
...esES,
|
||||
...ukUA,
|
||||
};
|
||||
}
|
||||
+30
-11
@@ -1,6 +1,7 @@
|
||||
import 'package:args/args.dart';
|
||||
import 'package:flutter/foundation.dart';
|
||||
import 'package:flutter/material.dart';
|
||||
import 'package:flutter_foreground_task/flutter_foreground_task.dart';
|
||||
import 'package:get/get.dart';
|
||||
import 'package:window_manager/window_manager.dart';
|
||||
|
||||
@@ -10,9 +11,9 @@ import 'app/modules/app/views/app_view.dart';
|
||||
import 'core/libgopeed_boot.dart';
|
||||
import 'database/database.dart';
|
||||
import 'i18n/message.dart';
|
||||
import 'util/browser_extension_host/browser_extension_host.dart';
|
||||
import 'util/locale_manager.dart';
|
||||
import 'util/log_util.dart';
|
||||
import 'util/mac_secure_util.dart';
|
||||
import 'util/package_info.dart';
|
||||
import 'util/scheme_register/scheme_register.dart';
|
||||
import 'util/util.dart';
|
||||
@@ -40,6 +41,9 @@ void main(List<String> arguments) async {
|
||||
|
||||
Future<void> init(Args args) async {
|
||||
WidgetsFlutterBinding.ensureInitialized();
|
||||
if (Util.isMobile()) {
|
||||
FlutterForegroundTask.initCommunicationPort();
|
||||
}
|
||||
await Util.initStorageDir();
|
||||
await Database.instance.init();
|
||||
if (Util.isDesktop()) {
|
||||
@@ -82,21 +86,36 @@ Future<void> init(Args args) async {
|
||||
logger.e("libgopeed init fail", e);
|
||||
}
|
||||
|
||||
try {
|
||||
registerUrlScheme("gopeed");
|
||||
if (controller.downloaderConfig.value.extra.defaultBtClient) {
|
||||
registerDefaultTorrentClient();
|
||||
}
|
||||
} catch (e) {
|
||||
logger.e("register scheme fail", e);
|
||||
}
|
||||
|
||||
try {
|
||||
await controller.loadDownloaderConfig();
|
||||
MacSecureUtil.loadBookmark();
|
||||
} catch (e) {
|
||||
logger.e("load config fail", e);
|
||||
}
|
||||
|
||||
() async {
|
||||
try {
|
||||
registerUrlScheme("gopeed");
|
||||
if (controller.downloaderConfig.value.extra.defaultBtClient) {
|
||||
registerDefaultTorrentClient();
|
||||
}
|
||||
} catch (e) {
|
||||
logger.e("register scheme fail", e);
|
||||
}
|
||||
|
||||
try {
|
||||
await installHost();
|
||||
} catch (e) {
|
||||
logger.e("browser extension host binary install fail", e);
|
||||
}
|
||||
for (final browser in Browser.values) {
|
||||
try {
|
||||
await installManifest(browser);
|
||||
} catch (e) {
|
||||
logger.e(
|
||||
"browser [${browser.name}] extension host integration fail", e);
|
||||
}
|
||||
}
|
||||
}();
|
||||
}
|
||||
|
||||
Future<void> onStart() async {
|
||||
|
||||
@@ -0,0 +1,18 @@
|
||||
import 'browser_extension_host_stub.dart'
|
||||
if (dart.library.io) 'entry/browser_extension_host_native.dart';
|
||||
|
||||
enum Browser { chrome, edge, firefox }
|
||||
|
||||
/// Install host binary for browser extension
|
||||
Future<void> installHost() => doInstallHost();
|
||||
|
||||
/// Check if specified browser is installed
|
||||
Future<bool> checkBrowserInstalled(Browser browser) =>
|
||||
doCheckBrowserInstalled(browser);
|
||||
|
||||
/// Check if browser extension manifest is properly installed
|
||||
Future<bool> checkManifestInstalled(Browser browser) =>
|
||||
doCheckManifestInstalled(browser);
|
||||
|
||||
/// Install browser extension manifest
|
||||
Future<void> installManifest(Browser browser) => doInstallManifest(browser);
|
||||
@@ -0,0 +1,8 @@
|
||||
import 'browser_extension_host.dart';
|
||||
|
||||
Future<void> doInstallHost() => throw UnimplementedError();
|
||||
Future<bool> doCheckBrowserInstalled(Browser browser) =>
|
||||
throw UnimplementedError();
|
||||
Future<bool> doCheckManifestInstalled(Browser browser) =>
|
||||
throw UnimplementedError();
|
||||
Future<void> doInstallManifest(Browser browser) => throw UnimplementedError();
|
||||
@@ -0,0 +1,317 @@
|
||||
import 'dart:convert';
|
||||
import 'dart:io';
|
||||
|
||||
import 'package:flutter/services.dart';
|
||||
import 'package:path/path.dart' as path;
|
||||
import 'package:win32_registry/win32_registry.dart';
|
||||
|
||||
import '../../win32.dart';
|
||||
import '../browser_extension_host.dart';
|
||||
|
||||
final _hostExecName = 'host${Platform.isWindows ? '.exe' : ''}';
|
||||
|
||||
const _hostName = 'com.gopeed.gopeed';
|
||||
const _chromeExtensionId = 'mijpgljlfcapndmchhjffkpckknofcnd';
|
||||
const _edgeExtensionId = 'dkajnckekendchdleoaenoophcobooce';
|
||||
const _firefoxExtensionId = '{c5d69a8f-2ed0-46a7-afa4-b3a00dc58088}';
|
||||
const _debugExtensionIds = [
|
||||
'gjddllnejledbfaeondocjpejpamclkk',
|
||||
'goaohdfiokcjapgonhofgljfccoccief'
|
||||
];
|
||||
|
||||
// Windows NativeMessagingHosts registry constants
|
||||
const _chromeNativeHostsKey = r'Software\Google\Chrome\NativeMessagingHosts';
|
||||
const _edgeNativeHostsKey = r'Software\Microsoft\Edge\NativeMessagingHosts';
|
||||
const _firefoxNativeHostsKey = r'Software\Mozilla\NativeMessagingHosts';
|
||||
|
||||
/// Install host binary for browser extension
|
||||
Future<void> doInstallHost() async {
|
||||
final hostPath = _joinExePath(_hostExecName);
|
||||
|
||||
Future<List<int>> getHostAssetData() async {
|
||||
final hostAsset = await rootBundle.load('assets/host/$_hostExecName');
|
||||
return hostAsset.buffer
|
||||
.asUint8List(hostAsset.offsetInBytes, hostAsset.lengthInBytes);
|
||||
}
|
||||
|
||||
// Check if host binary is not installed
|
||||
if (!await File(hostPath).exists()) {
|
||||
final hostData = await getHostAssetData();
|
||||
final file = File(hostPath);
|
||||
await file.writeAsBytes(hostData);
|
||||
// Add execute permission
|
||||
if (!Platform.isWindows) {
|
||||
await Process.run('chmod', ['+x', hostPath]);
|
||||
}
|
||||
return;
|
||||
}
|
||||
// Check if host binary is outdated
|
||||
final hostAssetData = await getHostAssetData();
|
||||
final hostFileData = await File(hostPath).readAsBytes();
|
||||
if (hostAssetData.length != hostFileData.length) {
|
||||
await File(hostPath).writeAsBytes(hostAssetData);
|
||||
return;
|
||||
}
|
||||
}
|
||||
|
||||
/// Check if specified browser is installed
|
||||
Future<bool> doCheckBrowserInstalled(Browser browser) async {
|
||||
if (Platform.isWindows) {
|
||||
switch (browser) {
|
||||
case Browser.chrome:
|
||||
return await _checkWindowsRegistry(
|
||||
r'SOFTWARE\Microsoft\Windows\CurrentVersion\App Paths\chrome.exe') ||
|
||||
await _checkWindowsRegistry(
|
||||
r'SOFTWARE\WOW6432Node\Google\Chrome') ||
|
||||
await _checkWindowsExecutable(browser);
|
||||
case Browser.edge:
|
||||
return await _checkWindowsRegistry(
|
||||
r'SOFTWARE\Microsoft\Edge\BLBeacon') ||
|
||||
await _checkWindowsRegistry(
|
||||
r'SOFTWARE\WOW6432Node\Microsoft\Edge\BLBeacon') ||
|
||||
await _checkWindowsExecutable(browser);
|
||||
case Browser.firefox:
|
||||
return await _checkWindowsRegistry(r'SOFTWARE\Mozilla\Firefox') ||
|
||||
await _checkWindowsRegistry(
|
||||
r'SOFTWARE\WOW6432Node\Mozilla\Firefox') ||
|
||||
await _checkWindowsExecutable(browser);
|
||||
}
|
||||
} else {
|
||||
return await _checkUnixExecutable(browser);
|
||||
}
|
||||
}
|
||||
|
||||
/// Check if browser extension manifest is properly installed
|
||||
Future<bool> doCheckManifestInstalled(Browser browser) async {
|
||||
if (await checkBrowserInstalled(browser) == false) return false;
|
||||
|
||||
final manifestPath = _getManifestPath(browser);
|
||||
if (manifestPath == null) return false;
|
||||
|
||||
if (Platform.isWindows) {
|
||||
final regKey = _getWindowsRegistryKey(browser);
|
||||
if (!checkRegistry('$regKey\\$_hostName', '', manifestPath)) {
|
||||
return false;
|
||||
}
|
||||
}
|
||||
|
||||
if (!await File(manifestPath).exists()) {
|
||||
return false;
|
||||
}
|
||||
|
||||
final existingContent = await File(manifestPath).readAsString();
|
||||
final expectedContent = await _getManifestContent(browser);
|
||||
return existingContent == expectedContent;
|
||||
}
|
||||
|
||||
/// Install browser extension manifest
|
||||
Future<void> doInstallManifest(Browser browser) async {
|
||||
if (await checkBrowserInstalled(browser) == false) return;
|
||||
if (await checkManifestInstalled(browser)) return;
|
||||
|
||||
final manifestPath = _getManifestPath(browser)!;
|
||||
final manifestContent = await _getManifestContent(browser);
|
||||
final manifestDir = path.dirname(manifestPath);
|
||||
await Directory(manifestDir).create(recursive: true);
|
||||
await File(manifestPath).writeAsString(manifestContent);
|
||||
|
||||
if (Platform.isWindows) {
|
||||
final regKey = _getWindowsRegistryKey(browser);
|
||||
upsertRegistry('$regKey\\$_hostName', '', manifestPath);
|
||||
}
|
||||
}
|
||||
|
||||
Future<bool> _checkWindowsExecutable(Browser browser) async {
|
||||
final paths = _getWindowsExecutablePaths(browser);
|
||||
for (var execPath in paths) {
|
||||
if (await File(execPath).exists()) {
|
||||
return true;
|
||||
}
|
||||
}
|
||||
return false;
|
||||
}
|
||||
|
||||
List<String> _getWindowsExecutablePaths(Browser browser) {
|
||||
final programFiles = Platform.environment['PROGRAMFILES'];
|
||||
final programFilesX86 = Platform.environment['PROGRAMFILES(X86)'];
|
||||
final localAppData = Platform.environment['LOCALAPPDATA'];
|
||||
|
||||
switch (browser) {
|
||||
case Browser.chrome:
|
||||
return [
|
||||
if (programFiles != null)
|
||||
path.join(
|
||||
programFiles, 'Google', 'Chrome', 'Application', 'chrome.exe'),
|
||||
if (programFilesX86 != null)
|
||||
path.join(
|
||||
programFilesX86, 'Google', 'Chrome', 'Application', 'chrome.exe'),
|
||||
if (localAppData != null)
|
||||
path.join(
|
||||
localAppData, 'Google', 'Chrome', 'Application', 'chrome.exe'),
|
||||
];
|
||||
case Browser.edge:
|
||||
return [
|
||||
if (programFiles != null)
|
||||
path.join(
|
||||
programFiles, 'Microsoft', 'Edge', 'Application', 'msedge.exe'),
|
||||
if (programFilesX86 != null)
|
||||
path.join(programFilesX86, 'Microsoft', 'Edge', 'Application',
|
||||
'msedge.exe'),
|
||||
if (localAppData != null)
|
||||
path.join(
|
||||
localAppData, 'Microsoft', 'Edge', 'Application', 'msedge.exe'),
|
||||
];
|
||||
case Browser.firefox:
|
||||
return [
|
||||
if (programFiles != null)
|
||||
path.join(programFiles, 'Mozilla Firefox', 'firefox.exe'),
|
||||
if (programFilesX86 != null)
|
||||
path.join(programFilesX86, 'Mozilla Firefox', 'firefox.exe'),
|
||||
];
|
||||
}
|
||||
}
|
||||
|
||||
Future<bool> _checkUnixExecutable(Browser browser) async {
|
||||
final paths = _getUnixExecutablePaths(browser);
|
||||
for (var execPath in paths) {
|
||||
execPath = execPath.replaceAll('~', Platform.environment['HOME'] ?? '');
|
||||
if (await Directory(execPath).exists() || await File(execPath).exists()) {
|
||||
return true;
|
||||
}
|
||||
}
|
||||
return false;
|
||||
}
|
||||
|
||||
List<String> _getUnixExecutablePaths(Browser browser) {
|
||||
if (Platform.isMacOS) {
|
||||
switch (browser) {
|
||||
case Browser.chrome:
|
||||
return [
|
||||
'/Applications/Google Chrome.app',
|
||||
'~/Applications/Google Chrome.app',
|
||||
'/Users/${Platform.environment['USER']}/Applications/Google Chrome.app'
|
||||
];
|
||||
case Browser.edge:
|
||||
return [
|
||||
'/Applications/Microsoft Edge.app',
|
||||
'~/Applications/Microsoft Edge.app',
|
||||
'/Users/${Platform.environment['USER']}/Applications/Microsoft Edge.app'
|
||||
];
|
||||
case Browser.firefox:
|
||||
return [
|
||||
'/Applications/Firefox.app',
|
||||
'~/Applications/Firefox.app',
|
||||
'/Users/${Platform.environment['USER']}/Applications/Firefox.app'
|
||||
];
|
||||
}
|
||||
} else {
|
||||
switch (browser) {
|
||||
case Browser.chrome:
|
||||
return [
|
||||
'/usr/bin/google-chrome',
|
||||
'/usr/bin/google-chrome-stable',
|
||||
'/usr/bin/chrome',
|
||||
'/snap/bin/google-chrome',
|
||||
'/opt/google/chrome/google-chrome'
|
||||
];
|
||||
case Browser.edge:
|
||||
return [
|
||||
'/usr/bin/microsoft-edge',
|
||||
'/usr/bin/microsoft-edge-stable',
|
||||
'/snap/bin/microsoft-edge',
|
||||
'/opt/microsoft/msedge/msedge'
|
||||
];
|
||||
case Browser.firefox:
|
||||
return [
|
||||
'/usr/bin/firefox',
|
||||
'/snap/bin/firefox',
|
||||
'/usr/lib/firefox/firefox',
|
||||
'/opt/firefox/firefox'
|
||||
];
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
String? _getManifestPath(Browser browser) {
|
||||
final manifestName =
|
||||
browser == Browser.firefox ? '$_hostName.moz.json' : '$_hostName.json';
|
||||
if (Platform.isWindows) {
|
||||
return _joinExePath(manifestName);
|
||||
}
|
||||
|
||||
final home =
|
||||
Platform.environment['HOME'] ?? Platform.environment['USERPROFILE'];
|
||||
if (home == null) return null;
|
||||
|
||||
if (Platform.isMacOS) {
|
||||
switch (browser) {
|
||||
case Browser.chrome:
|
||||
return path.join(home, 'Library', 'Application Support', 'Google',
|
||||
'Chrome', 'NativeMessagingHosts', manifestName);
|
||||
case Browser.edge:
|
||||
return path.join(home, 'Library', 'Application Support',
|
||||
'Microsoft Edge', 'NativeMessagingHosts', manifestName);
|
||||
case Browser.firefox:
|
||||
return path.join(home, 'Library', 'Application Support', 'Mozilla',
|
||||
'NativeMessagingHosts', manifestName);
|
||||
}
|
||||
} else if (Platform.isLinux) {
|
||||
switch (browser) {
|
||||
case Browser.chrome:
|
||||
return path.join(home, '.config', 'google-chrome',
|
||||
'NativeMessagingHosts', manifestName);
|
||||
case Browser.edge:
|
||||
return path.join(home, '.config', 'microsoft-edge',
|
||||
'NativeMessagingHosts', manifestName);
|
||||
case Browser.firefox:
|
||||
return path.join(
|
||||
home, '.mozilla', 'native-messaging-hosts', manifestName);
|
||||
}
|
||||
}
|
||||
return null;
|
||||
}
|
||||
|
||||
Future<bool> _checkWindowsRegistry(String keyPath) async {
|
||||
try {
|
||||
final key = Registry.openPath(RegistryHive.localMachine, path: keyPath);
|
||||
key.close();
|
||||
return true;
|
||||
} catch (e) {
|
||||
return false;
|
||||
}
|
||||
}
|
||||
|
||||
Future<String> _getManifestContent(Browser browser) async {
|
||||
final hostPath = _joinExePath(_hostExecName);
|
||||
final manifest = {
|
||||
'name': _hostName,
|
||||
'description': 'Gopeed browser extension host',
|
||||
'path': hostPath,
|
||||
'type': 'stdio',
|
||||
if (browser != Browser.firefox)
|
||||
'allowed_origins': [
|
||||
'chrome-extension://$_chromeExtensionId/',
|
||||
'chrome-extension://$_edgeExtensionId/',
|
||||
..._debugExtensionIds.map((id) => 'chrome-extension://$id/'),
|
||||
],
|
||||
if (browser == Browser.firefox) 'allowed_extensions': [_firefoxExtensionId],
|
||||
};
|
||||
return const JsonEncoder.withIndent(' ').convert(manifest);
|
||||
}
|
||||
|
||||
String _getWindowsRegistryKey(Browser browser) {
|
||||
switch (browser) {
|
||||
case Browser.chrome:
|
||||
return _chromeNativeHostsKey;
|
||||
case Browser.edge:
|
||||
return _edgeNativeHostsKey;
|
||||
case Browser.firefox:
|
||||
return _firefoxNativeHostsKey;
|
||||
}
|
||||
}
|
||||
|
||||
String _joinExePath(String fileName) {
|
||||
final execPath = Platform.resolvedExecutable;
|
||||
final execDir = path.dirname(execPath);
|
||||
return path.join(execDir, fileName);
|
||||
}
|
||||
@@ -1,30 +0,0 @@
|
||||
import 'dart:io';
|
||||
|
||||
import 'package:macos_secure_bookmarks/macos_secure_bookmarks.dart';
|
||||
|
||||
import '../database/database.dart';
|
||||
import 'util.dart';
|
||||
|
||||
class MacSecureUtil {
|
||||
static Future<void> saveBookmark(String dir) async {
|
||||
if (!Util.isMacos()) {
|
||||
return;
|
||||
}
|
||||
final secureBookmarks = SecureBookmarks();
|
||||
final bookmark = await secureBookmarks.bookmark(Directory(dir));
|
||||
Database.instance.saveBookmark(MapEntry(dir, bookmark));
|
||||
}
|
||||
|
||||
static Future<void> loadBookmark() async {
|
||||
if (!Util.isMacos()) {
|
||||
return;
|
||||
}
|
||||
final secureBookmarks = SecureBookmarks();
|
||||
final bookmark = Database.instance.getBookmark() ?? {};
|
||||
bookmark.forEach((_, v) async {
|
||||
final resolvedFile =
|
||||
await secureBookmarks.resolveBookmark(v, isDirectory: true);
|
||||
await secureBookmarks.startAccessingSecurityScopedResource(resolvedFile);
|
||||
});
|
||||
}
|
||||
}
|
||||
@@ -3,18 +3,19 @@ import 'dart:io';
|
||||
import 'package:win32_registry/win32_registry.dart';
|
||||
|
||||
import '../../util.dart';
|
||||
import '../../win32.dart';
|
||||
|
||||
doRegisterUrlScheme(String scheme) {
|
||||
if (Util.isWindows()) {
|
||||
final schemeKey = 'Software\\Classes\\$scheme';
|
||||
final appPath = Platform.resolvedExecutable;
|
||||
|
||||
_upsertRegistry(
|
||||
upsertRegistry(
|
||||
schemeKey,
|
||||
'URL Protocol',
|
||||
'',
|
||||
);
|
||||
_upsertRegistry(
|
||||
upsertRegistry(
|
||||
'$schemeKey\\shell\\open\\command',
|
||||
'',
|
||||
'"$appPath" "%1"',
|
||||
@@ -43,22 +44,22 @@ doRegisterDefaultTorrentClient() {
|
||||
final appPath = Platform.resolvedExecutable;
|
||||
final iconPath =
|
||||
'${File(appPath).parent.path}\\data\\flutter_assets\\assets\\tray_icon\\icon.ico';
|
||||
_upsertRegistry(
|
||||
upsertRegistry(
|
||||
_torrentRegKey,
|
||||
'',
|
||||
_torrentRegValue,
|
||||
);
|
||||
_upsertRegistry(
|
||||
upsertRegistry(
|
||||
_torrentAppRegKey,
|
||||
'',
|
||||
'Torrent file',
|
||||
);
|
||||
_upsertRegistry(
|
||||
upsertRegistry(
|
||||
'$_torrentAppRegKey\\DefaultIcon',
|
||||
'',
|
||||
iconPath,
|
||||
);
|
||||
_upsertRegistry(
|
||||
upsertRegistry(
|
||||
'$_torrentAppRegKey\\shell\\open\\command',
|
||||
'',
|
||||
'"$appPath" "file:///%1"',
|
||||
@@ -74,20 +75,3 @@ doUnregisterDefaultTorrentClient() {
|
||||
Registry.currentUser.deleteKey(_torrentAppRegKey, recursive: true);
|
||||
}
|
||||
}
|
||||
|
||||
// Add Windows registry key and value if not exists
|
||||
_upsertRegistry(String keyPath, String valueName, String value) {
|
||||
RegistryKey regKey;
|
||||
try {
|
||||
regKey = Registry.openPath(RegistryHive.currentUser,
|
||||
path: keyPath, desiredAccessRights: AccessRights.allAccess);
|
||||
} catch (e) {
|
||||
regKey = Registry.currentUser.createKey(keyPath);
|
||||
}
|
||||
|
||||
if (regKey.getValueAsString(valueName) != value) {
|
||||
regKey
|
||||
.createValue(RegistryValue(valueName, RegistryValueType.string, value));
|
||||
}
|
||||
regKey.close();
|
||||
}
|
||||
@@ -0,0 +1,32 @@
|
||||
import 'package:win32_registry/win32_registry.dart';
|
||||
|
||||
/// Check registry key
|
||||
/// If the key does not exist or the value is different, return false
|
||||
checkRegistry(String keyPath, String valueName, String value) {
|
||||
RegistryKey regKey;
|
||||
try {
|
||||
regKey = Registry.openPath(RegistryHive.currentUser, path: keyPath);
|
||||
return regKey.getValueAsString(valueName) == value;
|
||||
} catch (e) {
|
||||
return false;
|
||||
}
|
||||
}
|
||||
|
||||
/// Upsert registry key
|
||||
/// If the key does not exist, create it
|
||||
/// If the value does not exist or is different, update it
|
||||
upsertRegistry(String keyPath, String valueName, String value) {
|
||||
RegistryKey regKey;
|
||||
try {
|
||||
regKey = Registry.openPath(RegistryHive.currentUser,
|
||||
path: keyPath, desiredAccessRights: AccessRights.allAccess);
|
||||
} catch (e) {
|
||||
regKey = Registry.currentUser.createKey(keyPath);
|
||||
}
|
||||
|
||||
if (regKey.getValueAsString(valueName) != value) {
|
||||
regKey
|
||||
.createValue(RegistryValue(valueName, RegistryValueType.string, value));
|
||||
}
|
||||
regKey.close();
|
||||
}
|
||||
@@ -6,8 +6,6 @@ PODS:
|
||||
- device_info_plus (0.0.1):
|
||||
- FlutterMacOS
|
||||
- FlutterMacOS (1.0.0)
|
||||
- macos_secure_bookmarks (0.0.3):
|
||||
- FlutterMacOS
|
||||
- package_info_plus (0.0.1):
|
||||
- FlutterMacOS
|
||||
- path_provider_foundation (0.0.1):
|
||||
@@ -32,7 +30,6 @@ DEPENDENCIES:
|
||||
- desktop_drop (from `Flutter/ephemeral/.symlinks/plugins/desktop_drop/macos`)
|
||||
- device_info_plus (from `Flutter/ephemeral/.symlinks/plugins/device_info_plus/macos`)
|
||||
- FlutterMacOS (from `Flutter/ephemeral`)
|
||||
- macos_secure_bookmarks (from `Flutter/ephemeral/.symlinks/plugins/macos_secure_bookmarks/macos`)
|
||||
- package_info_plus (from `Flutter/ephemeral/.symlinks/plugins/package_info_plus/macos`)
|
||||
- path_provider_foundation (from `Flutter/ephemeral/.symlinks/plugins/path_provider_foundation/darwin`)
|
||||
- screen_retriever (from `Flutter/ephemeral/.symlinks/plugins/screen_retriever/macos`)
|
||||
@@ -51,8 +48,6 @@ EXTERNAL SOURCES:
|
||||
:path: Flutter/ephemeral/.symlinks/plugins/device_info_plus/macos
|
||||
FlutterMacOS:
|
||||
:path: Flutter/ephemeral
|
||||
macos_secure_bookmarks:
|
||||
:path: Flutter/ephemeral/.symlinks/plugins/macos_secure_bookmarks/macos
|
||||
package_info_plus:
|
||||
:path: Flutter/ephemeral/.symlinks/plugins/package_info_plus/macos
|
||||
path_provider_foundation:
|
||||
@@ -75,7 +70,6 @@ SPEC CHECKSUMS:
|
||||
desktop_drop: 69eeff437544aa619c8db7f4481b3a65f7696898
|
||||
device_info_plus: 74e614483d05c89290d30a4c8feae15d555f7427
|
||||
FlutterMacOS: 8f6f14fa908a6fb3fba0cd85dbd81ec4b251fb24
|
||||
macos_secure_bookmarks: cff041c4b377fa00941bb901aaec4d27fac5edf2
|
||||
package_info_plus: f5790acc797bf17c3e959e9d6cf162cc68ff7523
|
||||
path_provider_foundation: 2b6b4c569c0fb62ec74538f866245ac84301af46
|
||||
screen_retriever: 59634572a57080243dd1bf715e55b6c54f241a38
|
||||
|
||||
@@ -15,7 +15,7 @@
|
||||
<BuildableReference
|
||||
BuildableIdentifier = "primary"
|
||||
BlueprintIdentifier = "33CC10EC2044A3C60003C045"
|
||||
BuildableName = "gopeed.app"
|
||||
BuildableName = "Gopeed.app"
|
||||
BlueprintName = "Runner"
|
||||
ReferencedContainer = "container:Runner.xcodeproj">
|
||||
</BuildableReference>
|
||||
@@ -31,7 +31,7 @@
|
||||
<BuildableReference
|
||||
BuildableIdentifier = "primary"
|
||||
BlueprintIdentifier = "33CC10EC2044A3C60003C045"
|
||||
BuildableName = "gopeed.app"
|
||||
BuildableName = "Gopeed.app"
|
||||
BlueprintName = "Runner"
|
||||
ReferencedContainer = "container:Runner.xcodeproj">
|
||||
</BuildableReference>
|
||||
@@ -54,7 +54,7 @@
|
||||
<BuildableReference
|
||||
BuildableIdentifier = "primary"
|
||||
BlueprintIdentifier = "33CC10EC2044A3C60003C045"
|
||||
BuildableName = "gopeed.app"
|
||||
BuildableName = "Gopeed.app"
|
||||
BlueprintName = "Runner"
|
||||
ReferencedContainer = "container:Runner.xcodeproj">
|
||||
</BuildableReference>
|
||||
@@ -71,7 +71,7 @@
|
||||
<BuildableReference
|
||||
BuildableIdentifier = "primary"
|
||||
BlueprintIdentifier = "33CC10EC2044A3C60003C045"
|
||||
BuildableName = "gopeed.app"
|
||||
BuildableName = "Gopeed.app"
|
||||
BlueprintName = "Runner"
|
||||
ReferencedContainer = "container:Runner.xcodeproj">
|
||||
</BuildableReference>
|
||||
|
||||
@@ -8,7 +8,7 @@
|
||||
PRODUCT_NAME = Gopeed
|
||||
|
||||
// The application's bundle identifier
|
||||
PRODUCT_BUNDLE_IDENTIFIER = com.gopeed
|
||||
PRODUCT_BUNDLE_IDENTIFIER = com.gopeed.gopeed
|
||||
|
||||
// The copyright displayed in application information
|
||||
PRODUCT_COPYRIGHT = Copyright © 2022 com.example. All rights reserved.
|
||||
@@ -2,19 +2,9 @@
|
||||
<!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
|
||||
<plist version="1.0">
|
||||
<dict>
|
||||
<key>com.apple.security.app-sandbox</key>
|
||||
<true/>
|
||||
<key>com.apple.security.cs.allow-jit</key>
|
||||
<true/>
|
||||
<key>com.apple.security.files.bookmarks.app-scope</key>
|
||||
<true/>
|
||||
<key>com.apple.security.files.downloads.read-write</key>
|
||||
<true/>
|
||||
<key>com.apple.security.files.user-selected.read-write</key>
|
||||
<true/>
|
||||
<key>com.apple.security.network.client</key>
|
||||
<true/>
|
||||
<key>com.apple.security.network.server</key>
|
||||
<true/>
|
||||
</dict>
|
||||
</plist>
|
||||
@@ -2,17 +2,7 @@
|
||||
<!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
|
||||
<plist version="1.0">
|
||||
<dict>
|
||||
<key>com.apple.security.app-sandbox</key>
|
||||
<true/>
|
||||
<key>com.apple.security.files.bookmarks.app-scope</key>
|
||||
<true/>
|
||||
<key>com.apple.security.files.downloads.read-write</key>
|
||||
<true/>
|
||||
<key>com.apple.security.files.user-selected.read-write</key>
|
||||
<true/>
|
||||
<key>com.apple.security.network.client</key>
|
||||
<true/>
|
||||
<key>com.apple.security.network.server</key>
|
||||
<true/>
|
||||
</dict>
|
||||
</plist>
|
||||
@@ -658,22 +658,6 @@ packages:
|
||||
url: "https://pub.dev"
|
||||
source: hosted
|
||||
version: "1.3.0"
|
||||
logging_appenders:
|
||||
dependency: transitive
|
||||
description:
|
||||
name: logging_appenders
|
||||
sha256: e329e7472f99416d0edaaf6451fe6c02dec91d34535bd252e284a0b94ab23d79
|
||||
url: "https://pub.dev"
|
||||
source: hosted
|
||||
version: "1.3.1"
|
||||
macos_secure_bookmarks:
|
||||
dependency: "direct main"
|
||||
description:
|
||||
name: macos_secure_bookmarks
|
||||
sha256: c3163875f8fd530a1654a7cf8aa426e6e208d28bf05724a1d4960e4b7d2ca1c6
|
||||
url: "https://pub.dev"
|
||||
source: hosted
|
||||
version: "0.2.1"
|
||||
macros:
|
||||
dependency: transitive
|
||||
description:
|
||||
|
||||
@@ -15,7 +15,7 @@ publish_to: "none" # Remove this line if you wish to publish to pub.dev
|
||||
# In iOS, build-name is used as CFBundleShortVersionString while build-number used as CFBundleVersion.
|
||||
# Read more about iOS versioning at
|
||||
# https://developer.apple.com/library/archive/documentation/General/Reference/InfoPlistKeyReference/Articles/CoreFoundationKeys.html
|
||||
version: 1.6.7+1
|
||||
version: 1.6.10+1
|
||||
|
||||
environment:
|
||||
sdk: ">=3.0.0 <4.0.0"
|
||||
@@ -42,7 +42,6 @@ dependencies:
|
||||
dio: ^5.2.1
|
||||
path_provider: ^2.1.4
|
||||
file_picker: ^8.1.2
|
||||
macos_secure_bookmarks: ^0.2.1
|
||||
rounded_loading_button_plus: ^3.0.1
|
||||
url_launcher: ^6.3.1
|
||||
logger: ^1.4.0
|
||||
@@ -108,6 +107,8 @@ flutter:
|
||||
assets:
|
||||
- assets/tray_icon/
|
||||
- assets/extension/
|
||||
# Browser extension native host binary, see https://github.com/GopeedLab/gopeed/tree/main/cmd/host
|
||||
- assets/host/
|
||||
|
||||
# An image asset can refer to one or more resolution-specific "variants", see
|
||||
# https://flutter.dev/assets-and-images/#resolution-aware
|
||||
|
||||
Reference in new issue
Block a user