Skip to content
Snippets Groups Projects

HTTP downloader port

Merged Lactozilla requested to merge http-download-port into next
1 unresolved thread

image

Merge request reports

Loading
Loading

Activity

Filter activity
  • Approvals
  • Assignees & reviewers
  • Comments (from bots)
  • Comments (from users)
  • Commits & branches
  • Edits
  • Labels
  • Lock status
  • Mentions
  • Merge request status
  • Tracking
  • SteelT resolved all threads

    resolved all threads

    • Contributor

      Tried it with Nginx and it works as expected! The only thing that is missing is that HTTP downloads doesn't respect noticedownload, but other than that this looks good to me.

    • The joining client downloads the files from a different source, so the host client physically cannot know when a file is being downloaded via http. Not that it really needs to since http downloads don't impact the host's performance (at least not directly ingame, it could still affect network traffic outside of srb2 itself depending on how they decide to host the file index)

      Edited by Xian.exe
    • Contributor

      Ah, I was under the impression that it queried each file one-by-one and only used HTTP as alternative channel. Though that makes me wonder what would happen if you added a file while a client is in the middle of downloading over HTTP...

    • The joining client does ask the host what files to download, and what link to search for to attempt an http download, but the host client does not control the files being hosted by http. If the joining client fails to find the requested file in the http file index, or an index is not properly setup, then it will request a direct download that does pass through noticedownload

      Edited by Xian.exe
    • an http file index may look like https://hyuu.cc/repo/ or http://kart.leftwarp.xyz/repo/

      in either case they are hosted on a completely separate server outside of srb2(kart in this case, as this is a port of a kart feature)'s influence. The host can detect when a joiner asks for a file, and can point them to the repo, but cannot manage the download itself unless the http download fails and the client requests a direct download

    • Contributor

      I'm not so sure about the index thing, since I didn't bother with it (visiting the root download directory returns 403 Forbidden in my case) but it still works exactly as intended. To me, it looks like it queries all files from SRB2 first, and then fetches all files from HTTP.

      Here's the requests that SRB2 did to Nginx, extracted from the logs:

      81.234.228.155 - - [08/Feb/2024:18:40:36 +0100] "GET /srb2-dbg//CL_Elfilin-v1.1.pk3?md5=1ceeef0bb20cf2fa55294a26bbf84e54 HTTP/1.1" 200 10173424 "-" "Sonic Robo Blast 2/v202.14"
      81.234.228.155 - - [08/Feb/2024:18:40:37 +0100] "GET /srb2-dbg//CL_Ellie_v2.1.0.pk3?md5=26125a8c5354f67aafe18aaef9679609 HTTP/1.1" 200 2184192 "-" "Sonic Robo Blast 2/v202.14"
      81.234.228.155 - - [08/Feb/2024:18:40:38 +0100] "GET /srb2-dbg//CL_Gemma-v3.0.2.pk3?md5=4ad901ba905c2dac7ba2230a17d2370c HTTP/1.1" 200 1580761 "-" "Sonic Robo Blast 2/v202.14"
      81.234.228.155 - - [08/Feb/2024:18:40:38 +0100] "GET /srb2-dbg//CL_HorizonChars-v1.1.pk3?md5=a03d0913549d4520cadedfc72a7c9998 HTTP/1.1" 200 2792243 "-" "Sonic Robo Blast 2/v202.14"
      81.234.228.155 - - [08/Feb/2024:18:40:39 +0100] "GET /srb2-dbg//CL_Maimy-v1.6.pk3?md5=f3a641a7bda1f7bcf159831685586e2f HTTP/1.1" 200 643813 "-" "Sonic Robo Blast 2/v202.14"
      81.234.228.155 - - [08/Feb/2024:18:40:39 +0100] "GET /srb2-dbg//CL_StephCharsOC-v2.1.pk3?md5=e7f780514cfde9d14fc7b597a5877700 HTTP/1.1" 200 4922114 "-" "Sonic Robo Blast 2/v202.14"
      81.234.228.155 - - [08/Feb/2024:18:40:41 +0100] "GET /srb2-dbg//CL_Whisper-v1.2.pk3?md5=20a15dad6ffbf37dd3dafd181b5ba592 HTTP/1.1" 200 6720107 "-" "Sonic Robo Blast 2/v202.14"
      81.234.228.155 - - [08/Feb/2024:18:40:41 +0100] "GET /srb2-dbg//HiddenPalaceHangout-v1.0.0.wad?md5=eedaaf07f8aa6cea54e773cb67fdf7bf HTTP/1.1" 200 1871855 "-" "Sonic Robo Blast 2/v202.14"
      81.234.228.155 - - [08/Feb/2024:18:40:41 +0100] "GET /srb2-dbg//L_AdminToolsPlus_v1.2-gtrtweak.lua?md5=d4b9ca1533741453aa62014df66eb9b5 HTTP/1.1" 200 20135 "-" "Sonic Robo Blast 2/v202.14"
      81.234.228.155 - - [08/Feb/2024:18:40:41 +0100] "GET /srb2-dbg//L_SuperColorsRevamp-v2.1.pk3?md5=ca005c4c8576e8fa011f0bd404791a4f HTTP/1.1" 200 57663 "-" "Sonic Robo Blast 2/v202.14"
      81.234.228.155 - - [08/Feb/2024:18:40:42 +0100] "GET /srb2-dbg//SL_ChrispysArcade-v1.pk3?md5=32c729bec57310697bacb766e18963b8 HTTP/1.1" 200 6915370 "-" "Sonic Robo Blast 2/v202.14"
      81.234.228.155 - - [08/Feb/2024:18:40:42 +0100] "GET /srb2-dbg//SML_KineticPlaygroundZone_v1.1.wad?md5=ef0809810d511e0e6534263ee9ac9076 HTTP/1.1" 200 886964 "-" "Sonic Robo Blast 2/v202.14"
      81.234.228.155 - - [08/Feb/2024:18:40:44 +0100] "GET /srb2-dbg//SML_Park_Valley_V7.4.2.1.2.pk3?md5=50b828d1db5d20a330feb6222d504deb HTTP/1.1" 200 18870277 "-" "Sonic Robo Blast 2/v202.14"
      81.234.228.155 - - [08/Feb/2024:18:40:46 +0100] "GET /srb2-dbg//SML_SpiralPlaza-v3.pk3?md5=57239a6a0144f2d65bab1a74f8a334b5 HTTP/1.1" 200 12881383 "-" "Sonic Robo Blast 2/v202.14"
      81.234.228.155 - - [08/Feb/2024:18:40:46 +0100] "GET /srb2-dbg//SM_Construct_v2.wad?md5=cc2f80e51a0146fffe053b8c0344eb61 HTTP/1.1" 200 5741209 "-" "Sonic Robo Blast 2/v202.14"
      81.234.228.155 - - [08/Feb/2024:18:40:47 +0100] "GET /srb2-dbg//S_ClockTown_v1_3.pk3?md5=a315a43c30ab41de890fe6eca5e60c23 HTTP/1.1" 200 4411833 "-" "Sonic Robo Blast 2/v202.14"
      81.234.228.155 - - [08/Feb/2024:18:40:50 +0100] "GET /srb2-dbg//S_JupirniersHangoutMaps-v1.3.pk3?md5=b6e21c91d9b22610875e79f6ce2cf1f3 HTTP/1.1" 200 27603329 "-" "Sonic Robo Blast 2/v202.14"
      81.234.228.155 - - [08/Feb/2024:18:40:52 +0100] "GET /srb2-dbg//S_JupirniersOldHangoutMapsCollection-v1.0.pk3?md5=d4b8fb84a56054671aa4b27b6a057a49 HTTP/1.1" 200 21721176 "-" "Sonic Robo Blast 2/v202.14"
      81.234.228.155 - - [08/Feb/2024:18:40:53 +0100] "GET /srb2-dbg//S_Soniku11_HangoutPackV2.4.1.pk3?md5=9221060e3cea4db11b45c4dd45116cc9 HTTP/1.1" 200 9209025 "-" "Sonic Robo Blast 2/v202.14"
      81.234.228.155 - - [08/Feb/2024:18:40:53 +0100] "GET /srb2-dbg//allemeralds.lua?md5=51689ccb80a25e8e99f0fb5481e9299a HTTP/1.1" 200 52 "-" "Sonic Robo Blast 2/v202.14"
      81.234.228.155 - - [08/Feb/2024:18:40:54 +0100] "GET /srb2-dbg//cl_RushChars-v1.3.pk3?md5=ec47d76b2a1bfed0eb85df7f22392e0c HTTP/1.1" 200 6638562 "-" "Sonic Robo Blast 2/v202.14"
      81.234.228.155 - - [08/Feb/2024:18:40:55 +0100] "GET /srb2-dbg//cl_Shadow-v1.3.pk3?md5=5febe4f40ddc930d4cdf02ab16df6596 HTTP/1.1" 200 2183703 "-" "Sonic Robo Blast 2/v202.14"
      81.234.228.155 - - [08/Feb/2024:18:40:58 +0100] "GET /srb2-dbg//csl_silverhorn-v1.pk3?md5=38ffb2bb902ed847fc5747e72723277c HTTP/1.1" 200 40468939 "-" "Sonic Robo Blast 2/v202.14"
      81.234.228.155 - - [08/Feb/2024:18:40:59 +0100] "GET /srb2-dbg//hangout.soc?md5=9842b3222e0d9c9ddaa642c0aa29a993 HTTP/1.1" 200 245 "-" "Sonic Robo Blast 2/v202.14"
      81.234.228.155 - - [08/Feb/2024:18:40:59 +0100] "GET /srb2-dbg//haniscript.lua?md5=39e38918e55e3c4ad57f15a75c6386c4 HTTP/1.1" 200 1285 "-" "Sonic Robo Blast 2/v202.14"
      81.234.228.155 - - [08/Feb/2024:18:40:59 +0100] "GET /srb2-dbg//sendcolor-v7.lua?md5=c1e9524a82fc5688878a4c8c4728e9e4 HTTP/1.1" 200 15484 "-" "Sonic Robo Blast 2/v202.14"

      You can see here that it requests each file successfully, but never does it request the directory.

    • Please register or sign in to reply
  • Alam Ed Arias approved this merge request

    approved this merge request

  • sphere changed milestone to %2.2.14

    changed milestone to %2.2.14

  • merged

  • sphere mentioned in commit 0d526c0f

    mentioned in commit 0d526c0f

  • Hanicef mentioned in merge request !2625 (merged)

    mentioned in merge request !2625 (merged)

Please register or sign in to reply
Loading