Listen Server - External Map Hosting Created 10 years ago2014-02-04 09:44:32 UTC by Dark Tree Dark Tree

Created 10 years ago2014-02-04 09:44:32 UTC by Dark Tree Dark Tree

Posted 10 years ago2014-02-04 10:58:16 UTC Post #317751
Hello TWHL,

I want to externally host custom maps on a webite I own, but I can't seem to link it correctly to my listen server. The maps just keep getting downloaded from the listen server itself (very slowly) instead of the external website.

I have these lines in listenserver.cfg AND the server.cfg:

sv_downloadurl "http://www.darktreemedia.com/hldm/valve"
sv_allowdownload 1
sv_allowupload 1

1. Is the sv_downloadurl correctly setup? Do I need another forward slash at the end? Does having the http:// on or off matter? The www?

2. Is that the only lines of code I need for HLDM to direct connections to my website to download files?

3. Do I need server.cfg or only listenserver.cfg?

4. Does this command work only with dedicated servers and not listen servers?

5. When players enter my server and the my server-side initializes, will clients not download maps from my website server if they aren't already in compressed form (.ztmp)?


Here is where my maps are located on the server, go ahead, click it. You can see how the structure is set up and if it is valid/correct:
http://www.darktreemedia.com/hldm/valve/

I've been researching all day, using the googles, searching forums, and trial and erroring without any success. Many threads in forums have people saying this works and that works, nice tutorials and step by step processes. I Can't seem to get it to work. As far as I can tell, as soon as someone connects to my server, it autocreates the compressed .ztmp files and then the player has to wait minutes while they download the compressed custom sounds, maps, models, etc.

What am I doing wrong? If what I say is all correct... AM I doing anything wrong? Has the method changed since I did this back in 2005? For instance, the compressed files are now .ztmp, when they used to be .bz2. As far as I know that should affect this problem. I also noticed that custom content is downloaded on the client side into valve_downloaded folders, and that the Half-Life game is now in the common folder beneath Steam instead of your username.

6. Do my server-side files need to reflect the "valve_downloaded" change?

Thank you ahead of time if any of you have insight into this!
Posted 10 years ago2014-02-04 22:30:21 UTC Post #317756
I ended up solving this myself and got it working! I answer all of my own questions (and more) for anyone in the future who has this issue.
1. Is the sv_downloadurl correctly setup? Do I need another forward slash at the end? Does having the http:// on or off matter? The www?
No, it is not set up correctly. Yes, you need a forward slash at the end. Without it, it will not work. Yes, it matters if there is an http:// at the beginning. Without it FAST DL will NOT work. No, the www. does not matter (in my experiments, this may vary with other users and how their content is hosted).

According to my folder structure, the proper method is:

sv_downloadurl "http://darktreemedia.com/hldm/valve/"
or
sv_downloadurl "http://www.darktreemedia.com/hldm/valve/"

The http:// is required, as well as the trailing forward slash ( / ) at the end of the URL. The www. did not make a difference.

NOTE #1: When testing out how to format your URL, be aware that you must shut down Half-Life completely to change server settings. You cannot just disconnect, leave hl.exe running, change settings in the config file, and run it again. You need to flush the cache and restart Half-Life for your new server.cfg / listenserver.cfg to take effect.

ALSO, both the server AND the client must close out of Half Life to reflect those settings. My major problem was when I was testing out what URL to use, I used the wrong URL structure first, and then tried various sv_downloadurl settings without either closing the half life program on the server end or the client end.

NOTE #2:
I was curious if the original folder needed to match the game, like cstrike, valve, dod, etc. My conclusion is that the sub-folder you use does not matter. I switched my subfolder structure from .root/hldm/valve/ to just .root/hldm/ and it works fine.
2. Is that the only lines of code I need for HLDM to direct connections to my website to download files?
Yes. sv_downloadurl, sv_allowdownload, and sv_allowupload were the only three lines of code I needed for it to work, and those values were correct.
3. Do I need server.cfg or only listenserver.cfg?
For my tests I had duplicate information in both the server.cfg and the listenserver.cfg. After I got the sv_downloadurl working, I tried alternating stripping out all of the info from server.cfg, and then from listenserver.cfg.

My tests showed I needed both. Without all of my information in the listenserver.cfg, sv_downloadurl did not work. When I flipped it and stripped out all of the information from server.cfg, but left all of the info in listenserver.cfg, got mixed results. The files did not download as fast for the client... but they downloaded faster than if I didn't have it.

My conclusion for fast results was to duplicate the info in server.cfg and listenserver.cfg. My understanding of how much is pulled from server.cfg over a listenserver.cfg is limited, and further research would need to be done for more conclusive results.

Bottom line is I duplicated the info to both files so Half-Life can pull what it needs to from either config file.
4. Does this command work only with dedicated servers and not listen servers?
Well I think I answered that already. I am running a listen server and sv_downloadurl seems to work perfect!
5. When players enter my server and the my server-side initializes, will clients not download maps from my website server if they aren't already in compressed form (.ztmp)?
As far as I could tell, client side resorted to the "trickle" style downloading from the server if the only uploaded files to the webhost were the .ztmp files. I don't know if GoldSrc recognizes .ztmp files if not originating from the server, so players will be downloading full uncompressed files from the webhost. The resource (.res) file might need to be edited to reflect the new .ztmp extension, but I did not check into that. The download times are plenty fast and I am not concerned about bandwidth at this time. Would be nice to be efficient, but I could not get this to work.
6. Do my server-side files need to reflect the "valve_downloaded" change?
Nope.

OTHER THINGS OF NOTE:

I read that if your web server is secured with Basic HTTP Authentication, use the format http://<username>:<password>@<domain>/<custom_content_directory>
well, I believe I have basic http authentication, and I did have to type out any security information into the config files.

I also read that you'll need to CHMOD your folders with 705 permission (via cpanel, plesk, FileZilla or any other management tool). Not sure about this though. My folders all have 705 permission by default. It might be worth looking into if you are having problems.

The banner.gif that used to show up with content hosting no longer displays, even when properly placed in the /gfx/banner.gif folder. I believe this functionality was removed as early as 2005.

Hope this helps someone, somewhere in the distant future's past!
You must be logged in to post a response.