FastDL для Pterodactyl, Counter-Strike 1.6 сервера Ubuntu

WessTorn

Скриптер
Участник
Сообщения
10
Реакции
9
Баллы
3
<server_id> - Айди вашего сервера UUID (Смотреть в "settings" значение: Server ID)

Создаем папку

mkdir -p /var/www/fastdl

Создаем симлинк

ln -s /var/lib/pterodactyl/volumes/<server_id>/cstrike /var/www/fastdl/servername

Проверяем симлинк

ls -l /var/www/fastdl/servername

Устанавливаем nginx, если его нет.

sudo apt install nginx -y

Создаем конфиг nginx

sudo nano /etc/nginx/sites-enabled/fastdl.conf

Вставляем:

C-подобный:
server {
    listen 3050;
    server_name _;

    disable_symlinks off;

    sendfile on;
    tcp_nopush on;

    location /servername/ {
        alias /var/www/fastdl/servername/;
    }

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

    location ~ /(addons|cfg|logs) {
        deny all;
        return 403;
    }

    location / {
        return 403;
    }
}

Выдаем права для доступа nginx к серверу

sudo chmod o+rx /var/lib
sudo chmod o+rx /var/lib/pterodactyl
sudo chmod o+rx /var/lib/pterodactyl/volumes
sudo chmod o+rx /var/lib/pterodactyl/volumes/<server_id>
sudo chmod -R 755 /var/lib/pterodactyl/volumes/<server_id>/cstrike

Открываем порт для FastDL

sudo ufw allow 3050/tcp

Проверяем и применяем конфигурацию Nginx

sudo nginx -t
sudo systemctl reload nginx

Ваш FastDL доступен по ссылке:

http://<ip>:3050/servername/
 
Automatically binds the FastDL URL with the server UUID inside server.cfg upon installation.

in .json egg-install script
JSON:
{
  "cstrike/server.cfg": {
    "parser": "file",
    "find": {
      "sv_downloadurl": "sv_downloadurl \"http://[YOUR-NODE-URL-LINK]/{{env.P_SERVER_UUID}}/cstrike/\""
    }
  }
}
 
Automatically binds the FastDL URL with the server UUID inside server.cfg upon installation.

in .json egg-install script
JSON:
{
  "cstrike/server.cfg": {
    "parser": "file",
    "find": {
      "sv_downloadurl": "sv_downloadurl \"http://[YOUR-NODE-URL-LINK]/{{env.P_SERVER_UUID}}/cstrike/\""
    }
  }
}
Мы сами задаем название путей в ссылке в конфигурации Nginx и при создании симлинка. И мы не используем UUID в ссылке и папку cstrike
 
We set the path names in the link in the Nginx configuration and when creating the symlink. And we don't use UUID in the link and cstrike folder
Yes the methods are same i prefer UUID instead server name, its very simple and unique
gpasswd -a www data pterodactyl && chmod 755 /var/lib/pterodactyl/ && chmod 755 /var/lib/pterodactyl/volumes/
JSON:
{ //server install script
  "cstrike/server.cfg": {
    "parser": "file",
    "find": {
      "sv_downloadurl": "sv_downloadurl \"{{env.FASTDL_URL}}/{{env.P_SERVER_UUID}}/cstrike/\""
    }
  }
}

{ //variable
  "name": "FastDL URL",
  "description": "Enter your FastDL base URL (without trailing \/UUID\/cstrike\/). Example: http:\/\/fastdl.url.com",
  "env_variable": "FASTDL_URL",
  "default_value": "http:\/\/fastdl.url.com",
  "user_viewable": true,
  "user_editable": true,
  "rules": "required|string|max:200",
  "field_type": "text"
}
 

Кто просматривает тему

Назад
Верх