How to HTTP Download (Server owners and client players)

Started by habi2, Sep 17, 2024, 05:25 PM

Previous topic - Next topic

habi2

Today after some two hours of search, i found out what is http download of store files in 0.4.7. Since i need a large file for testing, i faked a 40 MB file as png. Ofcourse, through 'http' it was accessed and blue error message shown (probably showing file is invalid)

Do clients (players) need anything other than VCMP? Yes
Ans: Squid For Windows (https://squid.diladele.com/) (download first one (16 MB ). Install, it will automatically run in background after install. the default port is 3128). It is a proxy server, which means a program tell it to download things from websites and it will download without the program directly connecting to website.

In server-side what additional things to be done? (*)
First, i will tell you what settings i did. Since i have an amazon free windows vps and ports 8192 aswell as 80 is forwarded, i can run Xampp.
In C:\xampp\apache\conf\httpd.conf
Alias /store "C:/Users/Administrator/Desktop/Blank Server 64 bit/store"

<Directory "C:/Users/Administrator/Desktop/Blank Server 64 bit/store">
    Options Indexes FollowSymLinks
    AllowOverride None
    Require all granted
</Directory>
added at bottom of file in notepad.
Now if i go to internet explorer (in vps) and type localhost/store i can see

So if i replace localhost with IP address of it, i can still see the store. So 'the root of the store is accessible' over http.
Next, open server.cfg and (replace with your ip)
storeurl http://18.132.xx.100/store/
*: I think you can put your store files externally in some website (which lists it as directory) and use that website's url also. This is the case if you are unable to setup a webserver on the same machine.
Run VCMP v39 Server.

You probably won't see anything new.

/setconfig net_dl_proxy http://127.0.0.1:3128
The above command you have to type in vcmp-game. Or %appdata%/VCMP/04beta/vcmp_config.txt change there.
3128 is the port of our proxy server. Our proxy server is running on localhost




Checking if success.
Open squid folder, go to var/log and check the log file

Since i tested with a fake file of 40 MB, it was not a complete success.

Thanks for reading.


MEGAMIND

i totally understand bcz xampp users know
what this is C:\xampp\apache\conf\httpd.conf

habi2

Just found that VCMP has it's own proxy( may be vcmp-proxy.dll in appdata is behind this ). Even when my custom proxy server is turned off, vcmp is still 'http downloading' store files from 'storeurl'.

In summary, it is not mandatory for clients to run a proxy server, as i thought in first post. (squid etc)

So it is up to the server owners to decide how client will download store files. They can host store file on some website with directory listing enabled on that directory and use that url for paramter storeurl in server.cfg.

Good luck