YunBT: A multi-user download program based on ThinkCMS, supporting Magnet and HTTP downloads

888u

Last update at :2024-07-07,Edit by888u

YunBT is a multi-user download program based on ThinkCMS, supporting Magnet and HTTP downloads. Each individual user supports 10 tasks, and the default download file is up to 10GB, which can be modified in the background. After the download is completed, the user can directly view the downloaded file. Only mp4 files are supported for online playback. Administrators can add users' downloads and view and manage download tasks.

The download tool is not supported for the time being. You can download it in the browser.

The following is the installation process.

1. Aria2

Install Aria2 apt-get update && apt-get install -y aria2

screen -dmS aria2 aria2c --enable-rpc --rpc-listen-all=true --rpc-allow-origin-all -c To download Magnet, you need to import DHT.data

2. PHP

php>7 Install fileinfo plug-in in php under lnmp lnmp1.4 Install php fileinfo extension method

  • Step one: Find the installed version of php in lnmp1.4 Use the command tar -jxvf php-7.1.7.tar.bz2 to decompress
  • Step 2: Find the fileinfo folder in the decompressed php-7.1.7 folder, and then use the command cd /home/xxx/lnmp1.4/src/php-7.1.7/ext/fileinfo to enter fileinfo folder
  • Step 3: Enter /usr/local/php/bin/phpize to get the data
  • Step 4: Use the following command to compile and install ./configure -with-php-config=/usr/local/php/bin/php-config make && make install
  • Step 5: Modify /usr/local/php/etc/php.ini and search for: extension = then the last extension= and then add extension = “fileinfo.so” Save and execute /etc/init.d/ php-fpm restart Restart.

3. Nginx

nginx modifies fastcgi.conf configuration

The file under lnmp is at /usr/local/nginx/conf/fastcgi.conf

Put one of them

#fastcgi_param PHP_ADMIN_VALUE "open_basedir=$document_root/:/tmp/:/proc/"; fastcgi_param PHP_ADMIN_VALUE "open_basedir=$document_root/../:/tmp/:/proc/";

Nginx configuration

The following file is the configuration under lnmp

server { listen 80; #listen [::]:80; server_name yunbt.w4.pwt; index index.html index.htm index.php default.html default.htm default.php; root /home/wwwroot/www.yunbt.net/public; location/{ if (!-e $request_filename) { rewrite ^(.*)$ /index.php?s=/$1 last; } rewrite ^/file/(.*) /file.php?file=$1 last; } location/afile{ internal; alias /home/wwwroot/www.yunbt.net/public/file; } #error_page 404 /404.html; # Deny access to PHP files in specific directory #location ~ /(wp-content|uploads|wp-includes|images)/.*\.php$ { deny all; } location ~* ^/(file|upload)/.*\.(php|php5)$ { deny all; } include enable-php.conf; location ~ .*\.(gif|jpg|jpeg|png|bmp|swf)$ { expires 30d; } location ~ .*\.(js|css)?$ { expires 12h; } location ~ /.well-known { allow all; } location ~ /\. { deny all; } access_log /home/wwwlogs/www.yunbt.net.log; }

4. Database

Create database name yunbt Username yunbt Password a123456 Database import yunbt.sql

Database configuration data/conf/database.php

5. Administrator

Username admin Password a123456

cron< /h3>

Add a scheduled task crontab -e

*/1 * * * * curl http://www.yunbt.net/portal/cron/download */3 * * * * python3 /home/wwwroot/www.yunbt.net/python/cron_move.py */1 * * * * python3 /home/wwwroot/www.yunbt.net/python/cron_ffmpeg.py */30 * * * * python3 /home/wwwroot/www.yunbt.net/python/cron_download.py

Please replace www.yunbt.net with your own domain name

6. python

python3 pymysql pip3 install pymysql cron_ffmpeg.py

  • Line 44: Database configuration
  • Line 50: Set your web path

cron_move.py

  • Line 14: Set your web path
  • Line 15: Video file [no modification required]
  • Line 74: Database configuration

cron_download.py

  • Line 3: Limit the maximum download value [unit GB] default 10GB

7. ffmpeg

apt-get install ffmpeg

Permission modification

Modify the permissions under the data folder

chmod -R 777 data/ chmod -R 777 public/

8. Management background

your_domain.com/admin

Current functions:

  • Add user downloads
  • Download management
  • Modify the current maximum download file size [default 10GB]
  • Sharing function
  • Video transcoding

Project address: https://github.com/maysrp/yunBT

Recommended site search: US virtual host, server hosting, permanently free cloud server, website domain name registration, proxy server IP US host, US anti-attack server, Chinese IP segment, Japanese proxy server IP, registered domain name query,

p>

YunBT: A multi-user download program based on ThinkCMS, supporting Magnet and HTTP downloads

All copyrights belong to 888u unless special state
取消
微信二维码
微信二维码
支付宝二维码