mldonkey icon indicating copy to clipboard operation
mldonkey copied to clipboard

Cannot download GeoIP.dat.gz over HTTPS

Open RigacciOrg opened this issue 1 year ago • 11 comments

The default URL for the GeoIP.dat database is broken, it returns a 404 Not Found (October 2024): http://www.maxmind.com/download/geoip/database/GeoLiteCountry/GeoIP.dat.gz

I tried to configure an alternative URL into downloads.ini, the one I found is HTTPS: https://mailfud.org/geoip-legacy/GeoIP.dat.gz

Unfortunately it seems that MLDonkey is unable to use HTTPS; after configuring the URL above, I sniffed the traffic toward the target server and I see a TCP connection to TCP port zero instead of 443. Even though I explicitly declare port 443 in the URL, the connection does not happen.

Maybe MLDonkey is not HTTPS capable at all, can be related to issue #41 too.

RigacciOrg avatar Oct 22 '24 08:10 RigacciOrg

I use Options -> Web Infos to load and appear to work ( need to copy by hand on web_infos folder first time):

image

raulfg3 avatar Dec 08 '24 21:12 raulfg3

but not sure if is loaded by URL when reboot or is always the same I copy by hand first time, apparently the date of the file change between reboots

raulfg3 avatar Dec 08 '24 21:12 raulfg3

anybody can re-test?

raulfg3 avatar Dec 09 '24 17:12 raulfg3

related: https://github.com/ygrek/mldonkey/issues/38

raulfg3 avatar Dec 09 '24 17:12 raulfg3

@RigacciOrg @raulfg3 the system currently does not work, the only solution is to download the file by hand and update it by hand.

One option to automate it would be to edit the systemd unit that starts mldonkey and put an ExecStartPre that downloads the file when the daemon starts. Another could be to schedule a cron (with systemd or crontab) to do it periodically.

IMHO neither is worthwhile because it is not such a live file that you can't manually update it from time to time.

ogarcia avatar Jan 31 '25 09:01 ogarcia

Thanks a lot to test, and for your suggestion. because is only update fewtimes a year, I doi by hand .

Perhaps developer read this and update code .

raulfg3 avatar Jan 31 '25 12:01 raulfg3

For those of you adventurous enough, I uploaded some patches to fix this problem: https://github.com/carlonluca/mldonkey/tree/feature/curl.

You'll have to build the branch feature/curl from my fork of mldonkey and use the URL https://dl.miyuru.lk/geoip/maxmind/country/maxmind4.dat.gz. I also uploaded an experimental docker image with these patches.

I'm still testing the implementation, but it seems my geoip db was actually updated properly from that URL.

carlonluca avatar Jan 31 '25 19:01 carlonluca

how to test if woks? is a docker image available?

raulfg3 avatar Feb 27 '25 15:02 raulfg3

Yes, this one includes the patch: carlonluca/mldonkey:exp.

carlonluca avatar Feb 27 '25 17:02 carlonluca

tested and worked. please add to the dev when posible.

more info:

Image

Image

Image

raulfg3 avatar Feb 27 '25 19:02 raulfg3

I added this patch (and others) to my fork and I started to release it with the regular docker builds. The PR is being worked on, but may not land soon here.

carlonluca avatar Apr 02 '25 20:04 carlonluca