There’s maximum 16 connection hard code in aria2 so when I want to split more connection 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 by run 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 you that you just create.
I’ll just using the default configuration.
If you want more details of it you can just copy steps from homebrew script here https://github.com/Homebrew/homebrew-core/blob/master/Formula/aria2.rb.
Generate make file.
Test all code (you can skip this step).
Run make install to generate the binary file.
Then you’ll get 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 connections to one server.
You’ll see the number of connections is 64.
Done, Now you can use the binary file and unlock aria 2 connections limit.