Mytget is a multi-thread downloader accelerator for GNU/Linux.
It forks from http://myget.sourceforge.net/
- Supports HTTP, HTTPS, FTP protocols
- Supports HTTP-GET proxy
- Resumes the aborted downloads
- Supports directory download
- Can accelerate downloading through using multi-connections
- Supports large file( > 4G )
Install the necessary compile dependencies:
Archlinux:
yay -S mytget
CentOS:
sudo yum install -y git cmake gcc-c++ openssl-devel
Ubuntu:
sudo apt-get install -y git cmake g++ libssl-dev
macOS:
brew install openssl
Fixed it on macOS when cmake cannot find OpenSSL:
# Intel Mac
cmake -DOPENSSL_ROOT_DIR=/usr/local/opt/openssl -DOPENSSL_LIBRARIES=/usr/local/opt/openssl/lib .
# Apple Silicon (M1/M2/M3)
cmake -DOPENSSL_ROOT_DIR=/opt/homebrew/opt/openssl -DOPENSSL_LIBRARIES=/opt/homebrew/opt/openssl/lib .
Make sure your cmake version >= 3.10
git clone https://github.com/lytsing/Mytget.git
cd Mytget/
cmake .
make && sudo make install
The project version is defined in the top-level CMakeLists.txt as project(mytget VERSION 1.13 LANGUAGES C CXX) and is used for the mytget -v output.
Build options (for packagers and distros):
| Option | Default | Description |
|---|---|---|
CMAKE_BUILD_TYPE |
(empty → Release) | Release = optimized, Debug = with debug symbols |
HAVE_SSL |
ON | Enable HTTPS (requires OpenSSL) |
MYTGET_DEBUG_LOG |
OFF | Enable compile-time verbose debug log |
MYTGET_STATIC |
OFF | Link statically (adds -static for packaging) |
Examples:
cmake -DCMAKE_BUILD_TYPE=Release .
cmake -DCMAKE_BUILD_TYPE=Release -DMYTGET_STATIC=ON .
cmake -DHAVE_SSL=OFF .
$ mytget -h
Mytget 1.13: A download accelerator for GNU/Linux
Usage: mytget [options]... [URL]...
Options:
-A, --user-agent=UA Set the user agent [UA]
-b, --debug Show the debug message
-c, --count=num Set the retry count to [num], no limit when "0", the default is "99"
-d, --directory=dir Set the local directory to [dir], the default is "."
-o, --output=FILE Write output to FILE (like curl -o)
-H, --host=host Modify `Host: [host]' header in HTTP request.
-h, --help A brief summary of all the options
-i, --interval=num Set the ftp retry interval to [num] seconds, the default is "5"
-n, --number=num Use [num] connections instead of the default (4)
-r, --referer=URL Include `Referer: [URL]' header in HTTP request.
-t, --timeout=num Set the connection timeout to [num] seconds, the default is "30"
-v, --version Show the version of the mytget and exit
-x, --proxy=URL Set the proxy [URL]
Download a file (default: 4 connections, current directory):
$ mytget https://example.com/file.zip
Save to a specific path (creates parent directories if needed, like curl -o):
$ mytget -o ~/Downloads/file.zip https://example.com/file.zip
Save to a directory (keeps the original filename):
$ mytget -d ~/Downloads https://example.com/file.zip
Single-thread download:
$ mytget -n 1 -o page.html https://www.example.com/
Use a proxy:
$ mytget -x http://proxy.example.com:8080 -o file.bin https://example.com/file.bin
Resume after interruption (re-run the same command; mytget uses a .mg! temp file):
$ mytget -o bigfile.iso https://example.com/bigfile.iso
# ... interrupt with Ctrl+C, then run again:
$ mytget -o bigfile.iso https://example.com/bigfile.iso
Show version and build info:
$ mytget -v