Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Reverse ssh tunnel for p2p downloads

I am looking to implement a solution where I use a remote bittorrent client on the cloud server and then download the files to local system over http. This is expected to improve my bandwidth and overcome blacklisting my ip(suppose if I am behind proxy). My solution would be exactly like seedr.cc . One another improvement I want to provide is that the files/directories to be downloaded in parts locally(client application) simultaneously. This can also be done very easily if my solution is a client server application. Now, the real question, suppose if I want to not download the files/directories on the server at all, but on clients directly without mounting remote disk(client's disk). Here, remember the server is used for just the network, no storage is used at all. Do you know of any thing that can help?

like image 953
v78 Avatar asked Sep 18 '25 02:09

v78


1 Answers

well , "rsync" in the title is a bit misleading and you're running into several problems here: the remote has to be reachable .. so having an "active tunnel" back to your clients will be a heavy task

for the incoming part: you could use lftp for torrents https://lftp.yar.ru/torrent.html and separate this per user , also helping you with quotas etc. , suggestion: use it in a screen or byobu session

for the download part:

  • maybe use a ramdisk ( mkdir /tmp/ramtamtam;mount -t tmpfs /dev/null /tmp/ramtamtam/ -o size=64M ) and let the client access this
  • use archivemount https://github.com/bramp/archivemount and send this to the client
  • use external providers like mega with rclone and let the clients access this
  • a neat optoin would is letting the clients access a torrent on your server through torrent itself with a custom magnet link , and add this to the running lftp session , since the download is at 100% for this you could use https://webtorrent.io/
  • downloading over http can also be achieved with lftp's mirror command
like image 172
Benji over_9000 'benchonaut' Avatar answered Sep 21 '25 13:09

Benji over_9000 'benchonaut'