Skip to content

HTTP Downloads

ouned edited this page Jun 6, 2017 · 3 revisions

JK2MV extends JK2's download system by HTTP-Downloads. These are way faster than the regular and now considered legacy (but still fully supported) UDP-Downloads (sv_allowdownload). However, it works using the HTTP protocol so you need an HTTP server to actually provide this functionality. But JK2MV makes this very easy for you. It has an (minimalistic) HTTP-Server integrated. It works exactly the same way sv_allowdownload did, except that it is way faster. Of course, for it to work, clients on your server also need JK2MV. Everyone else can still load the files over UDP (If you enable it), but painfully slow.

Make sure none of your pk3 files have spaces in their name. These usually cause issues with the download system.

As of 2017, most players seem to use JK2MV so it makes even more sense to enable HTTP-Downloads if you use custom maps / mods on your server.

Please also have a look at PK3 Referencing, even though in most cases it will just work.

Cvars

mv_httpdownloads
Valid values: "1", "0"
Default value: "0"
Switches http downloads on (1) and off (0). Needs a map restart to be effective.
mv_httpserverport
Valid values: 0-65535 (TCP Port), Any HTTP-URL (http://...)
Default value: "0"
If a number is provided it decides on which TCP port the builtin HTTP-Server will listen on. If set to zero it will automatically choose a port between 18200 and 18215, trying every single one till it finds an unused port. Make sure that this port is opened in your Firewall / NAT.

Since JK2MV 1.1, external HTTP Servers are supported. The URL should point to the GameData directory of your file server. Note that clients also need at least JK2MV 1.1 in case you are using a URL. Older JK2MV versions will not detect the availability of HTTP-Downloads if they use an older version. HTTPS is not (yet) supported.