There’s a maximum number 16 connections hard code in aria2 so when I want to add more connections I need to edit a line of code and recompile it
Edit max connections per server
Edit number arguments in NumberOptionHandler for MAX_CONNECTION_PER_SERVER in file “OptionHandlerFactory.cc”
from 16 to 64 the number is as you want.
OptionHandler* op(new NumberOptionHandler(PREF_MAX_CONNECTION_PER_SERVER,
"1", 1, 64, 'x'));
Build the aria 2
Install following packages.
- autoconf (gettext)
You can install all of it by running this command.
brew install gettext automake autoconf libtool libxml2 cppunit
If you install LibXML with brew you also need to link it to
sudo ln -s /usr/local/opt/libxml2/include/libxml2/libxml /usr/local/include/libxml
Add Gettext and libxml2 to your path for me it’s
Run config that you just create.
I’ll just use the default configuration.
If you want more details of it you can just copy steps from the homebrew script here https://github.com/Homebrew/homebrew-core/blob/master/Formula/aria2.rb.
Use make file to compile the code
Test all code (you can skip this step).
Run make install to generate the binary file.
Then you’ll get a new aria2c binary file complied in
You can check by the command.
Test the compiled aria2 binary file
/usr/local/bin/ is in your path.
Now you can test the aria2c binary file that you just compile.
aria2c -k 1M -s 64 -x 64 http://ipv4.download.thinkbroadband.com/1GB.zip
- maximum number of connections to one server.
You’ll see the number of connections is 64.
Done, Now you can use the binary file and unlock the aria 2 connections limit.