referal header. the client will send the following format referrer to the
download server

hl2://0.0.0.0

where 0.0.0.0 is the ip address is the GAME servers ip address. You can use
.htaccess in apache to limit connections by using

SetEnvIfNoCase Referer hl2://0\.0\.0\.0 allow_download
Order Deny,Allow
Allow from env=allow_download
Deny from all

Replacing the 0's with the game servers IP.

If your not using apache, there MUST be some kind of way to do it on IIS,
but i havent got a clue what it is.

Also a note on BZIP files, the client will always look for the BZ2
extenstion in the download server first, if it cannot find it, it will then
download the actual file, eg for the file mymap.bsp, first it will look for
mymap.bsp.bz2 then for mymap.bsp
Be careful what program you use to bzip files, some dont work with the
source engine.

If you have plugins etc that require other files, textures, sounds, models
etc then that plugin should be handling the adding of the files to the
download table for you, if its not then there is a sourcemod plugin which
will do this for you.

On Fri, Mar 6, 2009 at 9:12 AM, Rick Payton <[email protected]> wrote:

> To further protect yourself you could run apache instead of IIS.
>
> http://list.valvesoftware.com/mailman/private/hlds/2008-October/052140.h
> tml<http://list.valvesoftware.com/mailman/private/hlds/2008-October/052140.h%0Atml>
>
> ^^^ contains what I did to secure mine. Granted that was under linux -
> dunno if the same setup works under apache + windows.
>
> -mauirixxx
> - Sent from my #hlserveradmins IRC fanboyism
> -----Original Message-----
> From: [email protected]
> [mailto:[email protected]] On Behalf Of msleeper
> Sent: Thursday, March 05, 2009 12:02 PM
> To: Half-Life dedicated Win32 server mailing list
> Subject: Re: [hlds] how does sv_downloadurl work?
>
> Don't publicly share your downloadurl then? Plus it would be kind of
> dumb to rip off someone else's content since you don't know what they
> may or may not have, or you might delete something altogether. You
> should also put a blank index file in each directory in your
> downloadurl, so people can't snoop around and get a directory listing
> (assuming directory listings are enabled, which they shouldn't be).
>
>
> On Thu, 2009-03-05 at 21:58 +0000, Patrick Shelley wrote:
> > As it is the client making a direct connection, theres no way you can
> > prevent your sv_downloadurl being used by other server admins as their
>
> > fast dl source - leeching from you?
> >
> > I was under the impression that even though the fast dl is a different
>
> > source to the game server, the game server acted as a 'gateway' for
> > the client to grab those files.
> >
> > If that was the case, In IIS i could prevent all other IP's except my
> > game server IP's being able to connect successfully to the fast dl
> > source - and stop a server admin being to use my sv_downloadurl to
> leech from it - but...
> > as confirmed in an above post, thats not the case and im gutted :(
> > _______________________________________________
> > To unsubscribe, edit your list preferences, or view the list archives,
> please visit:
> > http://list.valvesoftware.com/mailman/listinfo/hlds
>
>
> _______________________________________________
> To unsubscribe, edit your list preferences, or view the list archives,
> please visit:
> http://list.valvesoftware.com/mailman/listinfo/hlds
>
> _______________________________________________
> To unsubscribe, edit your list preferences, or view the list archives,
> please visit:
> http://list.valvesoftware.com/mailman/listinfo/hlds
>
_______________________________________________
To unsubscribe, edit your list preferences, or view the list archives, please 
visit:
http://list.valvesoftware.com/mailman/listinfo/hlds

Reply via email to