alexevladgabriel / fastdl-pterodactyl

FastDownload (automated / bash script) made special for the Pterodactyl Wings v1.X

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

FastDownload Pterodactyl v1.X

Automatic script what detects the creation & deletion of a server, and detect if the server is a Valve Game (Source/SRCDS)

AppID Game Supported
~ If you test a game and see it's working contact me to add to the list ⚠️
~ All HL1/HL2 games and mods
440 Team Fortress 2
500 Left 4 Dead
550 Left 4 Dead 2
730 Counter-Strike: Global Offensive
4000 Garry's Mod
225840 Sven Coop

Support me with a coffee <3

  • If you like my work, and want to support this repository, or another repositories (or addons in the feature)
  • Paypal: thesyntaxlv5@gmail.com

Requirements

  • Pterodactyl Wings 1.X
  • Pterodactyl Panel - API Key - Used to retrieve the game Admin -> Application API Create New API Key with (Nodes - read/Servers - read/Eggs - read)
  • Web Server (LiteSpeed/Apache/Nginx or others)

Installation

sudo apt-get install -y inotify-tools curl
  1. Run the command below to assign user www-data to group pterodactyl
  • gpasswd -a www-data pterodactyl
  1. Run the commands below to set group permissions for read and exec
  • chmod 755 /var/lib/pterodactyl/ && chmod 755 /var/lib/pterodactyl/volumes/
  1. Add the command below in the last line of Eggs "Install script"
  • chmod -R 750 /mnt/server/
  1. If you currently have servers installed, you can reinstall to set the new permissions or set manually running the command below (change UUID for your game server UUID):
  • chmod -R 750 /var/lib/pterodactyl/volumes/UUID/
    Example: chmod -R 750 /var/lib/pterodactyl/volumes/5267701d-8aa0-4071-a3f7-953a5a8e0a79/
  1. Put the scripts in their folders.
  • fastdl.sh - /etc/pterodactyl/fastdl.sh
  • fastdl.service - /etc/systemd/system/fastdl.service
  1. Change the values below from (fastdl.sh) with yours details
     HOME_URL="https://node.pterodactyl.io" 
     API_KEY="YOUR_GENERATED_API_KEY"
     FASTDL="/var/www/fastdl" 
    
  2. Enable the FastDL Service
  • systemctl enable fastdl

Nginx Configuration

Without SSL:

server {
    listen 80;
    listen [::]:80;

	root /var/lib/pterodactyl/volumes;
	index index.html;

	server_name <domain>;

	location / {
		# First attempt to serve request as file, then
		# as directory, then fall back to displaying a 404.
		try_files $uri $uri/ =404;
		# Comment this line if dont want to list files (only after checking that your fastdl works)
		autoindex on;
	}
}

With SSL:

server {
    listen 443 ssl http2;
    listen [::]:443 ssl http2;
    ssl on;
    ssl_certificate         /etc/ssl/certs/serverscstrike.com-cert.pem;
    ssl_certificate_key     /etc/ssl/private/serverscstrike.com-key.pem;

	root /var/lib/pterodactyl/volumes;
	index index.html;

	server_name <domain>;

	location / {
		# First attempt to serve request as file, then
		# as directory, then fall back to displaying a 404.
		try_files $uri $uri/ =404;
		# Comment this line if dont want to list files (only after checking that your fastdl works)
		autoindex on;
	}

	location ~\.(sma|amxx|sp|smx|cfg|ini|log|bak|dat|sql|sq3|so|dll|php|zip|rar|jar|sh)$ {
		return 403;
	}
}

If you only want to add fastdl to a current nginx config, only add this, your fastdl will be: /fastdl

  location ^~ /fastdl {
	alias /var/www/pterodactyl-fastdl;

	# First attempt to serve request as file, then
	# as directory, then fall back to displaying a 404.
	try_files $uri $uri/ =404;
	# Comment this line if dont want to list files (only after checking that your fastdl works)
	autoindex on;

	location ~\.(sma|amxx|sp|smx|cfg|ini|log|bak|dat|sql|sq3|so|dll|php|zip|rar|jar|sh)$ {
		return 403;
	}
}

FastDL URL Link

Contact

  • Discord: Scai#8477

Contributing

Pull requests are welcome. For major changes, please open an issue first to discuss what you would like to change. Please make sure to update tests as appropriate.

License

GNU General Public License v3.0

About

FastDownload (automated / bash script) made special for the Pterodactyl Wings v1.X

License:GNU General Public License v3.0


Languages

Language:Shell 100.0%