YourDebrid is a fully open-source debrid service written in D-lang.
mkdir builld cd build meson .. ninja
Changing the compiler
DC='dmd' meson ..
What is a Debrid service?
A debrid service is a service that downloads torrents and then uploads them to a remote server. It provides a http(s) link for a torrent file.
Is it legal?
Well, it depends on your country. For most of the EU it is legal to stream copyrighted content generated from this service, you just can't download it.
You can see more information here: https://en.wikipedia.org/wiki/Legal_aspects_of_file_sharing
This software is licensed under GNU Affero General Public License 3.0 (APGLv3).
You can see a really brief interpertation of the license on tldrlegal's website.