Code Monkey home page Code Monkey logo

fastdl-pterodactyl's Introduction

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: [email protected]

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

fastdl-pterodactyl's People

Contributors

alexevladgabriel avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar

fastdl-pterodactyl's Issues

Pterodactyl FastDL Daemon

Hi,

This is what throws me when I enter systemctl status fastdl.service or when restarting the service. Is there a solution for that?

● fastdl.service - Pterodactyl FastDL Daemon
Loaded: loaded (/etc/systemd/system/fastdl.service; enabled; vendor preset: enabled)
Active: failed (Result: exit-code) since Fri 2021-08-06 20:58:49 CEST; 21h ago
Main PID: 908 (code=exited, status=203/EXEC)

Aug 06 20:58:49 [1]: fastdl.service: Main process exited, code=exited,>
Aug 06 20:58:49 [1]: fastdl.service: Failed with result 'exit-code'.
Aug 06 20:58:49 [1]: fastdl.service: Scheduled restart job, restart co>
Aug 06 20:58:49 [1]: Stopped Pterodactyl FastDL Daemon.
Aug 06 20:58:49 [1]: fastdl.service: Start request repeated too quickl>
Aug 06 20:58:49 [1]: fastdl.service: Failed with result 'exit-code'.
Aug 06 20:58:49 [1]: Failed to start Pterodactyl FastDL Daemon.
Aug 06 21:04:05 [1]: fastdl.service: Start request repeated too quickl>
Aug 06 21:04:05 [1]: fastdl.service: Failed with result 'exit-code'.
Aug 06 21:04:05 [1]: Failed to start Pterodactyl FastDL Daemon.

Files are not being bzipped

Hello, your script looks good but it makes no sense because the files are not compressed and fastdl will not be as fast like this. Ideally you could have an option to bzip2 the files instead of symlinking them

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.