The mirror system we use is in the Debian net/mirror-2.8-6.deb package. This is the well-known Perl mirror program. I think it requires Perl5 to run without great big memory leaks, but you should be able to take the debian source/net/mirror-2.8-6.tar.gz archive and move that to any platform that runs Perl.
Thanks Bruce