Note: before

The company required to draw the logic architecture diagram of APP, but the computer was reinstalled with the system, so there was no Office. So I found a network disk to download the cracked version online, but the download speed was extremely slow, 60K-80K /s. By chance, I found the magic device Aria2, so I matched it according to the tutorial. Sure enough, there is no limit 1M to 2M/s.

Notice: To use Aria2, you must install the latest version of XCode!!

#### What is ariA2 AriA2 introduction

aria2 is a lightweight multi-protocol & multi-source command-line download utility. It supports HTTP/HTTPS, FTP, SFTP, BitTorrent and Metalink. aria2 can be manipulated via built-in JSON-RPC and XML-RPC interfaces.

In simple terms, it has the following features:

  • Support for multiple protocols: HTTP/HTTPS, FTP, SFTP, BitTorrent and Metalink
  • Multi-threaded connection: AriA2 automatically downloads files from multiple threads and makes full use of your bandwidth;
  • Light: does not occupy too many resources when running. According to the official introduction, the memory usage is usually between 4MB and 9MB. When the downstream speed is 2.8MB/s, the CPU usage is about 6%.
  • Full function BitTorrent client, can be used as a BT client, abandon thunderbolt.
  • Remote control on the RPC interface

1, Install Homebrew (skip this step if installed) paste this command to the terminal, press Enter, and wait quietly

/usr/bin/ruby -e "$(curl -fsSL https://raw.githubusercontent.com/Homebrew/install/master/install)"
Copy the code

2, Install Aria2 paste this command to the terminal, press Enter, and wait quietly

brew install aria2
Copy the code

###3, Set the configuration list

Create a new configuration file named aria2.conf and copy the following contents into the file.

    # username
    #rpc-user=user
    # your password
    #rpc-passwd=passwd
    # Do not use the above authentication mode. The following token mode is recommended
    Set the encryption key
    #rpc-secret=token
    # allows RPC
    enable-rpc=true
    # Allow all sources, web interface cross-domain permissions required
    rpc-allow-origin-all=true
    If false, only listen on local ports
    rpc-listen-all=true
    #RPC port, only changed if the default port is occupied
    #rpc-listen-port=6800
    # Maximum number of simultaneous downloads (number of tasks), recommended route value: 3
    max-concurrent-downloads=5
    # resumable
    continue=true
    Number of connections to the server
    max-connection-per-server=5
    The maximum number of download threads depends on how many slices can be split, which is important for small files
    min-split-size=10M
    # Maximum number of threads per file. Route suggestion: 5
    split=10
    # Download speed limit
    max-overall-download-limit=0
    # Single file speed limit
    max-download-limit=0
    # upload speed limit
    max-overall-upload-limit=0
    # Single file speed limit
    max-upload-limit=0
    Disconnect connections that are too slow
    #lowest-speed-limit=0
    For validation, a release later than 1.16.1 is required
    #referer=*
    The default is the current startup location
    dir=/User/xxx/Downloads
    # File cache, use the built-in file cache, if you don't trust the Linux kernel file cache and disk built-in cache to use, requires version 1.16 or later
    #disk-cache=0
    # Another way to cache Linux files. Make sure your kernel supports this option before using it. Version 1.15 or later is required.
    #enable-mmap=true
    File preallocation can effectively reduce file fragmentation and improve disk performance. The disadvantage is that the pre-allocation time is longer
    None < falloc? Trunc << prealloc, Falloc, and Trunc require file system and kernel support
    file-allocation=prealloc
Copy the code

# # # 4, start

In the terminal, enter aria2c –conf-path=< path > to change path to the absolute path of the aria2.conf file you just saved. Aria2. For instance, the conf is put inside a document, the PATH is/Users/XXX/Documents/aria2. Conf. You can use the -d argument to make Aria2 run in the background, even if the terminal is shut down.

Complete run command is as follows: aria2c – conf – path = “/ Users/XXX/Documents/aria2. Conf” – D, input the aria2 will start in the terminal. This command is required to restart after shutting down or shutting down aria2, so save this command.

###Usage Download the Aria2 visual clientIf you often download things from Baidu Cloud, cooperateBaiduExporterThis extension will be very handy to use. First download the extension, which is available for Chrome, Firefox, and Safari:Chrome Firefox Firefox (XPI): After downloading, open Firefox, Ctrl/Command + O open the file selection dialog box and select the XPI package to install.Safari: Double-click to install it. After the installation, enter the download interface of Baidu Cloud, and you will find an “Export download” button on the web page. Click the “ARIA2 RPC” button that pops up, and it will be automatically added to your download queue.Then we can see the download information in the GUI administration interface.

have fun 🙂