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


MEGAMIND

Quote from: habi2 on Sep 18, 2024, 04:48 PMJust 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


umm i tried working on it too but i dont think as vcmp-proxy.dll is doing it maybe the versions are doing it vcmp-game.dll cuz i found out that vcmp-proxy.dll proxies to run the steam version of game

Could not load VC:MP dll.Invalid VC:MP dll path.C:\Users\magicuser\source\repos\0.4-spero\steamproxy\Release\steamproxy.pdb<assembly xmlns='urn:schemas-microsoft-com:asm.v1' manifestVersion='1.0'>
  <trustInfo xmlns="urn:schemas-microsoft-com:asm.v3">
    <security>
      <requestedPrivileges>
        <requestedExecutionLevel level='asInvoker' uiAccess='false' />
      </requestedPrivileges>
    </security>
  </trustInfo>
</assembly>
GetCommandLineA
GetFileAttributesA 
LoadLibraryA 
KERNEL32.dll 
MessageBoxA USER32.dll
VCRUNTIME140.dll
api-ms-win-crt-runtime-l1-1-0.dll
UnhandledExceptionFilter 
SetUnhandledExceptionFilter
GetCurrentProcess
TerminateProcess 
IsProcessorFeaturePresent
QueryPerformanceCounter
GetCurrentProcessId
GetCurrentThreadId 
GetSystemTimeAsFileTime
InitializeSListHead
IsDebuggerPresent
for mroe info on this nelson might know what this proxydll is doing bcz it is 9kb what do u expect? but i beleive vcmp-game.dll are the reason behind downloadign stuff

i tried some c++ to get the working of it the stuff is listed above more info here

Edit: with just a little test i deleted vcmp from everywhere and just used my vcmp browser and came to know that i was still able to downlaod files, that infact means that vcmp-game.dll is behind this not vcmp-proxy.dll

vcmp-proxy.dll -> tries to run -> vcmp-steam.dll if the path is correct, thats what i came to know..