<?xml version="1.0"?>
<feed xmlns="http://www.w3.org/2005/Atom" xml:lang="ru">
	<id>https://rage.grandroleplay.ru/index.php?action=history&amp;feed=atom&amp;title=FastDL</id>
	<title>FastDL - История изменений</title>
	<link rel="self" type="application/atom+xml" href="https://rage.grandroleplay.ru/index.php?action=history&amp;feed=atom&amp;title=FastDL"/>
	<link rel="alternate" type="text/html" href="https://rage.grandroleplay.ru/index.php?title=FastDL&amp;action=history"/>
	<updated>2026-07-24T18:27:28Z</updated>
	<subtitle>История изменений этой страницы в вики</subtitle>
	<generator>MediaWiki 1.43.9</generator>
	<entry>
		<id>https://rage.grandroleplay.ru/index.php?title=FastDL&amp;diff=1101&amp;oldid=prev</id>
		<title>imported&gt;Disinterpreter в 20:38, 23 мая 2020</title>
		<link rel="alternate" type="text/html" href="https://rage.grandroleplay.ru/index.php?title=FastDL&amp;diff=1101&amp;oldid=prev"/>
		<updated>2020-05-23T20:38:07Z</updated>

		<summary type="html">&lt;p&gt;&lt;/p&gt;
&lt;p&gt;&lt;b&gt;Новая страница&lt;/b&gt;&lt;/p&gt;&lt;div&gt;= FastDL =&lt;br /&gt;
FastDL is a technology which can receive files from another server. The major advantage of doing this is balancing the network.&lt;br /&gt;
&lt;br /&gt;
== Setting up FastDL ==&lt;br /&gt;
&lt;br /&gt;
For the first step, you need to &amp;quot;cook&amp;quot; the web server that will be distributing the files.&lt;br /&gt;
&lt;br /&gt;
You need to create a VirtualHost ( in nginx, we will call it &amp;quot;server&amp;quot; )&lt;br /&gt;
In the root of this VirtualHost, you need to make two directories. “file” and “list”.&lt;br /&gt;
&lt;br /&gt;
Here is an example configuration:&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;nginx&amp;quot;&amp;gt;&lt;br /&gt;
server {&lt;br /&gt;
        listen 80;&lt;br /&gt;
        listen [::]:80;&lt;br /&gt;
&lt;br /&gt;
        root /var/www/rage-cache;&lt;br /&gt;
&lt;br /&gt;
        index index.html index.htm index.nginx-debian.html;&lt;br /&gt;
        # server_name my.domain.com 127.0.0.1 other.domain.net;&lt;br /&gt;
        server_name IP;&lt;br /&gt;
        # use access log only for debug&lt;br /&gt;
        access_log /var/log/nginx/cache_acces;&lt;br /&gt;
        location / {&lt;br /&gt;
                autoindex on;&lt;br /&gt;
        }&lt;br /&gt;
}&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&amp;#039;&amp;#039;Tip: You can use the &amp;quot;autoindex on&amp;quot; feature when setting up, this helps with debugging.&amp;#039;&amp;#039;&lt;br /&gt;
&lt;br /&gt;
The next step isto place the files in the directory.&lt;br /&gt;
&lt;br /&gt;
== Script ==&lt;br /&gt;
The author of the article recommends using his script:&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;bash&amp;quot;&amp;gt;&lt;br /&gt;
wget https://raw.githubusercontent.com/Disinterpreter/rage-fastdl-manager/master/main.pl&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Making the config (create a config.json file nearby)&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;json&amp;quot;&amp;gt;&lt;br /&gt;
{&lt;br /&gt;
   &amp;quot;host&amp;quot;: &amp;quot;http://serverip:22006&amp;quot;,&lt;br /&gt;
   &amp;quot;cache-path&amp;quot;: &amp;quot;/var/www/cache&amp;quot;&lt;br /&gt;
}&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;#039;&amp;#039;&amp;#039;ATTENTION:&amp;#039;&amp;#039;&amp;#039; cache-path must contain the path to the root of your cache directory.&lt;br /&gt;
&lt;br /&gt;
Great! You have downloaded the script and written the config. Now you can turn on your server (if it was disabled) and then run our script with the command &amp;quot;sh ./main.pl&amp;quot;&lt;br /&gt;
&lt;br /&gt;
&amp;#039;&amp;#039;&amp;#039;Pay attention: On a debian-like OS you need to install the following packages: libjson-perl libtest-lwp-useragent-perl libfile-slurp-perl&amp;#039;&amp;#039;&amp;#039;&lt;br /&gt;
&lt;br /&gt;
For other operating systems, you can use cpan install JSON LWP::UserAgent File::Slurp&lt;br /&gt;
&lt;br /&gt;
== If you don’t want to use the script ==&lt;br /&gt;
&lt;br /&gt;
When the client is joining the server, it makes the following request to the Fast-DL server: &amp;quot;GET /list&amp;quot; which may respond with something like id:name:hash.&lt;br /&gt;
After that, it sorts the files and starts to download them, as follows:&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;http&amp;quot;&amp;gt;&lt;br /&gt;
GET /file/0&lt;br /&gt;
GET /file/1&lt;br /&gt;
GET /file/2&lt;br /&gt;
...&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
You can also make your own script if you are a programmer.&lt;br /&gt;
&lt;br /&gt;
After launching the program, it takes the files automatically and puts them in the necessary directory of the web-server.&lt;br /&gt;
&lt;br /&gt;
&amp;#039;&amp;#039;Tip: You can check these files if you go to the link in your browser (if your &amp;quot;autoload&amp;quot; was enabled)&amp;#039;&amp;#039;&lt;br /&gt;
&lt;br /&gt;
== RAGE Server ==&lt;br /&gt;
Finally, the last step is to edit the rage config. As you can read in the [https://wiki.rage.mp/index.php?title=Server_settings documentation], you need to insert the option “fastdl-host” in your config file.&lt;br /&gt;
&lt;br /&gt;
Example:&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;json&amp;quot;&amp;gt;&lt;br /&gt;
{&lt;br /&gt;
    &amp;quot;fastdl-host&amp;quot;: &amp;quot;domain&amp;quot;&lt;br /&gt;
}&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
Then restart the server.&lt;br /&gt;
&lt;br /&gt;
&amp;#039;&amp;#039;&amp;#039;ATTENTION:  The Author of the article recommends syncing the files (executing ./main.pl) after each server restart.&amp;#039;&amp;#039;&amp;#039;&lt;br /&gt;
&lt;br /&gt;
= See also =&lt;br /&gt;
* [[Server settings]]&lt;br /&gt;
{{ScriptingTutorials}}&lt;br /&gt;
&lt;br /&gt;
[[Category:Tutorials]]&lt;/div&gt;</summary>
		<author><name>imported&gt;Disinterpreter</name></author>
	</entry>
</feed>