A CLI tool as well as go library to ultrafast download files over HTTP(s).
DISCLAIMER: FastGet performance heavily reliant on the network and CPU performance of the client machine. More importantly HTTP(s) endpoint must allow partial requests presenting
Accept-Ranges
and acceptingRange
headers.
fastget
available as Commnad-Line tool and Go library.
fastget [options] <URL_TO_DOWNLOAD>
$ fastget http://speedtest.tele2.net/10MB.zip
Download started..
3.50 MB / 3.50 MB 100 % [===========================================================================| 0s ] 267.59 KB/s
3.50 MB / 3.50 MB 100 % [===========================================================================| 0s ] 165.65 KB/s
3.50 MB / 3.50 MB 100 % [===========================================================================| 0s ] 116.10 KB/s
Download finished in 3s. File: E:\10MB.zip
Read the documentation for more information on the CLI usage.
Here is a simple example that finds fastest hosts:
fg, err := fastget.NewFastGetter("http://speedtest.tele2.net/10MB.zip")
if err != nil {
panic(err)
}
result, err := fg.Get()
if err != nil {
panic(err)
}
file := result.OutputFile
elapsedTime := result.ElapsedTime
Read the API documentation for more information on the library usage.
Download suitable binary for your OS at the releases page.
You can install or update fastget
with:
curl -s https://raw.githubusercontent.com/pgollangi/fastget/master/scripts/install.sh | sudo bash
Installs into /usr/local/bin
scoop bucket add pgollangi-bucket https://github.com/pgollangi/scoop-bucket.git
scoop install fastget
Updating:
scoop update fastget
brew install pgollangi/tap/fastget
Updating:
brew upgrade fastget
$ go get github.com/pgollangi/fastget/cmd/fastget
$ fastget
- Download and install binary from the latest release.
- Recommended: add
fastget
executable to your $PATH.
fastget
CLI is written in the Go programming language, so to build the CLI yourself, you first need to have Go installed and configured on your machine.
To download and install Go
, please refer to the Go documentation. Please download Go 1.14.x
or above.
$ git clone https://gitlab.com/pgollangi/fastget.git
$ cd fastget
$ go build cmd/fastget/main.go
$ fastget
Thanks for considering contributing to this project!
Please read the Contributions and Code of conduct.
Feel free to open an issue or submit a pull request!
Copyright © Prasanna Kumar
fastget
is open-sourced software licensed under the MIT license.
Built with ❤ by Prasanna Kumar