Methods to Deploy AriaNg (Docker,http,https,) - NETSEC

Latest

Learning, Sharing, Creating

Cybersecurity Memo

Thursday, October 13, 2022

Methods to Deploy AriaNg (Docker,http,https,)

AriaNg is a modern web frontend making aria2 easier to use. AriaNg is written in pure html & javascript, thus it does not need any compilers or runtime environment. There are lots of ways to deploy AriaNg. In this post, I summarizes some typical ways to do that especially for https configuration on some Serverless platforms such as Cloudflare.


Diagram



Cloud AriaNg (No Need Deployment)

Online Cloud AriaNg Sites:
Tips: The Aria2 RPC configuration including RPC password will not be saved on AriaNG server. All those settings are cached into your local browser. AriaNG is just used to send the commands to Aria2 to execute. 

Docker

If you already has a server and installed docker, you can use following docker command to deploy it yourself:

docker run -d \
    --name ariang \
    --log-opt max-size=1m \
    --restart unless-stopped \
    -p 6880:6880 \
    p3terx/ariang
Make sure port 6880 is opened on your firewall. 

Log into Docker 
docker exec -it ariang bash

Other docker commands:

Reboot:
  • docker restart aria2-pro

Re-deploy: 
  • docker rm -f aria2-pro
  • docker rmi p3terx/aria2-pro
  • rm -rf ~/aria2-config
  • docker pull p3terx/aria2-pro
  • docker run <...>

Check Logs
  • Realtime logs:
    • docker logs -f --tail 30 aria2-pro
  • Export logs
    • docker logs aria2-pro > ~/aria2-pro.log


https - Github Page


1 Go to AriaNg's official Github site to download AriaNg-AllInOne zip file from url : https://github.com/mayswind/AriaNg/releases


2 Unzip and get index.html file


3 Create a new Github repository



4 Upload unzipped index.html file to this repository


5 That is only file you will need to add. You might want to add another readme file to describe your repository and usage.



6 Go to your repository's settings and choose page


7 Choose main branch and root folder, then save


8 wait a couple of seconds then refresh your page, you should be able to get a message to say your site is live at URL as show below:


9 Now you can visit your AriaNg page using assigned the url from Github

Tips: This simple settings will only get you a default https AriaNg, not able to change to http. You can read next section to get http configuration.

http - Github Page with Custom Domain

Since AriaNg https connection will only allow you to connect to https RPC port of Aria2, it might not meet lots of people's requirement if they are still using http for Aria2. We can use custom domain and not enable https for this Github page to achieve this setting. 

1 Verify your own domain

You will need to add a txt record in your domain provider. In my case, it is Cloudflare.

2 After verified your domain for your github account, you can add custom domain into your repository's page:


Tips: Don't enable https for your page since you want to access your AriaNg page on http. 

3 add a cname record in Cloudflare (that is my domain provider). 



4 Visit your new Github Ariang page on http:


https - Cloudflare page and certificates



1 Create 


2 Create 


3 Create 


4 test







https - Docker + NPM (Nginx Proxy Manager)



1 Create 


2 Create 


3 Create 


4 test








Videos

 







No comments:

Post a Comment